ContractReference.WriteDocument(Object, Stream) Método
Definición
Importante
Parte de la información hace referencia a la versión preliminar del producto, que puede haberse modificado sustancialmente antes de lanzar la versión definitiva. Microsoft no otorga ninguna garantía, explícita o implícita, con respecto a la información proporcionada aquí.
Escribe la descripción de servicios que se ha pasado en Stream que se ha pasado.
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)
Parámetros
- document
- Object
Objeto ServiceDescription que se va a escribir en el parámetro stream
.
- stream
- Stream
Stream donde se escribe ServiceDescription que se ha serializado.
Ejemplos
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()
Se aplica a
Consulte también
Colaborar con nosotros en GitHub
El origen de este contenido se puede encontrar en GitHub, donde también puede crear y revisar problemas y solicitudes de incorporación de cambios. Para más información, consulte nuestra guía para colaboradores.