XmlFormatExtensionPrefixAttribute 构造函数

定义

初始化 XmlFormatExtensionPrefixAttribute 类的新实例。

重载

XmlFormatExtensionPrefixAttribute()

初始化 XmlFormatExtensionPrefixAttribute 类的新实例。

XmlFormatExtensionPrefixAttribute(String, String)

初始化 XmlFormatExtensionPrefixAttribute 类的新实例,为服务说明格式扩展设置 XML 命名空间和 XML 命名空间前缀。

XmlFormatExtensionPrefixAttribute()

Source:
XmlFormatExtensionPrefixAttribute.cs
Source:
XmlFormatExtensionPrefixAttribute.cs
Source:
XmlFormatExtensionPrefixAttribute.cs

初始化 XmlFormatExtensionPrefixAttribute 类的新实例。

public:
 XmlFormatExtensionPrefixAttribute();
public XmlFormatExtensionPrefixAttribute ();
Public Sub New ()

另请参阅

适用于

XmlFormatExtensionPrefixAttribute(String, String)

Source:
XmlFormatExtensionPrefixAttribute.cs
Source:
XmlFormatExtensionPrefixAttribute.cs
Source:
XmlFormatExtensionPrefixAttribute.cs

初始化 XmlFormatExtensionPrefixAttribute 类的新实例,为服务说明格式扩展设置 XML 命名空间和 XML 命名空间前缀。

public:
 XmlFormatExtensionPrefixAttribute(System::String ^ prefix, System::String ^ ns);
public XmlFormatExtensionPrefixAttribute (string prefix, string ns);
new System.Web.Services.Configuration.XmlFormatExtensionPrefixAttribute : string * string -> System.Web.Services.Configuration.XmlFormatExtensionPrefixAttribute
Public Sub New (prefix As String, ns As String)

参数

prefix
String

与服务说明格式扩展关联的 XML 命名空间前缀。

ns
String

与服务说明格式扩展关联的 XML 命名空间。

示例

// The YMLOperationBinding class is part of the YML SDFE, as it is the
// class that is serialized into XML and is placed in the service
// description.
[XmlFormatExtension("action", YMLOperationBinding.YMLNamespace,
    typeof(OperationBinding))]
[XmlFormatExtensionPrefix("yml", YMLOperationBinding.YMLNamespace)]
public class YMLOperationBinding : ServiceDescriptionFormatExtension
{
    private Boolean reverse;

    public const string YMLNamespace = "http://www.contoso.com/yml";

    [XmlElement("Reverse")]
    public Boolean Reverse
    {
        get { return reverse; }
        set { reverse = value; }
    }
}
' The YMLOperationBinding class is part of the YML SDFE, as it is the
' class that is serialized into XML and is placed in the service
' description.
<XmlFormatExtension("action", YMLOperationBinding.YMLNamespace, _
    GetType(OperationBinding)), _
    XmlFormatExtensionPrefix("yml", YMLOperationBinding.YMLNamespace)> _
Public Class YMLOperationBinding
    Inherits ServiceDescriptionFormatExtension
    Private _reverse As Boolean
    Public Const YMLNamespace As String = "http://www.contoso.com/yml"

    <XmlElement("Reverse")> _
    Public Property Reverse() As Boolean
        Get
            Return _reverse
        End Get
        Set(ByVal Value As Boolean)
            _reverse = Value
        End Set
    End Property

End Class

适用于