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


C# INodePacketTranslator.TranslateEnum方法代码示例

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


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

示例1: Translate

        /// <summary>
        /// Reads/writes this packet
        /// </summary>
        public void 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 _targets);
            translator.Translate(ref _parentBuildEventContext);
            translator.Translate(ref _buildEventContext);
            translator.TranslateEnum(ref _buildRequestDataFlags, (int)_buildRequestDataFlags);

            // UNDONE: (Compat) Serialize the host object.
        }
开发者ID:cameron314,项目名称:msbuild,代码行数:17,代码来源:BuildRequest.cs

示例2: Translate

 /// <summary>
 /// Serializes or deserializes a packet.
 /// </summary>
 public void Translate(INodePacketTranslator translator)
 {
     translator.TranslateEnum(ref _reason, (int)_reason);
     translator.TranslateDotNet(ref _exception);
 }
开发者ID:cameron314,项目名称:msbuild,代码行数:8,代码来源:NodeShutdown.cs

示例3: ReadBuildMessageEventFromStream

        /// <summary>
        /// Read and reconstruct a BuildMessageEventArgs from the stream 
        /// </summary>
        private BuildMessageEventArgs ReadBuildMessageEventFromStream(INodePacketTranslator translator, string message, string helpKeyword, string senderName)
        {
            MessageImportance importance = MessageImportance.Normal;

            translator.TranslateEnum(ref importance, (int)importance);

            BuildMessageEventArgs buildEvent = new BuildMessageEventArgs(message, helpKeyword, senderName, importance);
            return buildEvent;
        }
开发者ID:cameron314,项目名称:msbuild,代码行数:12,代码来源:LogMessagePacketBase.cs

示例4: Translate

 /// <summary>
 /// Translator.
 /// </summary>
 public void Translate(INodePacketTranslator translator)
 {
     translator.TranslateEnum(ref _resultCode, (int)_resultCode);
     translator.TranslateEnum(ref _actionCode, (int)_actionCode);
     translator.TranslateDotNet(ref _exception);
 }
开发者ID:cameron314,项目名称:msbuild,代码行数:9,代码来源:WorkUnitResult.cs

示例5: WriteBuildMessageEventToStream

 /// <summary>
 /// Write a "standard" Message Log the translator 
 /// </summary>
 private void WriteBuildMessageEventToStream(BuildMessageEventArgs buildMessageEventArgs, INodePacketTranslator translator)
 {
     MessageImportance importance = buildMessageEventArgs.Importance;
     translator.TranslateEnum(ref importance, (int)importance);
 }
开发者ID:cameron314,项目名称:msbuild,代码行数:8,代码来源:LogMessagePacketBase.cs

示例6: ReadTaskCommandLineEventFromStream

        /// <summary>
        /// Read and reconstruct a TaskCommandLineEventArgs from the stream
        /// </summary>
        private TaskCommandLineEventArgs ReadTaskCommandLineEventFromStream(INodePacketTranslator translator, string message, string helpKeyword, string senderName)
        {
            MessageImportance importance = MessageImportance.Normal;
            translator.TranslateEnum(ref importance, (int)importance);

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

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

            TaskCommandLineEventArgs buildEvent = new TaskCommandLineEventArgs(commandLine, taskName, importance);
            return buildEvent;
        }
开发者ID:cameron314,项目名称:msbuild,代码行数:17,代码来源:LogMessagePacketBase.cs

示例7: WriteTaskCommandLineEventToStream

        /// <summary>
        /// Write Task Command Line log message into the translator
        /// </summary>
        private void WriteTaskCommandLineEventToStream(TaskCommandLineEventArgs taskCommandLineEventArgs, INodePacketTranslator translator)
        {
            MessageImportance importance = taskCommandLineEventArgs.Importance;
            translator.TranslateEnum(ref importance, (int)importance);

            string commandLine = taskCommandLineEventArgs.CommandLine;
            translator.Translate(ref commandLine);

            string taskName = taskCommandLineEventArgs.TaskName;
            translator.Translate(ref taskName);
        }
开发者ID:cameron314,项目名称:msbuild,代码行数:14,代码来源:LogMessagePacketBase.cs

示例8: Translate

 /// <summary>
 /// Reads/writes this packet
 /// </summary>
 public void Translate(INodePacketTranslator translator)
 {
     translator.TranslateEnum(ref _eventType, (int)_eventType);
     translator.Translate(ref _sinkId);
     if (translator.Mode == TranslationDirection.ReadFromStream)
     {
         ReadFromStream(translator);
     }
     else
     {
         WriteToStream(translator);
     }
 }
开发者ID:cameron314,项目名称:msbuild,代码行数:16,代码来源:LogMessagePacketBase.cs

示例9: 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

示例10:

 void INodePacketTranslatable.Translate(INodePacketTranslator translator)
 {
     translator.Translate(ref _loggerClassName);
     translator.Translate(ref _loggerSwitchParameters);
     translator.Translate(ref _loggerAssembly, AssemblyLoadInfo.FactoryForTranslation);
     translator.TranslateEnum(ref _verbosity, (int)_verbosity);
     translator.Translate(ref _loggerId);
 }
开发者ID:cameron314,项目名称:msbuild,代码行数:8,代码来源:LoggerDescription.cs

示例11: Translate

 /// <summary>
 /// Translates the packet to/from binary form.
 /// </summary>
 /// <param name="translator">The translator to use.</param>
 public void Translate(INodePacketTranslator translator)
 {
     translator.TranslateEnum(ref _taskResult, (int)_taskResult);
     translator.TranslateDotNet(ref _taskException);
     translator.Translate(ref _taskExceptionMessage);
     translator.Translate(ref _taskExceptionMessageArgs);
     translator.TranslateDictionary(ref _taskOutputParameters, StringComparer.OrdinalIgnoreCase, TaskParameter.FactoryForDeserialization);
     translator.TranslateDictionary(ref _buildProcessEnvironment, StringComparer.OrdinalIgnoreCase);
 }
开发者ID:cameron314,项目名称:msbuild,代码行数:13,代码来源:TaskHostTaskComplete.cs


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