XmlFormatExtensionPrefixAttribute 建構函式

定義

初始化 XmlFormatExtensionPrefixAttribute 類別的新執行個體。

多載

XmlFormatExtensionPrefixAttribute()

初始化 XmlFormatExtensionPrefixAttribute 類別的新執行個體。

XmlFormatExtensionPrefixAttribute(String, String)

初始化 XmlFormatExtensionPrefixAttribute 類別的新執行個體,設定 XML 命名空間和 XML 命名空間前置詞以供服務描述格式延伸使用。

XmlFormatExtensionPrefixAttribute()

來源:
XmlFormatExtensionPrefixAttribute.cs
來源:
XmlFormatExtensionPrefixAttribute.cs
來源:
XmlFormatExtensionPrefixAttribute.cs

初始化 XmlFormatExtensionPrefixAttribute 類別的新執行個體。

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

另請參閱

適用於

XmlFormatExtensionPrefixAttribute(String, String)

來源:
XmlFormatExtensionPrefixAttribute.cs
來源:
XmlFormatExtensionPrefixAttribute.cs
來源:
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

適用於