MimeContentBinding Klas
Definitie
Belangrijk
Bepaalde informatie heeft betrekking op een voorlopige productversie die aanzienlijk kan worden gewijzigd voordat deze wordt uitgebracht. Microsoft biedt geen enkele expliciete of impliciete garanties met betrekking tot de informatie die hier wordt verstrekt.
Vertegenwoordigt een uitbreidbaarheidselement dat is toegevoegd aan een InputBinding of meer OutputBinding in een XML-webservice, waarbij de MIME-indeling voor de hoofdtekst van de HTTP-verzending wordt opgegeven. Deze klasse kan niet worden overgenomen.
public ref class MimeContentBinding sealed : System::Web::Services::Description::ServiceDescriptionFormatExtension
[System.Web.Services.Configuration.XmlFormatExtension("content", "http://schemas.xmlsoap.org/wsdl/mime/", typeof(System.Web.Services.Description.MimePart), typeof(System.Web.Services.Description.InputBinding), typeof(System.Web.Services.Description.OutputBinding))]
[System.Web.Services.Configuration.XmlFormatExtensionPrefix("mime", "http://schemas.xmlsoap.org/wsdl/mime/")]
public sealed class MimeContentBinding : System.Web.Services.Description.ServiceDescriptionFormatExtension
[<System.Web.Services.Configuration.XmlFormatExtension("content", "http://schemas.xmlsoap.org/wsdl/mime/", typeof(System.Web.Services.Description.MimePart), typeof(System.Web.Services.Description.InputBinding), typeof(System.Web.Services.Description.OutputBinding))>]
[<System.Web.Services.Configuration.XmlFormatExtensionPrefix("mime", "http://schemas.xmlsoap.org/wsdl/mime/")>]
type MimeContentBinding = class
inherit ServiceDescriptionFormatExtension
Public NotInheritable Class MimeContentBinding
Inherits ServiceDescriptionFormatExtension
- Overname
- Kenmerken
Voorbeelden
In het volgende voorbeeld ziet u het gebruik van de eigenschappen en methoden die door de MimeContentBinding klasse worden weergegeven.
#using <System.dll>
#using <System.Web.Services.dll>
#using <System.Xml.dll>
using namespace System;
using namespace System::Web::Services::Description;
using namespace System::Collections;
int main()
{
ServiceDescription^ myServiceDescription = ServiceDescription::Read( "MimeContentSample_cpp.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.
array<MimeContentBinding^>^myMimeContentBindings = (array<MimeContentBinding^>^)myServiceDescriptionFormatExtensionCollection->FindAll( MimeContentBinding::typeid );
// Enumerate the array and display MimeContentBinding properties.
IEnumerator^ myEnum = myMimeContentBindings->GetEnumerator();
while ( myEnum->MoveNext() )
{
MimeContentBinding^ myMimeContentBinding = safe_cast<MimeContentBinding^>(myEnum->Current);
Console::WriteLine( "Type: {0}", myMimeContentBinding->Type );
Console::WriteLine( "Part: {0}", myMimeContentBinding->Part );
}
Console::WriteLine( "Namespace: {0}", MimeContentBinding::Namespace );
}
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);
}
}
}
Imports System.Web.Services.Description
Namespace MimeContentBinding_work
Class MyMimeContentClass
Shared Sub Main()
Dim myServiceDescription As ServiceDescription = _
ServiceDescription.Read ("MimeContentSample_vb.wsdl")
' Get the Binding.
Dim myBinding As Binding = myServiceDescription.Bindings("b1")
' Get the first OperationBinding.
Dim myOperationBinding As OperationBinding = myBinding.Operations(0)
Dim myOutputBinding As OutputBinding = myOperationBinding.Output
Dim myServiceDescriptionFormatExtensionCollection As _
ServiceDescriptionFormatExtensionCollection = _
myOutputBinding.Extensions
' Find all MimeContentBinding objects in extensions.
Dim myMimeContentBindings As MimeContentBinding() = _
CType(myServiceDescriptionFormatExtensionCollection.FindAll( _
GetType(MimeContentBinding)), MimeContentBinding())
' Enumerate the array and display MimeContentBinding properties.
Dim myMimeContentBinding As MimeContentBinding
For Each myMimeContentBinding In myMimeContentBindings
Console.WriteLine("Type: " & myMimeContentBinding.Type)
Console.WriteLine("Part: " & myMimeContentBinding.Part)
Next myMimeContentBinding
Console.WriteLine("Namespace: " & MimeContentBinding.Namespace)
End Sub
End Class
End Namespace 'MimeContentBinding_work
Opmerkingen
Zie XML-webservices met ASP.NET voor meer informatie over het opgeven van protocollen voor XML-webservices. Zie de WSDL-specificatie voor meer informatie over WSDL (Web Services Description Language).
Constructors
| Name | Description |
|---|---|
| MimeContentBinding() |
Initialiseert een nieuw exemplaar van de MimeContentBinding klasse. |
Velden
| Name | Description |
|---|---|
| Namespace |
Hiermee geeft u de URI voor de XML-naamruimte van de MimeContentBinding klasse. Dit veld is constant. |
Eigenschappen
| Name | Description |
|---|---|
| Handled |
Hiermee wordt een waarde opgehaald of ingesteld die aangeeft of het ServiceDescriptionFormatExtension wordt gebruikt door het importproces wanneer het uitbreidbaarheidselement wordt geïmporteerd. (Overgenomen van ServiceDescriptionFormatExtension) |
| Parent |
Haalt de bovenliggende van de ServiceDescriptionFormatExtension. (Overgenomen van ServiceDescriptionFormatExtension) |
| Part |
Hiermee haalt u de naam op van de MessagePart waarop de toepassing van toepassing is of stelt u deze MimeContentBinding in. |
| Required |
Hiermee wordt een waarde opgehaald of ingesteld die aangeeft of de ServiceDescriptionFormatExtension actie waarnaar deze verwijst, noodzakelijk is. (Overgenomen van ServiceDescriptionFormatExtension) |
| Type |
Hiermee wordt een waarde opgehaald of ingesteld die de indeling van de hoofdtekst van de HTTP-verzending aangeeft. |
Methoden
| Name | Description |
|---|---|
| Equals(Object) |
Bepaalt of het opgegeven object gelijk is aan het huidige object. (Overgenomen van Object) |
| GetHashCode() |
Fungeert als de standaardhashfunctie. (Overgenomen van Object) |
| GetType() |
Hiermee haalt u de Type huidige instantie op. (Overgenomen van Object) |
| MemberwiseClone() |
Hiermee maakt u een ondiepe kopie van de huidige Object. (Overgenomen van Object) |
| ToString() |
Retourneert een tekenreeks die het huidige object vertegenwoordigt. (Overgenomen van Object) |