MimeMultipartRelatedBinding MimeMultipartRelatedBinding MimeMultipartRelatedBinding MimeMultipartRelatedBinding Class

Definizione

Rappresenta un elemento di estensibilità aggiunto a un oggetto InputBinding o OutputBinding, che specifica i singoli formati MIME per le parti della trasmissione HTTP.Represents an extensibility element added to an InputBinding or an OutputBinding, specifying the individual MIME formats for the parts of the HTTP transmission. Questa classe non può essere ereditata.This class cannot be inherited.

public ref class MimeMultipartRelatedBinding sealed : System::Web::Services::Description::ServiceDescriptionFormatExtension
[System.Web.Services.Configuration.XmlFormatExtension("multipartRelated", "http://schemas.xmlsoap.org/wsdl/mime/", typeof(System.Web.Services.Description.InputBinding), typeof(System.Web.Services.Description.OutputBinding))]
public sealed class MimeMultipartRelatedBinding : System.Web.Services.Description.ServiceDescriptionFormatExtension
type MimeMultipartRelatedBinding = class
    inherit ServiceDescriptionFormatExtension
Public NotInheritable Class MimeMultipartRelatedBinding
Inherits ServiceDescriptionFormatExtension
Ereditarietà
MimeMultipartRelatedBindingMimeMultipartRelatedBindingMimeMultipartRelatedBindingMimeMultipartRelatedBinding
Attributi

Esempi

Nell'esempio seguente viene illustrato l'utilizzo delle proprietà e dei metodi esposti dalla MimeMultipartRelatedBinding classe.The following example demonstrates the use of the properties and methods exposed by the MimeMultipartRelatedBinding class.

#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^ myServicDescription = ServiceDescription::Read( "MimeMultiPartRelatedSample_cpp.wsdl" );

   // Get the binding collection.
   BindingCollection^ myBindingCollection = myServicDescription->Bindings;
   int index = 0;
   for ( int i = 0; i < myBindingCollection->Count; i++ )
      // Get the collection for MimeServiceHttpPost.
      if ( String::Compare( myBindingCollection[ i ]->Name, "MimeServiceHttpPost" ) == 0 )
      {
         OperationBindingCollection^ myOperationBindingCollection = myBindingCollection[ i ]->Operations;
         OutputBinding^ myOutputBinding = myOperationBindingCollection[ 0 ]->Output;
         ServiceDescriptionFormatExtensionCollection ^ myServiceDescriptionFormatExtensionCollection = myOutputBinding->Extensions;
         MimeMultipartRelatedBinding^ myMimeMultipartRelatedBinding = dynamic_cast<MimeMultipartRelatedBinding^>(myServiceDescriptionFormatExtensionCollection->Find( MimeMultipartRelatedBinding::typeid ));
         MimePartCollection^ myMimePartCollection = myMimeMultipartRelatedBinding->Parts;
         IEnumerator^ myEnum = myMimePartCollection->GetEnumerator();
         while ( myEnum->MoveNext() )
         {
            MimePart^ myMimePart = dynamic_cast<MimePart^>(myEnum->Current);
            Console::WriteLine( "Extension Types added to MimePart: {0}", index++ );
            Console::WriteLine( "----------------------------" );
            IEnumerator^ myEnum2 = myMimePart->Extensions->GetEnumerator();
            while ( myEnum2->MoveNext() )
            {
               Console::WriteLine( myEnum2->Current->GetType() );
            }

            Console::WriteLine( "" );
         }

         break;
      }
}
using System;
using System.Web.Services.Description;

namespace MimeContentBinding_work
{
   class MyMimeContentClass
   {
      static void Main()
      {
         ServiceDescription  myServicDescription = 
            ServiceDescription.Read("MimeMultiPartRelatedSample_cs.wsdl");

         // Get the binding collection.
         BindingCollection myBindingCollection = myServicDescription.Bindings;
         int index =0;
         for (int i= 0; i < myBindingCollection.Count;i++)
         {
            // Get the collection for MimeServiceHttpPost.
            if( myBindingCollection[i].Name == "MimeServiceHttpPost")
            {
               OperationBindingCollection myOperationBindingCollection = 
                  myBindingCollection[i].Operations;
               OutputBinding myOutputBinding = 
                  myOperationBindingCollection[0].Output;
               ServiceDescriptionFormatExtensionCollection 
                  myServiceDescriptionFormatExtensionCollection = 
                  myOutputBinding.Extensions;
               MimeMultipartRelatedBinding myMimeMultipartRelatedBinding  = 
                  (MimeMultipartRelatedBinding)
                  myServiceDescriptionFormatExtensionCollection.Find(
                  typeof(MimeMultipartRelatedBinding));
               MimePartCollection myMimePartCollection = 
                  myMimeMultipartRelatedBinding.Parts;
               foreach( MimePart myMimePart in myMimePartCollection)
               {
                  Console.WriteLine("Extension types added to MimePart: " + 
                     index ++);
                  Console.WriteLine ("----------------------------");
                  foreach(object myExtension in myMimePart.Extensions)
                     Console.WriteLine(myExtension.GetType()); 
                  Console.WriteLine();
               }
               break;
            }
         }
      }
   }
}
Imports System.Web.Services.Description

Namespace MimeContentBinding_work
    
   Class MyMimeContentClass
      
      Shared Sub Main()
        Dim myServicDescription As ServiceDescription = _
            ServiceDescription.Read("MimeMultiPartRelatedSample_vb.wsdl")

        ' Get the binding collection.
         Dim myBindingCollection As BindingCollection = _
            myServicDescription.Bindings
         Dim index As Integer = 0
         Dim i As Integer
         For i = 0 To myBindingCollection.Count - 1
            ' Get the collection for MimeServiceHttpPost.
            If myBindingCollection(i).Name = "MimeServiceHttpPost" Then
               Dim myOperationBindingCollection As _
                  OperationBindingCollection = myBindingCollection(i).Operations
               Dim myOutputBinding As OutputBinding = _
                  myOperationBindingCollection(0).Output
               Dim myServiceDescriptionFormatExtensionCollection As _
                  ServiceDescriptionFormatExtensionCollection = _
                  myOutputBinding.Extensions
               Dim myMimeMultipartRelatedBinding As _
                  MimeMultipartRelatedBinding = _ 
                  CType(myServiceDescriptionFormatExtensionCollection.Find( _
                  GetType(MimeMultipartRelatedBinding)), _
                  MimeMultipartRelatedBinding)
               Dim myMimePartCollection As MimePartCollection = _
                  myMimeMultipartRelatedBinding.Parts
               Dim myMimePart As MimePart
               For Each myMimePart In  myMimePartCollection
                  Console.WriteLine("Extension Types added to MimePart: " & _
                     index.ToString()) 
                  Console.WriteLine("----------------------------")
                  index = index + 1
                  Dim myExtension As Object
                  For Each myExtension In myMimePart.Extensions
                     Console.WriteLine(myExtension.GetType())
                  Next myExtension
                  Console.WriteLine()
               Next myMimePart
               Exit For
            End If
         Next i
      End Sub 'Main 
   End Class 'MyMimeContentClass
End Namespace 'MimeContentBinding_work

Commenti

Per ulteriori informazioni sulla specifica di protocolli per i servizi Web XML, vedere XML Web Services Using ASP.NET.For more information about specifying protocols for XML Web services, see XML Web Services Using ASP.NET. Per ulteriori informazioni su Web Services Description Language (WSDL), vedere la specifica WSDL .For more information about Web Services Description Language (WSDL), see the WSDL specification.

Costruttori

MimeMultipartRelatedBinding() MimeMultipartRelatedBinding() MimeMultipartRelatedBinding() MimeMultipartRelatedBinding()

Inizializza una nuova istanza della classe MimeMultipartRelatedBinding.Initializes a new instance of the MimeMultipartRelatedBinding class.

Proprietà

Handled Handled Handled Handled

Ottiene o imposta un valore che indica se l'oggetto ServiceDescriptionFormatExtension viene utilizzato dal processo di importazione quando vengono importati gli elementi di estensibilità.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 Parent Parent Parent

Ottiene l'elemento padre dell'oggetto ServiceDescriptionFormatExtension.Gets the parent of the ServiceDescriptionFormatExtension.

(Inherited from ServiceDescriptionFormatExtension)
Parts Parts Parts Parts

Ottiene l'insieme di elementi di estensibilità aggiunti all'oggetto MimeMultipartRelatedBinding per specificare il formato MIME delle parti del messaggio MIME.Gets the collection of extensibility elements added to the MimeMultipartRelatedBinding to specify the MIME format for the parts of the MIME message.

Required Required Required Required

Ottiene o imposta un valore che indica se l'oggetto ServiceDescriptionFormatExtension è necessario per l'azione a cui fa riferimento.Gets or sets a value indicating whether the ServiceDescriptionFormatExtension is necessary for the action to which it refers.

(Inherited from ServiceDescriptionFormatExtension)

Metodi

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determina se l'oggetto specificato è uguale all'oggetto corrente.Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Funge da funzione hash predefinita.Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

Ottiene l'oggetto Type dell'istanza corrente.Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Crea una copia superficiale dell'oggetto Object corrente.Creates a shallow copy of the current Object.

(Inherited from Object)
ToString() ToString() ToString() ToString()

Restituisce una stringa che rappresenta l'oggetto corrente.Returns a string that represents the current object.

(Inherited from Object)

Si applica a