Edit

Share via


XmlFormatExtensionPrefixAttribute Constructors

Definition

Initializes a new instance of the XmlFormatExtensionPrefixAttribute class.

Overloads

XmlFormatExtensionPrefixAttribute()

Initializes a new instance of the XmlFormatExtensionPrefixAttribute class.

XmlFormatExtensionPrefixAttribute(String, String)

Initializes a new instance of the XmlFormatExtensionPrefixAttribute class, setting the XML namespace and XML namespace prefix for a service description format extension.

XmlFormatExtensionPrefixAttribute()

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

Initializes a new instance of the XmlFormatExtensionPrefixAttribute class.

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

See also

Applies to

XmlFormatExtensionPrefixAttribute(String, String)

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

Initializes a new instance of the XmlFormatExtensionPrefixAttribute class, setting the XML namespace and XML namespace prefix for a service description format extension.

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)

Parameters

prefix
String

The XML namespace prefix associated with a service description format extension.

ns
String

The XML namespace associated with a service description format extension.

Examples

// 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

Applies to