This documentation is archived and is not being maintained.

XmlFormatExtensionAttribute Constructor

.NET Framework 1.1

Initializes a new instance of the XmlFormatExtensionAttribute class.

Overload List

Initializes a new instance of the XmlFormatExtensionAttribute class.

[Visual Basic] Public Sub New()
[C#] public XmlFormatExtensionAttribute();
[C++] public: XmlFormatExtensionAttribute();
[JScript] public function XmlFormatExtensionAttribute();

Initializes a new instance of the XmlFormatExtensionAttribute class specifying the XML element and namespace to add when running at the specified extension point.

[Visual Basic] Public Sub New(String, String, Type)
[C#] public XmlFormatExtensionAttribute(string, string, Type);
[C++] public: XmlFormatExtensionAttribute(String*, String*, Type*);
[JScript] public function XmlFormatExtensionAttribute(String, String, Type);

Initializes a new instance of the XmlFormatExtensionAttribute class specifying the XML element and namespace to add when running at the specified extension point.

[Visual Basic] Public Sub New(String, String, Type())
[C#] public XmlFormatExtensionAttribute(string, string, Type[]);
[C++] public: XmlFormatExtensionAttribute(String*, String*, Type[]);
[JScript] public function XmlFormatExtensionAttribute(String, String, Type[]);

Initializes a new instance of the XmlFormatExtensionAttribute class specifying the XML element and namespace to add when running at the specified extension points.

[Visual Basic] Public Sub New(String, String, Type, Type)
[C#] public XmlFormatExtensionAttribute(string, string, Type, Type);
[C++] public: XmlFormatExtensionAttribute(String*, String*, Type*, Type*);
[JScript] public function XmlFormatExtensionAttribute(String, String, Type, Type);

Initializes a new instance of the XmlFormatExtensionAttribute class specifying the XML element and namespace to add when running at the specified extension points.

[Visual Basic] Public Sub New(String, String, Type, Type, Type)
[C#] public XmlFormatExtensionAttribute(string, string, Type, Type, Type);
[C++] public: XmlFormatExtensionAttribute(String*, String*, Type*, Type*, Type*);
[JScript] public function XmlFormatExtensionAttribute(String, String, Type, Type, Type);

Initializes a new instance of the XmlFormatExtensionAttribute class specifying the XML element and namespace to add when running at the specified extension point.

[Visual Basic] Public Sub New(String, String, Type, Type, Type, Type)
[C#] public XmlFormatExtensionAttribute(string, string, Type, Type, Type, Type);
[C++] public: XmlFormatExtensionAttribute(String*, String*, Type*, Type*, Type*, Type*);
[JScript] public function XmlFormatExtensionAttribute(String, String, Type, Type, Type, Type);

Example

[Visual Basic, C#, C++] Note   This example shows how to use one of the overloaded versions of the XmlFormatExtensionAttribute constructor. For other examples that might be available, see the individual overload topics.
[Visual Basic] 
' 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

[C#] 
// 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; }
    }
}

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

public:
    const String* YMLNamespace;
    YMLOperationBinding() : YMLNamespace(S"http://www.contoso.com/yml") {}

    [XmlElement(S"Reverse")]
    __property Boolean get_Reverse() { return reverse; }
    [XmlElement(S"Reverse")]
    __property void set_Reverse(Boolean value) { reverse = value; }
};

[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button Language Filter in the upper-left corner of the page.

See Also

XmlFormatExtensionAttribute Class | XmlFormatExtensionAttribute Members | System.Web.Services.Configuration Namespace

Show: