ContractReference.WriteDocument(Object, Stream) 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
전달된 서비스 설명을 전달된 Stream에 씁니다.
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)
매개 변수
- document
- Object
stream
에 쓸 ServiceDescription입니다.
- stream
- Stream
serialize된 Stream이 쓰여질 ServiceDescription입니다.
예제
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()