PeerContact.FromXml(String) 方法

定义

基于提供的 XML 数据创建一个 PeerContact 实例。Creates a PeerContact instance based on provided XML data.

public:
 static System::Net::PeerToPeer::Collaboration::PeerContact ^ FromXml(System::String ^ peerContactXml);
[System.Security.SecurityCritical]
public static System.Net.PeerToPeer.Collaboration.PeerContact FromXml (string peerContactXml);
[<System.Security.SecurityCritical>]
static member FromXml : string -> System.Net.PeerToPeer.Collaboration.PeerContact
Public Shared Function FromXml (peerContactXml As String) As PeerContact

参数

peerContactXml
String

用于重新构造 PeerContact 的 XML 编码。The XML encoding used to reconstruct the PeerContact.

返回

PeerContact

一个字符串,表示用于编写 PeerContact 实例的 XML 对象模型。A string that represents the XML object model for encoding the PeerContact instance.

属性

例外

参数不能为 nullParameter cannot be null.

- 无法完成 FromXml(String) 操作- Unable to complete FromXml(String) operation - 参数不是有效的 FromXml(SecurityElement) 对象。- Parameter is not a valid FromXml(SecurityElement) object.

注解

作为参数传递的字符串应从获取 ToXmlThe string to pass as the parameter should be obtained from ToXml.

此类旨在作为简单 XML 对象模型的轻型实现,以便在协作基础结构中使用,而不是用作常规 XML 对象模型。This class is intended to be a lightweight implementation of a simple XML object model for use within the collaboration infrastructure, and not for use as a general XML object model.

适用于