ContractReference.WriteDocument(Object, Stream) Metodo
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Inserisce la descrizione di servizio passata nell'oggetto Stream passato.
public:
override void WriteDocument(System::Object ^ document, System::IO::Stream ^ stream);
public override void WriteDocument (object document, System.IO.Stream stream);
override this.WriteDocument : obj * System.IO.Stream -> unit
Public Overrides Sub WriteDocument (document As Object, stream As Stream)
Parametri
- document
- Object
Oggetto ServiceDescription da inserire in stream
.
- stream
- Stream
Oggetto Stream in cui viene scritto l'oggetto ServiceDescription serializzato.
Esempio
ContractReference^ myContractReference = gcnew ContractReference;
FileStream^ myFileStream = gcnew FileStream( "TestOutput_cpp.wsdl",
FileMode::OpenOrCreate,FileAccess::Write );
// Get the ServiceDescription for the test .wsdl file.
ServiceDescription^ myServiceDescription =
ServiceDescription::Read( "TestInput_cpp.wsdl" );
// Write the ServiceDescription into the file stream.
myContractReference->WriteDocument( myServiceDescription, myFileStream );
Console::WriteLine( "ServiceDescription is written "
+ "into the file stream successfully." );
Console::WriteLine( "The number of bytes written into the file stream: {0}",
myFileStream->Length );
myFileStream->Close();
ContractReference myContractReference = new ContractReference();
FileStream myFileStream = new FileStream( "TestOutput_cs.wsdl",
FileMode.OpenOrCreate, FileAccess.Write );
// Get the ServiceDescription for the test .wsdl file.
ServiceDescription myServiceDescription =
ServiceDescription.Read("TestInput_cs.wsdl");
// Write the ServiceDescription into the file stream.
myContractReference.WriteDocument(myServiceDescription, myFileStream);
Console.WriteLine("ServiceDescription is written "
+ "into the file stream successfully.");
Console.WriteLine("The number of bytes written into the file stream: "
+ myFileStream.Length);
myFileStream.Close();
Dim myContractReference As New ContractReference()
Dim myFileStream As New FileStream("TestOutput_vb.wsdl", _
FileMode.OpenOrCreate, FileAccess.Write)
' Get the ServiceDescription for the test .wsdl file.
Dim myServiceDescription As ServiceDescription = _
ServiceDescription.Read("TestInput_vb.wsdl")
' Write the ServiceDescription into the file stream.
myContractReference.WriteDocument(myServiceDescription, myFileStream)
Console.WriteLine("ServiceDescription is written " + _
"into the file stream successfully.")
Console.WriteLine("The number of bytes written into the file stream: " + _
myFileStream.Length.ToString())
myFileStream.Close()
Si applica a
Vedi anche
Collabora con noi su GitHub
L'origine di questo contenuto è disponibile in GitHub, in cui è anche possibile creare ed esaminare i problemi e le richieste pull. Per ulteriori informazioni, vedere la guida per i collaboratori.