Freigeben über


XmlFormatExtensionPrefixAttribute-Konstruktor (String, String)

Initialisiert eine neue Instanz der XmlFormatExtensionPrefixAttribute-Klasse, wobei der XML-Namespace und das XML-Namespacepräfix für eine Formaterweiterung der Dienstbeschreibung festgelegt werden.

Namespace: System.Web.Services.Configuration
Assembly: System.Web.Services (in system.web.services.dll)

Syntax

'Declaration
Public Sub New ( _
    prefix As String, _
    ns As String _
)
'Usage
Dim prefix As String
Dim ns As String

Dim instance As New XmlFormatExtensionPrefixAttribute(prefix, ns)
public XmlFormatExtensionPrefixAttribute (
    string prefix,
    string ns
)
public:
XmlFormatExtensionPrefixAttribute (
    String^ prefix, 
    String^ ns
)
public XmlFormatExtensionPrefixAttribute (
    String prefix, 
    String ns
)
public function XmlFormatExtensionPrefixAttribute (
    prefix : String, 
    ns : String
)

Parameter

  • prefix
    Das XML-Namespacepräfix, das einer Formaterweiterung der Dienstbeschreibung zugeordnet ist.
  • ns
    Der XML-Namespace, der einer Formaterweiterung der Dienstbeschreibung zugeordnet ist.

Beispiel

' 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 = "https://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
// 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 = "https://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.
/** @attribute XmlFormatExtension("action", YMLOperationBinding.YMLNamespace, 
    OperationBinding.class)
 */
/** @attribute XmlFormatExtensionPrefix("yml", YMLOperationBinding.YMLNamespace)
 */
public class YMLOperationBinding extends ServiceDescriptionFormatExtension
{
    private Boolean reverse;
    public final static String YMLNamespace = "https://www.contoso.com/yml";

    /** @attribute XmlElement("Reverse")
     */
    /** @property 
     */
    public Boolean get_Reverse()
    {
        return reverse;
    } //get_Reverse

    /** @property 
     */
    public void set_Reverse(Boolean value)
    {
        reverse = value;
    } //set_Reverse
} //YMLOperationBinding

Plattformen

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen.

Versionsinformationen

.NET Framework

Unterstützt in: 2.0, 1.1, 1.0

Siehe auch

Referenz

XmlFormatExtensionPrefixAttribute-Klasse
XmlFormatExtensionPrefixAttribute-Member
System.Web.Services.Configuration-Namespace