次の方法で共有


MimeMultipartRelatedBinding クラス

定義

InputBinding または OutputBinding に追加された機能拡張要素を表し、HTTP 伝送の各部分の個別の MIME 形式を指定します。 このクラスは継承できません。

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
[<System.Web.Services.Configuration.XmlFormatExtension("multipartRelated", "http://schemas.xmlsoap.org/wsdl/mime/", typeof(System.Web.Services.Description.InputBinding), typeof(System.Web.Services.Description.OutputBinding))>]
type MimeMultipartRelatedBinding = class
    inherit ServiceDescriptionFormatExtension
Public NotInheritable Class MimeMultipartRelatedBinding
Inherits ServiceDescriptionFormatExtension
継承
MimeMultipartRelatedBinding
属性

次の例では、 クラスによって公開されるプロパティとメソッドの使用方法を MimeMultipartRelatedBinding 示します。

#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
   End Class
End Namespace 'MimeContentBinding_work

注釈

XML Web サービスのプロトコルの指定の詳細については、「ASP.NET を使用した XML Web サービス」を参照してください。 Web サービス記述言語 (WSDL) の詳細については、 WSDL 仕様を参照してください。

コンストラクター

MimeMultipartRelatedBinding()

MimeMultipartRelatedBinding クラスの新しいインスタンスを初期化します。

プロパティ

Handled

機能拡張要素のインポート時に、ServiceDescriptionFormatExtension がインポート プロセスで使用されるかどうかを示す値を取得または設定します。

(継承元 ServiceDescriptionFormatExtension)
Parent

ServiceDescriptionFormatExtension の親を取得します。

(継承元 ServiceDescriptionFormatExtension)
Parts

MimeMultipartRelatedBinding に追加された機能拡張要素のコレクションを取得して、MIME メッセージの各部分の MIME 形式を指定します。

Required

ServiceDescriptionFormatExtension が参照先のアクションに必要かどうかを示す値を取得または設定します。

(継承元 ServiceDescriptionFormatExtension)

メソッド

Equals(Object)

指定されたオブジェクトが現在のオブジェクトと等しいかどうかを判断します。

(継承元 Object)
GetHashCode()

既定のハッシュ関数として機能します。

(継承元 Object)
GetType()

現在のインスタンスの Type を取得します。

(継承元 Object)
MemberwiseClone()

現在の Object の簡易コピーを作成します。

(継承元 Object)
ToString()

現在のオブジェクトを表す文字列を返します。

(継承元 Object)

適用対象