当前位置: 首页>>代码示例>>C#>>正文


C# INodePacketTranslator.Translate方法代码示例

本文整理汇总了C#中INodePacketTranslator.Translate方法的典型用法代码示例。如果您正苦于以下问题:C# INodePacketTranslator.Translate方法的具体用法?C# INodePacketTranslator.Translate怎么用?C# INodePacketTranslator.Translate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在INodePacketTranslator的用法示例。


在下文中一共展示了INodePacketTranslator.Translate方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: TranslateTargetFinishedEvent

        /// <summary>
        /// Translate the TargetOutputs for the target finished event.
        /// </summary>
        private static void TranslateTargetFinishedEvent(INodePacketTranslator translator, TargetFinishedEventArgs finishedEvent)
        {
            List<TaskItem> targetOutputs = null;
            if (translator.Mode == TranslationDirection.WriteToStream)
            {
                if (finishedEvent.TargetOutputs != null)
                {
                    targetOutputs = new List<TaskItem>();
                    foreach (TaskItem item in finishedEvent.TargetOutputs)
                    {
                        targetOutputs.Add(item);
                    }
                }
            }

            translator.Translate<TaskItem>(ref targetOutputs, TaskItem.FactoryForDeserialization);

            if (translator.Mode == TranslationDirection.ReadFromStream)
            {
                finishedEvent.TargetOutputs = targetOutputs;
            }
        }
开发者ID:cameron314,项目名称:msbuild,代码行数:25,代码来源:LogMessagePacket.cs

示例2:

 /// <summary>
 /// Translates the sub-toolset.
 /// </summary>
 void INodePacketTranslatable.Translate(INodePacketTranslator translator)
 {
     translator.Translate(ref _subToolsetVersion);
     translator.TranslateProjectPropertyInstanceDictionary(ref _properties);
 }
开发者ID:cameron314,项目名称:msbuild,代码行数:8,代码来源:SubToolset.cs

示例3:

        /// <summary>
        /// Writes the packet to the serializer.
        /// Always send as ints, even if ushorts are being used: otherwise it'd
        /// need a byte to discriminate and the savings would be microscopic.
        /// </summary>
        void INodePacketTranslatable.Translate(INodePacketTranslator translator)
        {
            ErrorUtilities.VerifyThrow(translator.Mode == TranslationDirection.WriteToStream, "write only");

            string file = File;
            int line = Line;
            int column = Column;
            translator.Translate(ref file);
            translator.Translate(ref line);
            translator.Translate(ref column);
        }
开发者ID:cameron314,项目名称:msbuild,代码行数:16,代码来源:ElementLocation.cs

示例4: FactoryForTranslation

        static public AssemblyLoadInfo FactoryForTranslation(INodePacketTranslator translator)
        {
            string assemblyName = null;
            string assemblyFile = null;
            translator.Translate(ref assemblyName);
            translator.Translate(ref assemblyFile);

            return Create(assemblyName, assemblyFile);
        }
开发者ID:cameron314,项目名称:msbuild,代码行数:9,代码来源:AssemblyLoadInfo.cs

示例5:

 /// <summary>
 /// Function for serialization.
 /// </summary>
 void INodePacketTranslatable.Translate(INodePacketTranslator translator)
 {
     translator.Translate(ref _toolsVersion);
     translator.Translate(ref _toolsPath);
     translator.TranslateProjectPropertyInstanceDictionary(ref _properties);
     translator.TranslateProjectPropertyInstanceDictionary(ref _environmentProperties);
     translator.TranslateProjectPropertyInstanceDictionary(ref _globalProperties);
     translator.TranslateDictionary(ref _subToolsets, StringComparer.OrdinalIgnoreCase, SubToolset.FactoryForDeserialization);
     translator.Translate(ref _overrideTasksPath);
     translator.Translate(ref _defaultOverrideToolsVersion);
 }
开发者ID:cameron314,项目名称:msbuild,代码行数:14,代码来源:Toolset.cs

示例6: Translate

 /// <summary>
 /// Translates the packet to/from binary form.
 /// </summary>
 /// <param name="translator">The translator to use.</param>
 public void Translate(INodePacketTranslator translator)
 {
     translator.Translate(ref _nodeId);
     translator.Translate(ref _startupDirectory);
     translator.TranslateDictionary(ref _buildProcessEnvironment, StringComparer.OrdinalIgnoreCase);
     translator.TranslateCulture(ref _culture);
     translator.TranslateCulture(ref _uiCulture);
     translator.TranslateDotNet(ref _appDomainSetup);
     translator.Translate(ref _lineNumberOfTask);
     translator.Translate(ref _columnNumberOfTask);
     translator.Translate(ref _projectFileOfTask);
     translator.Translate(ref _taskName);
     translator.Translate(ref _taskLocation);
     translator.TranslateDictionary(ref _taskParameters, StringComparer.OrdinalIgnoreCase, TaskParameter.FactoryForDeserialization);
     translator.Translate(ref _continueOnError);
 }
开发者ID:cameron314,项目名称:msbuild,代码行数:20,代码来源:TaskHostConfiguration.cs

示例7: ReadTaskBuildErrorEventFromStream

        /// <summary>
        /// Read and reconstruct a BuildErrorEventArgs from the stream
        /// </summary>
        private BuildErrorEventArgs ReadTaskBuildErrorEventFromStream(INodePacketTranslator translator, string message, string helpKeyword, string senderName)
        {
            string code = null;
            translator.Translate(ref code);

            int columnNumber = -1;
            translator.Translate(ref columnNumber);

            int endColumnNumber = -1;
            translator.Translate(ref endColumnNumber);

            int endLineNumber = -1;
            translator.Translate(ref endLineNumber);

            string file = null;
            translator.Translate(ref file);

            int lineNumber = -1;
            translator.Translate(ref lineNumber);

            string subCategory = null;
            translator.Translate(ref subCategory);

            BuildErrorEventArgs buildEvent =
                new BuildErrorEventArgs(
                        subCategory,
                        code,
                        file,
                        lineNumber,
                        columnNumber,
                        endLineNumber,
                        endColumnNumber,
                        message,
                        helpKeyword,
                        senderName);

            return buildEvent;
        }
开发者ID:cameron314,项目名称:msbuild,代码行数:41,代码来源:LogMessagePacketBase.cs

示例8: ReadExternalProjectFinishedEventFromStream

        /// <summary>
        /// Read and reconstruct a ProjectFinishedEventArgs from the stream
        /// </summary>
        private ExternalProjectFinishedEventArgs ReadExternalProjectFinishedEventFromStream(INodePacketTranslator translator, string message, string helpKeyword, string senderName)
        {
            string projectFile = null;
            translator.Translate(ref projectFile);

            bool succeeded = true;
            translator.Translate(ref succeeded);

            ExternalProjectFinishedEventArgs buildEvent =
                new ExternalProjectFinishedEventArgs(
                    message,
                    helpKeyword,
                    senderName,
                    projectFile,
                    succeeded);

            return buildEvent;
        }
开发者ID:cameron314,项目名称:msbuild,代码行数:21,代码来源:LogMessagePacketBase.cs

示例9: Translate

 /// <summary>
 /// Reads or writes the packet to the serializer.
 /// </summary>
 public void Translate(INodePacketTranslator translator)
 {
     translator.Translate(ref registryPath);
 }
开发者ID:cameron314,项目名称:msbuild,代码行数:7,代码来源:RegistryLocation.cs

示例10: Translate

 /// <summary>
 /// Translates the packet to/from binary form.
 /// </summary>
 /// <param name="translator">The translator to use.</param>
 public void Translate(INodePacketTranslator translator)
 {
     translator.Translate(ref _prepareForReuse);
 }
开发者ID:cameron314,项目名称:msbuild,代码行数:8,代码来源:NodeBuildComplete.cs

示例11:

 /// <summary>
 /// Reads or writes the packet to the serializer.
 /// </summary>
 void INodePacketTranslatable.Translate(INodePacketTranslator translator)
 {
     translator.Translate(ref _submissionId);
     translator.Translate(ref _configurationId);
     translator.Translate(ref _globalRequestId);
     translator.Translate(ref _parentGlobalRequestId);
     translator.Translate(ref _nodeRequestId);
     translator.Translate(ref _initialTargets);
     translator.Translate(ref _defaultTargets);
     translator.Translate(ref _circularDependency);
     translator.TranslateDotNet(ref _requestException);
     translator.TranslateDictionary<ConcurrentDictionary<string, TargetResult>, TargetResult>(ref _resultsByTarget, TargetResult.FactoryForDeserialization, CreateTargetResultDictionary);
     translator.Translate(ref _baseOverallResult);
     translator.Translate(ref _projectStateAfterBuild, ProjectInstance.FactoryForDeserialization);
     translator.Translate(ref _savedCurrentDirectory);
     translator.TranslateDictionary(ref _savedEnvironmentVariables, StringComparer.OrdinalIgnoreCase);
 }
开发者ID:cameron314,项目名称:msbuild,代码行数:20,代码来源:BuildResult.cs

示例12: Translate

 public void Translate(INodePacketTranslator translator)
 {
     translator.Translate(ref PropertyName);
     translator.Translate(ref MsBuildPropertyFormat);
     translator.Translate(ref SearchPaths);
 }
开发者ID:cdmihai,项目名称:msbuild,代码行数:6,代码来源:ProjectImportPathMatch.cs

示例13: Translate

 /// <summary>
 /// The translator, for serialization.
 /// </summary>
 public void Translate(INodePacketTranslator translator)
 {
     translator.Translate(ref _strings);
 }
开发者ID:cameron314,项目名称:msbuild,代码行数:7,代码来源:LookasideStringInterner.cs

示例14: Translate

 /// <summary>
 /// Serialization method.
 /// </summary>
 public void Translate(INodePacketTranslator translator)
 {
     translator.Translate(ref _blockedGlobalRequestId);
     translator.Translate(ref _targetsInProgress);
     translator.Translate(ref _blockingGlobalRequestId);
     translator.Translate(ref _blockingTarget);
     translator.TranslateEnum(ref _yieldAction, (int)_yieldAction);
     translator.TranslateArray(ref _buildRequests);
 }
开发者ID:cameron314,项目名称:msbuild,代码行数:12,代码来源:BuildRequestBlocker.cs

示例15: Translate

 /// <summary>
 /// Reads/writes this packet
 /// </summary>
 public void Translate(INodePacketTranslator translator)
 {
     translator.Translate(ref _nodeConfigId);
     translator.Translate(ref _globalConfigId);
     translator.Translate(ref _resultsNodeId);
 }
开发者ID:cameron314,项目名称:msbuild,代码行数:9,代码来源:BuildRequestConfigurationResponse.cs


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