Beispiel #1
0
        internal async Task SerializeAsync(XmlDictionaryWriter writer, object[] parameters, object returnValue)
        {
            Stream streamValue = await GetStreamAndWriteStartWrapperIfNecessaryAsync(writer, parameters, returnValue);

            var streamProvider = new OperationStreamProvider(streamValue);
            await StreamFormatterHelper.WriteValueAsync(writer, streamProvider);

            await WriteEndWrapperIfNecessaryAsync(writer);
        }
Beispiel #2
0
 internal async Task SerializeAsync(XmlDictionaryWriter writer, object[] parameters, object returnValue)
 {
     using (TaskHelpers.RunTaskContinuationsOnOurThreads()) // If inner stream doesn't have sync implementation, don't continue on thread pool.
     {
         // TODO: For NetStandard 2.0, use async methods on writer
         Stream streamValue    = GetStreamAndWriteStartWrapperIfNecessary(writer, parameters, returnValue);
         var    streamProvider = new OperationStreamProvider(streamValue);
         await StreamFormatterHelper.WriteValueAsync(writer, streamProvider);
         await WriteEndWrapperIfNecessaryAsync(writer);
     }
 }