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()

适用于

另请参阅