共用方式為


DiscoveryDocumentReference.WriteDocument(Object, Stream) 方法

定義

將傳遞的 DiscoveryDocument 寫入至傳遞的 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

要寫入至 streamDiscoveryDocument

stream
Stream

Stream,序列化探索文件寫入至其中。

範例

FileStream^ myFileStream = gcnew FileStream( "Temp::vsdisco",FileMode::OpenOrCreate,FileAccess::Write );
myDiscoveryDocumentReference->WriteDocument( myDiscoveryDocument, myFileStream );
myFileStream->Close();
FileStream myFileStream = new FileStream("Temp.vsdisco",
    FileMode.OpenOrCreate, FileAccess.Write);
myDiscoveryDocumentReference.WriteDocument(
    myDiscoveryDocument, myFileStream);
myFileStream.Close();
Dim myFileStream As New FileStream("Temp.vsdisco", _
     FileMode.OpenOrCreate, FileAccess.Write)
myDiscoveryDocumentReference.WriteDocument( _
     myDiscoveryDocument, myFileStream)
myFileStream.Close()

適用於

另請參閱