MimeContentBinding Class
Represents an extensibility element added to an InputBinding or an OutputBinding within an XML Web service, specifying the MIME format for the body of the HTTP transmission. This class cannot be inherited.
Assembly: System.Web.Services (in System.Web.Services.dll)
System.Web.Services.Description.ServiceDescriptionFormatExtension
System.Web.Services.Description.MimeContentBinding
[XmlFormatExtensionAttribute("content", "http://schemas.xmlsoap.org/wsdl/mime/", typeof(MimePart), typeof(InputBinding), typeof(OutputBinding))] [XmlFormatExtensionPrefixAttribute("mime", "http://schemas.xmlsoap.org/wsdl/mime/")] public sealed class MimeContentBinding : ServiceDescriptionFormatExtension
| Name | Description | |
|---|---|---|
![]() | MimeContentBinding() | Initializes a new instance of the MimeContentBinding class. |
| Name | Description | |
|---|---|---|
![]() | Handled | Gets or sets a value indicating whether the ServiceDescriptionFormatExtension is used by the import process when the extensibility element is imported.(Inherited from ServiceDescriptionFormatExtension.) |
![]() | Parent | Gets the parent of the ServiceDescriptionFormatExtension.(Inherited from ServiceDescriptionFormatExtension.) |
![]() | Part | Gets or sets the name of the MessagePart to which the MimeContentBinding applies. |
![]() | Required | Gets or sets a value indicating whether the ServiceDescriptionFormatExtension is necessary for the action to which it refers.(Inherited from ServiceDescriptionFormatExtension.) |
![]() | Type | Gets or sets a value indicating the format of the body of the HTTP transmission. |
| Name | Description | |
|---|---|---|
![]() | Equals(Object) | Determines whether the specified object is equal to the current object.(Inherited from Object.) |
![]() | GetHashCode() | Serves as the default hash function. (Inherited from Object.) |
![]() | GetType() | |
![]() | ToString() | Returns a string that represents the current object.(Inherited from Object.) |
| Name | Description | |
|---|---|---|
![]() ![]() | Namespace | Specifies the URI for the XML namespace of the MimeContentBinding class. This field is constant. |
For more information about specifying protocols for XML Web services, see [<topic://cpconbuildingaspnetwebservices>]. For more information about Web Services Description Language (WSDL), see the specification at http://www.w3.org/TR/wsdl/.
The following example demonstrates the use of the properties and methods exposed by the MimeContentBinding class.
using System; using System.Web.Services.Description; namespace MimeContentBinding_work { class MyMimeContentClass { static void Main() { ServiceDescription myServiceDescription = ServiceDescription.Read("MimeContentSample_cs.wsdl"); // Get the Binding. Binding myBinding = myServiceDescription.Bindings["b1"]; // Get the first OperationBinding. OperationBinding myOperationBinding = myBinding.Operations[0]; OutputBinding myOutputBinding = myOperationBinding.Output; ServiceDescriptionFormatExtensionCollection myServiceDescriptionFormatExtensionCollection = myOutputBinding.Extensions; // Find all MimeContentBinding objects in extensions. MimeContentBinding[] myMimeContentBindings = (MimeContentBinding[]) myServiceDescriptionFormatExtensionCollection.FindAll( typeof(MimeContentBinding)); // Enumerate the array and display MimeContentBinding properties. foreach(MimeContentBinding myMimeContentBinding in myMimeContentBindings) { Console.WriteLine("Type: " + myMimeContentBinding.Type); Console.WriteLine("Part: " + myMimeContentBinding.Part); } Console.WriteLine("Namespace: " + MimeContentBinding.Namespace); } } }
Available since 1.1
Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.



