• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# BuildInfo类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中BuildInfo的典型用法代码示例。如果您正苦于以下问题:C# BuildInfo类的具体用法?C# BuildInfo怎么用?C# BuildInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



BuildInfo类属于命名空间,在下文中一共展示了BuildInfo类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: GetBuildDoneImage

        public static ControlTemplate GetBuildDoneImage(BuildInfo buildInfo, IEnumerable<ProjectItem> allProjects, out ControlTemplate stateImage)
        {
            if (buildInfo == null || buildInfo.BuildAction == null || buildInfo.BuildScope == null)
            {
                stateImage = null;
                return VectorResources.TryGet(BuildActionResourcesUri, "StandBy");
            }

            if (allProjects == null)
                throw new InvalidOperationException();

            int errorProjectsCount = allProjects.Count(item => item.State.IsErrorState());
            bool buildedProjectsSuccess = buildInfo.BuildedProjects.BuildWithoutErrors;

            string stateKey;
            if (buildInfo.BuildIsCancelled)
                stateKey = "BuildCancelled";
            else if (!buildedProjectsSuccess)
                stateKey = "BuildError";
            else if (buildedProjectsSuccess && errorProjectsCount == 0)
                stateKey = "BuildDone";
            else if (buildedProjectsSuccess && errorProjectsCount != 0)
                stateKey = "BuildErrorDone";
            else
                throw new InvalidOperationException();

            stateImage = VectorResources.TryGet(BuildStateResourcesUri, stateKey);

            string actionKey = GetBuildActionResourceKey(buildInfo.BuildAction.Value);
            return VectorResources.TryGet(BuildActionResourcesUri, actionKey);
        }
开发者ID:ashwinsathyar,项目名称:BuildVision,代码行数:31,代码来源:BuildImages.cs


示例2: BuildMethodCall

        protected override IBuildContext BuildMethodCall(ExpressionBuilder builder, MethodCallExpression methodCall, BuildInfo buildInfo)
        {
            var sequence = builder.BuildSequence(new BuildInfo(buildInfo, methodCall.Arguments[0]));

            if (sequence.SelectQuery.Select.TakeValue != null || sequence.SelectQuery.Select.SkipValue != null)
                sequence = new SubQueryContext(sequence);

            var lambda  = (LambdaExpression)methodCall.Arguments[1].Unwrap();
            var sparent = sequence.Parent;
            var order   = new ExpressionContext(buildInfo.Parent, sequence, lambda);
            var body    = lambda.Body.Unwrap();
            var sql     = builder.ConvertExpressions(order, body, ConvertFlags.Key);

            builder.ReplaceParent(order, sparent);

            if (!methodCall.Method.Name.StartsWith("Then"))
                sequence.SelectQuery.OrderBy.Items.Clear();

            foreach (var expr in sql)
            {
                var e = builder.ConvertSearchCondition(sequence, expr.Sql);
                sequence.SelectQuery.OrderBy.Expr(e, methodCall.Method.Name.EndsWith("Descending"));
            }

            return sequence;
        }
开发者ID:petedv,项目名称:linq2db,代码行数:26,代码来源:OrderByBuilder.cs


示例3: Create

 public static IncrementalBuildContext Create(DocumentBuildParameters parameters, BuildInfo cb, BuildInfo lb, string intermediateFolder)
 {
     if (parameters == null)
     {
         throw new ArgumentNullException(nameof(parameters));
     }
     if (cb == null)
     {
         throw new ArgumentNullException(nameof(cb));
     }
     if (intermediateFolder == null)
     {
         throw new ArgumentNullException(nameof(intermediateFolder));
     }
     var baseDir = Path.Combine(intermediateFolder, cb.DirectoryName);
     var lastBaseDir = lb != null ? Path.Combine(intermediateFolder, lb.DirectoryName) : null;
     var lastBuildStartTime = lb?.BuildStartTime;
     var canBuildInfoIncremental = CanBuildInfoIncremental(cb, lb);
     var lbv = lb?.Versions?.SingleOrDefault(v => v.VersionName == parameters.VersionName);
     var cbv = new BuildVersionInfo
     {
         VersionName = parameters.VersionName,
         ConfigHash = ComputeConfigHash(parameters),
         AttributesFile = IncrementalUtility.CreateRandomFileName(baseDir),
         DependencyFile = IncrementalUtility.CreateRandomFileName(baseDir),
         ManifestFile = IncrementalUtility.CreateRandomFileName(baseDir),
         XRefSpecMapFile = IncrementalUtility.CreateRandomFileName(baseDir),
         BuildMessageFile = IncrementalUtility.CreateRandomFileName(baseDir),
         Attributes = ComputeFileAttributes(parameters, lbv?.Dependency),
         Dependency = new DependencyGraph(),
     };
     cb.Versions.Add(cbv);
     var context = new IncrementalBuildContext(baseDir, lastBaseDir, lastBuildStartTime, canBuildInfoIncremental, parameters, cbv, lbv);
     return context;
 }
开发者ID:dotnet,项目名称:docfx,代码行数:35,代码来源:IncrementalBuildContext.cs


示例4: Build

 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="buildInfo">Build Info</param>
 public Build(BuildInfo buildInfo)
 {
     this.buildInfo = buildInfo;
     sProjectDir = sProjectsDir + @"\project-" + buildInfo.project_id;
     commands = new LinkedList<string>();
     __output.Clear();
 }
开发者ID:uwydoc,项目名称:gitlab-ci-runner-win,代码行数:11,代码来源:Build.cs


示例5: DrawGUI

        public override void DrawGUI(Rect position, BuildInfo buildReportToDisplay)
        {
            GUILayout.Space(2); // top padding for scrollbar

            _assetListScrollPos = GUILayout.BeginScrollView(_assetListScrollPos);

            GUILayout.Space(10); // top padding for content

            GUILayout.BeginHorizontal();
            GUILayout.Space(10); // extra left padding

            DrawTotalSize(buildReportToDisplay);

            GUILayout.Space(BuildReportTool.Window.Settings.CATEGORY_HORIZONTAL_SPACING);
            GUILayout.BeginVertical();

                DrawBuildSizes(buildReportToDisplay);

                GUILayout.Space(BuildReportTool.Window.Settings.CATEGORY_VERTICAL_SPACING);

                DrawDLLList(buildReportToDisplay);

            GUILayout.EndVertical();
            GUILayout.Space(20); // extra right padding
            GUILayout.EndHorizontal();

            GUILayout.EndScrollView();
        }
开发者ID:farreltr,项目名称:OneLastSunset,代码行数:28,代码来源:BRT_SizeStatsScreen.cs


示例6: BuildMethodCall

        protected override IBuildContext BuildMethodCall(ExpressionBuilder builder, MethodCallExpression methodCall, BuildInfo buildInfo)
        {
            var sequence = builder.BuildSequence(new BuildInfo(buildInfo, methodCall.Arguments[0]));
            var query    = builder.BuildSequence(new BuildInfo(buildInfo, methodCall.Arguments[1], new SqlQuery()));
            var except   = query.SqlQuery;

            sequence = new SubQueryContext(sequence);

            var sql = sequence.SqlQuery;

            except.ParentSql = sql;

            if (methodCall.Method.Name == "Except")
                sql.Where.Not.Exists(except);
            else
                sql.Where.Exists(except);

            var keys1 = sequence.ConvertToSql(null, 0, ConvertFlags.Key);
            var keys2 = query.   ConvertToSql(null, 0, ConvertFlags.Key);

            if (keys1.Length != keys2.Length)
                throw new InvalidOperationException();

            for (var i = 0; i < keys1.Length; i++)
            {
                except.Where
                    .Expr(keys1[i].Sql)
                    .Equal
                    .Expr(keys2[i].Sql);
            }

            return sequence;
        }
开发者ID:henleygao,项目名称:linq2db,代码行数:33,代码来源:IntersectBuilder.cs


示例7: getBuild

 /// <summary>
 /// Get a new build
 /// </summary>
 /// <returns>BuildInfo object or null on error/no build</returns>
 public static BuildInfo getBuild()
 {
     Console.WriteLine("* Checking for builds...");
     string sPostBody = "token=" + Uri.EscapeDataString(Config.token);
     string sResp = post(apiurl + "/builds/register.json", sPostBody);
     try
     {
         if (!String.IsNullOrEmpty(sResp))
         {
             JsonObject obj = JsonObject.Parse(sResp);
             if (obj != null)
             {
                 BuildInfo info = new BuildInfo();
                 info.id = obj.Get<int>("id");
                 info.project_id = obj.Get<int>("project_id");
                 info.commands = obj.Get<string[]>("commands");
                 info.repo_url = obj.Get("repo_url");
                 info.reference = obj.Get("sha");
                 info.ref_name = obj.Get("ref");
                 return info;
             }
         }
         else
         {
             Console.WriteLine("* Nothing");
         }
     }
     catch (Exception)
     {
         Console.WriteLine("* Failed");
     }
     return null;
 }
开发者ID:j4m355,项目名称:gitlab-ci-runner-win,代码行数:37,代码来源:Network.cs


示例8: IsSequence

		public bool IsSequence(ExpressionBuilder builder, BuildInfo buildInfo)
		{
			var expr = (ChangeTypeExpression)buildInfo.Expression;
			var info = new BuildInfo(buildInfo, expr.Expression);

			return GetBuilder(builder, info).IsSequence(builder, info);
		}
开发者ID:Convey-Compliance,项目名称:linq2db,代码行数:7,代码来源:ChangeTypeExpressionBuilder.cs


示例9: Convert

        protected override SequenceConvertInfo Convert(
            ExpressionBuilder builder, MethodCallExpression methodCall, BuildInfo buildInfo, ParameterExpression param)
        {
            var predicate = (LambdaExpression)methodCall.Arguments[1].Unwrap();
            var info      = builder.ConvertSequence(new BuildInfo(buildInfo, methodCall.Arguments[0]), predicate.Parameters[0]);

            if (info != null)
            {
                info.Expression = methodCall.Transform(ex => ConvertMethod(methodCall, 0, info, predicate.Parameters[0], ex));

                if (param != null)
                {
                    if (param.Type != info.Parameter.Type)
                        param = Expression.Parameter(info.Parameter.Type, param.Name);

                    if (info.ExpressionsToReplace != null)
                        foreach (var path in info.ExpressionsToReplace)
                        {
                            path.Path = path.Path.Transform(e => e == info.Parameter ? param : e);
                            path.Expr = path.Expr.Transform(e => e == info.Parameter ? param : e);
                        }
                }

                info.Parameter = param;

                return info;
            }

            return null;
        }
开发者ID:pebezo,项目名称:linq2db,代码行数:30,代码来源:WhereBuilder.cs


示例10: DrawGUI

        public override void DrawGUI(Rect position, BuildInfo buildReportToDisplay)
        {
            if (!buildReportToDisplay.HasUsedAssets)
            {
            return;
            }

            // init variables to use
            // --------------------------------------------------------------------------

            BuildReportTool.FileFilterGroup fileFilterGroupToUse = buildReportToDisplay.FileFilters;

            if (BuildReportTool.Options.ShouldUseConfiguredFileFilters())
            {
            fileFilterGroupToUse = _configuredFileFilterGroup;
            }

            BuildReportTool.AssetList listToDisplay = GetAssetListToDisplay(buildReportToDisplay);

            //BuildReportTool.SizePart[] assetListToUse = listToDisplay.GetListToDisplay(fileFilterGroupToUse);
            //
            //if (assetListToUse == null || assetListToUse.Length == 0)
            //{
            //	fileFilterGroupToUse.ForceSetSelectedFilterIdx(0);
            //}

            if (listToDisplay == null)
            {
            if (IsShowingUsedAssets)
            {
                Utility.DrawCentralMessage(position, "No \"Used Assets\" included in this build report.");
            }
            else if (IsShowingUnusedAssets)
            {
                Utility.DrawCentralMessage(position, "No \"Unused Assets\" included in this build report.");
            }
            return;
            }

            // gui
            // --------------------------------------------------------------------------

            GUILayout.Space(1);

            DrawTopBar(position, buildReportToDisplay, fileFilterGroupToUse);

            if (buildReportToDisplay.HasUsedAssets)
            {
            DrawAssetList(position, listToDisplay, fileFilterGroupToUse, BuildReportTool.Options.AssetListPaginationLength);
            }

            // status bar at bottom
            // --------------------------------------------------------------------------

            GUILayout.Space(20);

            string selectedInfoLabel = string.Format("{0}{1}. {2}{3} ({4}%)				Click on an asset's checkbox to include it in size calculation. Click on the filename to highlight it on your Project window.", Labels.SELECTED_QTY_LABEL, listToDisplay.GetSelectedCount().ToString("N0"), Labels.SELECTED_SIZE_LABEL, listToDisplay.GetReadableSizeOfSumSelection(), listToDisplay.GetPercentageOfSumSelection().ToString("N"));

            GUI.Label(new Rect(0, position.height - 20, position.width, 20), selectedInfoLabel, BuildReportTool.Window.Settings.STATUS_BAR_LABEL_STYLE_NAME);
        }
开发者ID:farreltr,项目名称:OneLastSunset,代码行数:60,代码来源:BRT_AssetListScreen.cs


示例11: DocumentBuilder

 public DocumentBuilder(
     IEnumerable<Assembly> assemblies,
     ImmutableArray<string> postProcessorNames,
     string templateHash,
     string intermediateFolder = null,
     string commitFromSHA = null,
     string commitToSHA = null)
 {
     Logger.LogVerbose("Loading plug-in...");
     using (new LoggerPhaseScope("ImportPlugins", true))
     {
         var assemblyList = assemblies?.ToList();
         _container = GetContainer(assemblyList);
         _container.SatisfyImports(this);
         _currentBuildInfo.CommitFromSHA = commitFromSHA;
         _currentBuildInfo.CommitToSHA = commitToSHA;
         if (intermediateFolder != null)
         {
             _currentBuildInfo.PluginHash = ComputePluginHash(assemblyList);
             _currentBuildInfo.TemplateHash = templateHash;
             _currentBuildInfo.DirectoryName = IncrementalUtility.CreateRandomDirectory(intermediateFolder);
         }
     }
     Logger.LogInfo($"{Processors.Count()} plug-in(s) loaded.");
     foreach (var processor in Processors)
     {
         Logger.LogVerbose($"\t{processor.Name} with build steps ({string.Join(", ", from bs in processor.BuildSteps orderby bs.BuildOrder select bs.Name)})");
     }
     _postProcessors = GetPostProcessor(postProcessorNames);
     _intermediateFolder = intermediateFolder;
     _lastBuildInfo = LoadLastBuildInfo();
 }
开发者ID:dotnet,项目名称:docfx,代码行数:32,代码来源:DocumentBuilder.cs


示例12: DependencyBuildInfo

 public DependencyBuildInfo(BuildInfo buildInfo, bool upgradeStableVersions)
 {
     BuildInfo = buildInfo;
     UpgradeStableVersions = upgradeStableVersions;
     Packages = buildInfo.LatestPackages
         .Select(pair => new PackageIdentity(pair.Key, new NuGetVersion(pair.Value)))
         .ToArray();
 }
开发者ID:ChadNedzlek,项目名称:buildtools,代码行数:8,代码来源:DependencyBuildInfo.cs


示例13: Build

 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="buildInfo">Build Info</param>
 public Build(BuildInfo buildInfo)
 {
     this.buildInfo = buildInfo;
     sProjectDir = sProjectsDir + @"\project-" + buildInfo.project_id;
     commands = new LinkedList<string>();
     outputList = new ConcurrentQueue<string>();
     completed = false;
 }
开发者ID:Burstaholic,项目名称:gitlab-ci-runner-win,代码行数:12,代码来源:Build.cs


示例14: RefreshData

	public override void RefreshData(BuildInfo buildReport)
	{
		const string README_FILENAME = "README.txt";
		_readmeContents = BuildReportTool.Util.GetPackageFileContents(README_FILENAME);

		const string CHANGELOG_FILENAME = "VERSION.txt";
		_changelogContents = BuildReportTool.Util.GetPackageFileContents(CHANGELOG_FILENAME);
	}
开发者ID:predominant,项目名称:Treasure_Chest,代码行数:8,代码来源:BRT_HelpScreen.cs


示例15: BuildMethodCall

        protected override IBuildContext BuildMethodCall(ExpressionBuilder builder, MethodCallExpression methodCall, BuildInfo buildInfo)
        {
            var sequence  = builder.BuildSequence(new BuildInfo(buildInfo, methodCall.Arguments[0]));
            var condition = (LambdaExpression)methodCall.Arguments[1].Unwrap();
            var result    = builder.BuildWhere(buildInfo.Parent, sequence, condition, true);

            result.SetAlias(condition.Parameters[0].Name);

            return result;
        }
开发者ID:pebezo,项目名称:linq2db,代码行数:10,代码来源:WhereBuilder.cs


示例16: Initialize

        public void Initialize(BuildInfo buildInfo)
        {
            Info = buildInfo;

            nameLabel.text = buildInfo.name;
            healthLabel.text = buildInfo.stats.health.ToString();
            shieldLabel.text = buildInfo.stats.shield.ToString();
            speedLabel.text = buildInfo.stats.speed.ToString();
            damageLabel.text = buildInfo.stats.damage.ToString();
        }
开发者ID:syeager,项目名称:Space-CUBEs,代码行数:10,代码来源:BuildPreview.cs


示例17: GetValue

 protected override int? GetValue(DTE dte, BuildInfo buildContext)
 {
     try
     {
         return buildContext.BuildedProjects.BuildErrorCount;
     }
     catch (NullReferenceException)
     {
         return null;
     }
 }
开发者ID:ashwinsathyar,项目名称:BuildVision,代码行数:11,代码来源:ErrorProjectsIndicator.cs


示例18: GetBuildBeginImage

        public static ControlTemplate GetBuildBeginImage(BuildInfo buildInfo)
        {
            vsBuildAction? buildAction = buildInfo.BuildAction;
            vsBuildScope? buildScope = buildInfo.BuildScope;

            if (buildAction == null || buildScope == null)
                return null;

            string actionKey = GetBuildActionResourceKey(buildAction.Value);
            return VectorResources.TryGet(BuildActionResourcesUri, actionKey);
        }
开发者ID:ashwinsathyar,项目名称:BuildVision,代码行数:11,代码来源:BuildImages.cs


示例19: Join

    /// <summary>
    /// The ship is built by having all of its parts fly together.
    /// </summary>
    /// <param name="buildInfo">Ship instructions.</param>
    /// <param name="buildSize">Size of the grid.</param>
    /// <param name="transform">Ship transforms.</param>
    /// <param name="maxTime">How long the building process can take.</param>
    /// <param name="finishedAction">Method to call when completed.</param>
    public static IEnumerator Join(BuildInfo buildInfo, int buildSize, Transform transform, float maxTime, Action<BuildFinishedArgs> finishedAction = null)
    {
        var pieces = new List<BuildCUBE>();

        const float minDist = 100f;
        const float maxDist = 250f;
        Vector3 halfGrid = Vector3.one * (buildSize / 2f - 1f);
        Vector3 pivotOffset = -Vector3.one / 2f;
        float speed = maxDist / maxTime;

        foreach (var piece in buildInfo.partList)
        {
            CUBE cube = GameResources.CreateCUBE(piece.Key);
            cube.transform.parent = transform;
            Material[] materials = new Material[cube.renderer.materials.Length];
            materials.SetAll(material);
            cube.renderer.materials = materials;

            cube.transform.localPosition = piece.Value.position.normalized * Random.Range(minDist, maxDist);
            cube.transform.localPosition = Quaternion.Euler(Random.Range(0, 360), Random.Range(0, 360), Random.Range(0, 360)) * cube.transform.localPosition;
            cube.transform.localEulerAngles = piece.Value.rotation;

            if (piece.Value.weaponMap != -1)
            {
                ((Weapon)cube.GetComponent(typeof(Weapon))).index = piece.Value.weaponMap;
            }

            if (piece.Value.augmentationMap != -1)
            {
                ((Augmentation)cube.GetComponent(typeof(Augmentation))).index = piece.Value.augmentationMap;
            }

            ((ColorVertices)cube.GetComponent(typeof(ColorVertices))).Bake(piece.Value.colors);

            pieces.Add(new BuildCUBE(cube.transform, piece.Value.position - halfGrid + Utility.RotateVector(pivotOffset, Quaternion.Euler(piece.Value.rotation)), speed));
        }

        float time = maxTime;
        while (time > 0f)
        {
            foreach (BuildCUBE piece in pieces)
            {
                piece.Update(Time.deltaTime);
            }
            time -= Time.deltaTime;
            yield return null;
        }

        if (finishedAction != null)
        {
            finishedAction(new BuildFinishedArgs(transform.gameObject, buildInfo.stats, buildInfo.trimColor));
        }
    }
开发者ID:syeager,项目名称:Space-CUBEs,代码行数:61,代码来源:ShowBuild.cs


示例20: BuildMethodCall

		protected override IBuildContext BuildMethodCall(ExpressionBuilder builder, MethodCallExpression methodCall, BuildInfo buildInfo)
		{
			var sequence = builder.BuildSequence(new BuildInfo(buildInfo, methodCall.Arguments[0]));
			var sql      = sequence.SqlQuery;

			if (sql.Select.TakeValue != null || sql.Select.SkipValue != null)
				sequence = new SubQueryContext(sequence);

			sequence.SqlQuery.Select.IsDistinct = true;

			return sequence;
		}
开发者ID:x64,项目名称:bltoolkit,代码行数:12,代码来源:DistinctBuilder.cs



注:本文中的BuildInfo类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# BuildOptions类代码示例发布时间:2022-05-24
下一篇:
C# BuildContext类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap