本文整理汇总了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;
}
}
示例2:
/// <summary>
/// Translates the sub-toolset.
/// </summary>
void INodePacketTranslatable.Translate(INodePacketTranslator translator)
{
translator.Translate(ref _subToolsetVersion);
translator.TranslateProjectPropertyInstanceDictionary(ref _properties);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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;
}
示例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;
}
示例9: Translate
/// <summary>
/// Reads or writes the packet to the serializer.
/// </summary>
public void Translate(INodePacketTranslator translator)
{
translator.Translate(ref registryPath);
}
示例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);
}
示例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);
}
示例12: Translate
public void Translate(INodePacketTranslator translator)
{
translator.Translate(ref PropertyName);
translator.Translate(ref MsBuildPropertyFormat);
translator.Translate(ref SearchPaths);
}
示例13: Translate
/// <summary>
/// The translator, for serialization.
/// </summary>
public void Translate(INodePacketTranslator translator)
{
translator.Translate(ref _strings);
}
示例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);
}
示例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);
}