Example #1
0
                private static bool AreParametersBuffered(bool isRequest, OperationFormatter operationFormatter)
                {
                    StreamFormatter streamFormatter = isRequest ? operationFormatter.requestStreamFormatter : operationFormatter.replyStreamFormatter;

                    return(streamFormatter == null);
                }
Example #2
0
            internal SerializeAsyncResult(StreamFormatter streamFormatter, XmlDictionaryWriter writer, object[] parameters, object returnValue,
                AsyncCallback callback, object state)
                : base(callback, state)
            {
                _streamFormatter = streamFormatter;
                _writer = writer;

                // As we use the Task-returning method for async operation,
                // we shouldn't get to this point. Throw exception just in case.
                throw ExceptionHelper.AsError(NotImplemented.ByDesign);
            }
Example #3
0
                private static bool AreParametersBuffered(bool isRequest, System.ServiceModel.Dispatcher.OperationFormatter operationFormatter)
                {
                    StreamFormatter formatter = isRequest ? operationFormatter.requestStreamFormatter : operationFormatter.replyStreamFormatter;

                    return(formatter == null);
                }
            internal SerializeAsyncResult(StreamFormatter streamFormatter, XmlDictionaryWriter writer, object[] parameters, object returnValue,
                AsyncCallback callback, object state)
                : base(callback, state)
            {
                this.streamFormatter = streamFormatter;
                this.writer = writer;
                bool completeSelf = true;

                Stream streamValue = streamFormatter.GetStreamAndWriteStartWrapperIfNecessary(writer, parameters, returnValue);
                IAsyncResult result = writer.WriteValueAsync(new OperationStreamProvider(streamValue)).AsAsyncResult(PrepareAsyncCompletion(handleEndSerialize), this);
                completeSelf = SyncContinue(result);

                // Note:  The current task implementation hard codes the "IAsyncResult.CompletedSynchronously" property to false, so this fast path will never
                // be hit, and we will always hop threads.  CSDMain #210220
                if (completeSelf)
                {
                    Complete(true);
                }
            }
Example #5
0
 internal SerializeAsyncResult(StreamFormatter streamFormatter, XmlDictionaryWriter writer, object[] parameters, object returnValue,
     AsyncCallback callback, object state)
     : base(callback, state)
 {
     _streamFormatter = streamFormatter;
     _writer = writer;
     throw ExceptionHelper.PlatformNotSupported("StreamFormatter.SerializeAsyncResult is not supported.");
 }