XmlStreamStore 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
初始化 XmlStreamStore 類別的新執行個體。
多載
| 名稱 | Description |
|---|---|
| XmlStreamStore(Stream) |
初始化類別的新實例 XmlStreamStore ,並指定 I/O Stream。 |
| XmlStreamStore(Stream, IDictionary<Uri,IList<Uri>>) |
初始化一個新的類別實例 XmlStreamStore ,並設定指定的 I/O Stream 及已知相容命名空間的字典。 |
XmlStreamStore(Stream)
初始化類別的新實例 XmlStreamStore ,並指定 I/O Stream。
public:
XmlStreamStore(System::IO::Stream ^ stream);
public XmlStreamStore(System.IO.Stream stream);
new System.Windows.Annotations.Storage.XmlStreamStore : System.IO.Stream -> System.Windows.Annotations.Storage.XmlStreamStore
Public Sub New (stream As Stream)
參數
- stream
- Stream
用於讀取和寫入使用者註解的 I/O 串流。
備註
stream 必須採用有效的 XML 格式,並符合 Microsoft Annotations Framework 架構。
適用於
XmlStreamStore(Stream, IDictionary<Uri,IList<Uri>>)
初始化一個新的類別實例 XmlStreamStore ,並設定指定的 I/O Stream 及已知相容命名空間的字典。
public:
XmlStreamStore(System::IO::Stream ^ stream, System::Collections::Generic::IDictionary<Uri ^, System::Collections::Generic::IList<Uri ^> ^> ^ knownNamespaces);
public XmlStreamStore(System.IO.Stream stream, System.Collections.Generic.IDictionary<Uri,System.Collections.Generic.IList<Uri>> knownNamespaces);
new System.Windows.Annotations.Storage.XmlStreamStore : System.IO.Stream * System.Collections.Generic.IDictionary<Uri, System.Collections.Generic.IList<Uri>> -> System.Windows.Annotations.Storage.XmlStreamStore
Public Sub New (stream As Stream, knownNamespaces As IDictionary(Of Uri, IList(Of Uri)))
參數
- stream
- Stream
用於讀取和寫入使用者註解的 I/O 串流。
- knownNamespaces
- IDictionary<Uri,IList<Uri>>
一個包含已知相容命名空間清單的字典。
例外狀況
stream 是 null。
stream 包含無效 XML 的 XML。
備註
此 XmlStreamStore 建構器允許註冊特定應用程式的已知命名空間。
字 knownNamespace 典定義了應用程式命名空間,當你將自訂內容作為註解的一部分儲存時所使用。 字典鍵是應用程式已知的主要命名空間。 命名空間鍵與一個與「鍵」命名空間相容的舊命名空間值清單相關聯。 當註解載入時,這個清單中的所有命名空間都會被「key」命名空間取代。
stream 必須採用有效的 XML 格式,並符合 註解結構。