Example #1
0
 /// <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 _buildParameters, BuildParameters.FactoryForDeserialization);
     translator.TranslateArray(ref _forwardingLoggers, LoggerDescription.FactoryForTranslation);
     translator.TranslateDotNet(ref _appDomainSetup);
 }
Example #2
0
        /// <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 _buildParameters, BuildParameters.FactoryForDeserialization);
            translator.TranslateArray(ref _forwardingLoggers, LoggerDescription.FactoryForTranslation);
#if FEATURE_BINARY_SERIALIZATION && FEATURE_APPDOMAIN
            translator.TranslateDotNet(ref _appDomainSetup);
#endif
        }
Example #3
0
 /// <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);
 }
 /// <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);
     translator.Translate(ref _partialBuildResult, packetTranslator => BuildResult.FactoryForDeserialization(packetTranslator));
 }
Example #5
0
            /// <summary>
            /// Translates an items store.
            /// </summary>
            public void Translate(INodePacketTranslator translator)
            {
                if (_compressedItems == null && translator.Mode == TranslationDirection.WriteToStream)
                {
                    CompressItemsIfNecessary();
                }

                // Note we only translate the serialized buffer (which contains the compressed and interned
                // representation of the items.)  If the actual items are needed (for instance on child nodes)
                // then the Items accessor will reconstitute them at the point they are needed.
                ErrorUtilities.VerifyThrow((translator.Mode == TranslationDirection.ReadFromStream) || ((_compressedItems == null) ^ (_uncompressedItems == null)), "One of the compressed or uncompressed items arrays should be null.");
                translator.Translate(ref _itemsCount);
                translator.Translate(ref _compressedItems);
                translator.TranslateArray(ref _uncompressedItems, TaskItem.FactoryForDeserialization);
            }
 /// <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);
 }
Example #7
0
 /// <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 _buildParameters, BuildParameters.FactoryForDeserialization);
     translator.TranslateArray(ref _forwardingLoggers, LoggerDescription.FactoryForTranslation);
     translator.TranslateDotNet(ref _appDomainSetup);
 }
Example #8
0
            /// <summary>
            /// Translates an items store.
            /// </summary>
            public void Translate(INodePacketTranslator translator)
            {
                if (_compressedItems == null && translator.Mode == TranslationDirection.WriteToStream)
                {
                    CompressItemsIfNecessary();
                }

                // Note we only translate the serialized buffer (which contains the compressed and interned
                // representation of the items.)  If the actual items are needed (for instance on child nodes)
                // then the Items accessor will reconstitute them at the point they are needed.
                ErrorUtilities.VerifyThrow((translator.Mode == TranslationDirection.ReadFromStream) || ((_compressedItems == null) ^ (_uncompressedItems == null)), "One of the compressed or uncompressed items arrays should be null.");
                translator.Translate(ref _itemsCount);
                translator.Translate(ref _compressedItems);
                translator.TranslateArray(ref _uncompressedItems, TaskItem.FactoryForDeserialization);
            }