本文整理汇总了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.
}
示例2: Translate
/// <summary>
/// Serializes or deserializes a packet.
/// </summary>
public void Translate(INodePacketTranslator translator)
{
translator.TranslateEnum(ref _reason, (int)_reason);
translator.TranslateDotNet(ref _exception);
}
示例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;
}
示例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);
}
示例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);
}
示例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;
}
示例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);
}
示例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);
}
}
示例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);
}
示例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);
}
示例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);
}