120 references to TranslationDirection
Microsoft.Build (71)
AssemblyLoadInfo.cs (1)
102ErrorUtilities.VerifyThrow(translator.Mode == TranslationDirection.WriteToStream, "write only");
BackEnd\Components\Caching\ConfigCache.cs (1)
367if (translator.Mode == TranslationDirection.WriteToStream)
BackEnd\Components\Caching\ResultsCache.cs (1)
254if (translator.Mode == TranslationDirection.ReadFromStream)
BackEnd\Components\Communications\LogMessagePacket.cs (2)
52if (translator.Mode == TranslationDirection.WriteToStream) 66if (translator.Mode == TranslationDirection.ReadFromStream)
BackEnd\Components\Communications\TranslatorExtensions.cs (2)
37if (translator.Mode == TranslationDirection.ReadFromStream) 103if (translator.Mode == TranslationDirection.ReadFromStream)
BackEnd\Components\SdkResolution\TranslationHelpers.cs (4)
20if (t.Mode == TranslationDirection.WriteToStream) 31if (t.Mode == TranslationDirection.ReadFromStream) 42if (t.Mode == TranslationDirection.WriteToStream) 51if (t.Mode == TranslationDirection.ReadFromStream)
BackEnd\Shared\BuildRequestConfiguration.cs (6)
707using ITranslator translator = GetConfigurationTranslator(TranslationDirection.WriteToStream, stream); 746using ITranslator translator = GetConfigurationTranslator(TranslationDirection.ReadFromStream, stream); 917if (translator.Mode == TranslationDirection.WriteToStream && _transferredProperties == null) 935if (translator.Mode == TranslationDirection.ReadFromStream && _transferredState?.TranslateEntireState == true) 1069private ITranslator GetConfigurationTranslator(TranslationDirection direction, Stream stream) => 1070direction == TranslationDirection.WriteToStream
BackEnd\Shared\BuildResult.cs (2)
649if (translator.Mode == TranslationDirection.WriteToStream) 660else if (translator.Mode == TranslationDirection.ReadFromStream)
BackEnd\Shared\TargetResult.cs (6)
184if (translator.Mode == TranslationDirection.WriteToStream) 255using ITranslator translator = GetResultsCacheTranslator(TranslationDirection.WriteToStream, stream); 292using ITranslator translator = GetResultsCacheTranslator(TranslationDirection.ReadFromStream, stream); 305if (translator.Mode == TranslationDirection.WriteToStream) 352private static ITranslator GetResultsCacheTranslator(TranslationDirection direction, Stream stream) => 353direction == TranslationDirection.WriteToStream
ElementLocation\ElementLocation.cs (1)
143ErrorUtilities.VerifyThrow(translator.Mode == TranslationDirection.WriteToStream, "write only");
Instance\HostServices.cs (2)
309if (translator.Mode == TranslationDirection.ReadFromStream) 335if (translator.Mode == TranslationDirection.WriteToStream)
Instance\ProjectInstance.cs (4)
2363if (translator.Mode == TranslationDirection.WriteToStream) 2451if (translator.Mode == TranslationDirection.ReadFromStream) 2487if (translator.Mode == TranslationDirection.ReadFromStream) 2778if (translator.Mode == TranslationDirection.WriteToStream)
Instance\ProjectItemGroupTaskInstance.cs (1)
128if (translator.Mode == TranslationDirection.WriteToStream)
Instance\ProjectItemInstance.cs (1)
1759if (translator.Mode == TranslationDirection.WriteToStream)
Instance\ProjectMetadataInstance.cs (1)
178ErrorUtilities.VerifyThrow(translator.Mode == TranslationDirection.WriteToStream, "write only");
Instance\ProjectOnErrorInstance.cs (1)
117if (translator.Mode == TranslationDirection.WriteToStream)
Instance\ProjectPropertyGroupTaskInstance.cs (1)
127if (translator.Mode == TranslationDirection.WriteToStream)
Instance\ProjectPropertyInstance.cs (2)
174ErrorUtilities.VerifyThrow(translator.Mode == TranslationDirection.WriteToStream, "write only"); 273ErrorUtilities.VerifyThrow(translator.Mode == TranslationDirection.ReadFromStream, "read only");
Instance\ProjectTargetInstance.cs (1)
578if (translator.Mode == TranslationDirection.ReadFromStream)
Instance\ProjectTaskInstance.cs (3)
360if (translator.Mode == TranslationDirection.WriteToStream) 385if (translator.Mode == TranslationDirection.ReadFromStream && localParameters != null) 398if (translator.Mode == TranslationDirection.WriteToStream)
Instance\ProjectTaskOutputItemInstance.cs (1)
138if (translator.Mode == TranslationDirection.WriteToStream)
Instance\ProjectTaskOutputPropertyInstance.cs (1)
138if (translator.Mode == TranslationDirection.WriteToStream)
Instance\TaskRegistry.cs (4)
1057if (translator.Mode == TranslationDirection.ReadFromStream && taskIdentityParameters != null) 1787var writing = translator.Mode == TranslationDirection.WriteToStream; 1822if (translator.Mode == TranslationDirection.ReadFromStream && localParameters != null) 1844if (translator.Mode == TranslationDirection.ReadFromStream)
LogMessagePacketBase.cs (1)
407if (translator.Mode == TranslationDirection.ReadFromStream)
TaskParameter.cs (11)
347if (translator.Mode == TranslationDirection.WriteToStream) 379if (translator.Mode == TranslationDirection.WriteToStream) 396ErrorUtilities.VerifyThrow(translator.Mode == TranslationDirection.WriteToStream, "Cannot call this method when reading!"); 463ErrorUtilities.VerifyThrow(translator.Mode == TranslationDirection.ReadFromStream, "Cannot call this method when writing!"); 489if (translator.Mode == TranslationDirection.WriteToStream) 562if (translator.Mode == TranslationDirection.WriteToStream) 569if (translator.Mode == TranslationDirection.ReadFromStream) 606if (translator.Mode == TranslationDirection.WriteToStream) 665if (translator.Mode == TranslationDirection.WriteToStream) 672if (translator.Mode == TranslationDirection.ReadFromStream) 689if (translator.Mode == TranslationDirection.WriteToStream)
TranslatorHelpers.cs (10)
38if (translator.Mode == TranslationDirection.ReadFromStream) 125if (translator.Mode == TranslationDirection.WriteToStream) 131if (translator.Mode == TranslationDirection.ReadFromStream) 142if (translator.Mode == TranslationDirection.WriteToStream) 161if (translator.Mode == TranslationDirection.WriteToStream) 168if (translator.Mode == TranslationDirection.ReadFromStream) 186if (translator.Mode == TranslationDirection.WriteToStream) 199if (translator.Mode == TranslationDirection.ReadFromStream) 235if (translator.Mode == TranslationDirection.WriteToStream) 262if (translator.Mode == TranslationDirection.ReadFromStream)
Microsoft.Build.Engine.UnitTests (6)
BackEnd\BinaryTranslator_Tests.cs (6)
41Assert.Equal(TranslationDirection.ReadFromStream, readTranslator.Mode); 44Assert.Equal(TranslationDirection.WriteToStream, writeTranslator.Mode); 175TranslationDirection value = TranslationDirection.ReadFromStream; 178TranslationDirection deserializedValue = TranslationDirection.WriteToStream;
Microsoft.Build.Framework (5)
BinaryTranslator.cs (4)
111public TranslationDirection Mode 115{ return TranslationDirection.ReadFromStream; } 866public TranslationDirection Mode 870{ return TranslationDirection.WriteToStream; }
ITranslator.cs (1)
72TranslationDirection Mode
Microsoft.Build.Tasks.Core (13)
SystemState.cs (1)
269ref (translator.Mode == TranslationDirection.WriteToStream) ? ref instanceLocalOutgoingFileStateCache : ref instanceLocalFileStateCache,
TaskTranslatorHelpers.cs (2)
25if (translator.Mode == TranslationDirection.WriteToStream) 36if (translator.Mode == TranslationDirection.ReadFromStream)
TranslatorHelpers.cs (10)
38if (translator.Mode == TranslationDirection.ReadFromStream) 125if (translator.Mode == TranslationDirection.WriteToStream) 131if (translator.Mode == TranslationDirection.ReadFromStream) 142if (translator.Mode == TranslationDirection.WriteToStream) 161if (translator.Mode == TranslationDirection.WriteToStream) 168if (translator.Mode == TranslationDirection.ReadFromStream) 186if (translator.Mode == TranslationDirection.WriteToStream) 199if (translator.Mode == TranslationDirection.ReadFromStream) 235if (translator.Mode == TranslationDirection.WriteToStream) 262if (translator.Mode == TranslationDirection.ReadFromStream)
MSBuild (25)
AssemblyLoadInfo.cs (1)
102ErrorUtilities.VerifyThrow(translator.Mode == TranslationDirection.WriteToStream, "write only");
LogMessagePacketBase.cs (1)
407if (translator.Mode == TranslationDirection.ReadFromStream)
TaskHostConfiguration.cs (2)
423if (translator.Mode == TranslationDirection.WriteToStream) 430if (translator.Mode == TranslationDirection.ReadFromStream)
TaskParameter.cs (11)
347if (translator.Mode == TranslationDirection.WriteToStream) 379if (translator.Mode == TranslationDirection.WriteToStream) 396ErrorUtilities.VerifyThrow(translator.Mode == TranslationDirection.WriteToStream, "Cannot call this method when reading!"); 463ErrorUtilities.VerifyThrow(translator.Mode == TranslationDirection.ReadFromStream, "Cannot call this method when writing!"); 489if (translator.Mode == TranslationDirection.WriteToStream) 562if (translator.Mode == TranslationDirection.WriteToStream) 569if (translator.Mode == TranslationDirection.ReadFromStream) 606if (translator.Mode == TranslationDirection.WriteToStream) 665if (translator.Mode == TranslationDirection.WriteToStream) 672if (translator.Mode == TranslationDirection.ReadFromStream) 689if (translator.Mode == TranslationDirection.WriteToStream)
TranslatorHelpers.cs (10)
38if (translator.Mode == TranslationDirection.ReadFromStream) 125if (translator.Mode == TranslationDirection.WriteToStream) 131if (translator.Mode == TranslationDirection.ReadFromStream) 142if (translator.Mode == TranslationDirection.WriteToStream) 161if (translator.Mode == TranslationDirection.WriteToStream) 168if (translator.Mode == TranslationDirection.ReadFromStream) 186if (translator.Mode == TranslationDirection.WriteToStream) 199if (translator.Mode == TranslationDirection.ReadFromStream) 235if (translator.Mode == TranslationDirection.WriteToStream) 262if (translator.Mode == TranslationDirection.ReadFromStream)