Procedura: Implementare il metodo ChainStream per salvare riferimenti in oggetti Stream
Nell'esempio seguente viene illustrata un'implementazione del metodo comune ChainStream.
Esempio
' Save the Stream representing the SOAP request or SOAP response
' into a local memory buffer.
Public Overrides Function ChainStream(stream As Stream) As Stream
' Save the passed in Stream in a member variable.
oldStream = stream
' Create a new instance of a Stream and save that in a member
' variable.
newStream = New MemoryStream()
Return newStream
End Function
// Save the Stream representing the SOAP request or SOAP response into
// a local memory buffer.
public override Stream ChainStream( Stream stream ){
// Save the passed in Stream in a member variable.
oldStream = stream;
// Create a new instance of a Stream and save that in a member
// variable.
newStream = new MemoryStream();
return newStream;
}
Vedere anche
Attività
Procedura dettagliata: Modifica di messaggi SOAP utilizzando estensioni SOAP
Copyright © 2007 Microsoft Corporation. Tutti i diritti riservati.