This documentation is archived and is not being maintained.
XmlFormatExtensionAttribute.ElementName Property
.NET Framework 1.1
Gets or sets the XML element added to the service description by the service description format extension.
[Visual Basic] Public Property ElementName As String [C#] public string ElementName {get; set;} [C++] public: __property String* get_ElementName(); public: __property void set_ElementName(String*); [JScript] public function get ElementName() : String; public function set ElementName(String);
Property Value
The XML element added to the service description by the service description format extension.
Example
[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
in the upper-left corner of the page.
Requirements
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
See Also
XmlFormatExtensionAttribute Class | XmlFormatExtensionAttribute Members | System.Web.Services.Configuration Namespace
Show: