ImportCollection クラス
アセンブリ: Microsoft.Build.Engine (microsoft.build.engine.dll 内)


Microsoft.Build.BuildEngine.ImportCollection


Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


ImportCollection クラス
アセンブリ: System.Web.Services (system.web.services.dll 内)


Import クラスは、<definitions> 要素で囲まれた WSDL (Web Services Description Language) <import> 要素に対応します。WSDL の詳細については、http://www.w3.org/TR/wsdl/ の仕様を参照してください。

ImportCollection クラスの一般的な使用例を次に示します。
Imports System Imports System.Web.Services.Description Imports System.Xml Imports Microsoft.VisualBasic Class ServiceDescription_ImportCollection Public Shared Sub Main() Dim myServiceDescription As ServiceDescription = _ ServiceDescription.Read("StockQuoteService_vb.wsdl") Console.WriteLine(" ImportCollection Sample ") ' Get Import Collection. Dim myImportCollection As ImportCollection = myServiceDescription.Imports Console.WriteLine("Total Imports in the document = " + _ myServiceDescription.Imports.Count.ToString()) ' Print 'Import' properties to console. Dim i As Integer For i = 0 To myImportCollection.Count - 1 Console.WriteLine(ControlChars.Tab + _ "Import Namespace :{0} Import Location :{1} ", _ myImportCollection(i).Namespace, _ myImportCollection(i).Location) Next i Dim myImports(myServiceDescription.Imports.Count - 1) As Import ' Copy 'ImportCollection' to an array. myServiceDescription.Imports.CopyTo(myImports, 0) Console.WriteLine("Imports that are copied to Importarray ...") Dim j As Integer For j = 0 To myImports.Length - 1 Console.WriteLine(ControlChars.Tab + _ "Import Namespace :{0} Import Location :{1} ", _ myImports(j).Namespace, myImports(j).Location) Next j ' Get Import by Index. Dim myImport As Import = _ myServiceDescription.Imports(myServiceDescription.Imports.Count - 1) Console.WriteLine("Import by Index...") If myImportCollection.Contains(myImport) Then Console.WriteLine("Import Namespace '" + myImport.Namespace + _ "' is found in 'ImportCollection'.") Console.WriteLine("Index of '" + myImport.Namespace + _ "' in 'ImportCollection' = " + _ myImportCollection.IndexOf(myImport).ToString()) Console.WriteLine("Delete Import from 'ImportCollection'...") myImportCollection.Remove(myImport) If myImportCollection.IndexOf(myImport) = - 1 Then Console.WriteLine("Import is successfully removed from Import Collection.") End If End If End Sub 'Main End Class 'ServiceDescription_ImportCollection
using System; using System.Web.Services.Description; using System.Xml; class ServiceDescription_ImportCollection { public static void Main() { ServiceDescription myServiceDescription = ServiceDescription.Read("StockQuoteService_cs.wsdl"); Console.WriteLine(" ImportCollection Sample "); // Get Import Collection. ImportCollection myImportCollection = myServiceDescription.Imports; Console.WriteLine("Total Imports in the document = " + myServiceDescription.Imports.Count); // Print 'Import' properties to console. for(int i =0; i < myImportCollection.Count; ++i) Console.WriteLine("\tImport Namespace :{0} Import Location :{1} " ,myImportCollection[i].Namespace ,myImportCollection[i].Location); Import[] myImports = new Import[myServiceDescription.Imports.Count]; // Copy 'ImportCollection' to an array. myServiceDescription.Imports.CopyTo(myImports,0); Console.WriteLine("Imports that are copied to Importarray ..."); for(int i=0;i < myImports.Length; ++i) Console.WriteLine("\tImport Namespace :{0} Import Location :{1} " ,myImports[i].Namespace ,myImports[i].Location); // Get Import by Index. Import myImport = myServiceDescription.Imports[myServiceDescription.Imports.Count-1]; Console.WriteLine("Import by Index..."); if (myImportCollection.Contains(myImport)) { Console.WriteLine("Import Namespace '" + myImport.Namespace + "' is found in 'ImportCollection'."); Console.WriteLine("Index of '" + myImport.Namespace + "' in 'ImportCollection' = " + myImportCollection.IndexOf(myImport)); Console.WriteLine("Deleting Import from 'ImportCollection'..."); myImportCollection.Remove(myImport); if(myImportCollection.IndexOf(myImport) == -1) Console.WriteLine("Import is successfully removed from Import Collection."); } } }
#using <System.dll> #using <System.Web.Services.dll> #using <System.Xml.dll> using namespace System; using namespace System::Web::Services::Description; using namespace System::Xml; int main() { ServiceDescription^ myServiceDescription = ServiceDescription::Read( "StockQuoteService_cpp.wsdl" ); Console::WriteLine( " ImportCollection Sample " ); // Get Import Collection. ImportCollection^ myImportCollection = myServiceDescription->Imports; Console::WriteLine( "Total Imports in the document = {0}", myServiceDescription->Imports->Count ); // Print 'Import' properties to console. for ( int i = 0; i < myImportCollection->Count; ++i ) Console::WriteLine( "\tImport Namespace : {0} Import Location : {1} " , myImportCollection[ i ]->Namespace, myImportCollection[ i ]->Location ); array<Import^>^myImports = gcnew array<Import^>(myServiceDescription->Imports->Count); // Copy 'ImportCollection' to an array. myServiceDescription->Imports->CopyTo( myImports, 0 ); Console::WriteLine( "Imports that are copied to Importarray ..." ); for ( int i = 0; i < myImports->Length; ++i ) Console::WriteLine( "\tImport Namespace : {0} Import Location : {1} " , myImports[ i ]->Namespace, myImports[ i ]->Location ); // Get Import by Index. Import^ myImport = myServiceDescription->Imports[ myServiceDescription->Imports->Count - 1 ]; Console::WriteLine( "Import by Index..." ); if ( myImportCollection->Contains( myImport ) ) { Console::WriteLine( "Import Namespace ' {0} ' is found in 'ImportCollection'.", myImport->Namespace ); Console::WriteLine( "Index of '{0}' in 'ImportCollection' = {1}", myImport->Namespace, myImportCollection->IndexOf( myImport ) ); Console::WriteLine( "Deleting Import from 'ImportCollection'..." ); myImportCollection->Remove( myImport ); if ( myImportCollection->IndexOf( myImport ) == -1 ) Console::WriteLine( "Import is successfully removed from Import Collection." ); } }
import System.*; import System.Web.Services.Description.*; import System.Xml.*; class ServiceDescriptionImportCollection { public static void main(String[] args) { ServiceDescription myServiceDescription = ServiceDescription.Read("StockQuoteService_jsl.wsdl"); Console.WriteLine(" ImportCollection Sample "); // Get Import Collection. ImportCollection myImportCollection = myServiceDescription.get_Imports(); Console.WriteLine("Total Imports in the document = " + myServiceDescription.get_Imports().get_Count()); // Print 'Import' properties to console. for (int i = 0; i < myImportCollection.get_Count(); ++i) { Console.WriteLine("\tImport Namespace :{0} Import Location :{1} ", myImportCollection.get_Item(i).get_Namespace(), myImportCollection.get_Item(i).get_Location()); } Import myImports[] = new Import[myServiceDescription. get_Imports().get_Count()]; // Copy 'ImportCollection' to an array. myServiceDescription.get_Imports().CopyTo(myImports, 0); Console.WriteLine("Imports that are copied to Importarray ..."); for (int i = 0; i < myImports.length; ++i) { Console.WriteLine("\tImport Namespace :{0} Import Location :{1} ", myImports[i].get_Namespace(), myImports[i].get_Location()); } // Get Import by Index. Import myImport = myServiceDescription.get_Imports(). get_Item(myServiceDescription.get_Imports().get_Count() - 1); Console.WriteLine("Import by Index..."); if (myImportCollection.Contains(myImport)) { Console.WriteLine("Import Namespace '" + myImport.get_Namespace() + "' is found in 'ImportCollection'."); Console.WriteLine("Index of '" + myImport.get_Namespace() + "' in 'ImportCollection' = " + myImportCollection.IndexOf(myImport)); Console.WriteLine("Deleting Import from 'ImportCollection'..."); myImportCollection.Remove(myImport); if (myImportCollection.IndexOf(myImport) == -1) { Console.WriteLine( "Import is successfully removed from Import Collection."); } } } //main } //ServiceDescriptionImportCollection

System.Collections.CollectionBase
System.Web.Services.Description.ServiceDescriptionBaseCollection
System.Web.Services.Description.ImportCollection


Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


ImportCollection プロパティ

名前 | 説明 | |
---|---|---|
![]() | Count | ImportCollection 内の Import オブジェクトの数を示す値を取得します。 |
![]() | IsSynchronized | ImportCollection へのアクセスが同期されている (スレッド セーフである) かどうかを示す値を取得します。 |
![]() | SyncRoot | ImportCollection へのアクセスを同期するために使用できるオブジェクトを取得します。 |

ImportCollection プロパティ

名前 | 説明 | |
---|---|---|
![]() | Capacity | CollectionBase に格納できる要素の数を取得または設定します。 ( CollectionBase から継承されます。) |
![]() | Count | CollectionBase インスタンスに格納されている要素の数を取得します。このプロパティはオーバーライドできません。 ( CollectionBase から継承されます。) |
![]() | Item | 指定した 0 から始まるインデックス番号にある Import の値を取得または設定します。 |

名前 | 説明 | |
---|---|---|
![]() | InnerList | CollectionBase インスタンス内の要素のリストを格納する ArrayList を取得します。 ( CollectionBase から継承されます。) |
![]() | List | CollectionBase インスタンス内の要素のリストを格納する IList を取得します。 ( CollectionBase から継承されます。) |

ImportCollection メソッド

名前 | 説明 | |
---|---|---|
![]() | CopyTo | オーバーロードされます。 ImportCollection 全体を互換性のある 1 次元の Array にコピーします。コピー操作は、コピー先の配列の指定したインデックスから始まります。 |
![]() | Equals | オーバーロードされます。 2 つの Object インスタンスが等しいかどうかを判断します。 ( Object から継承されます。) |
![]() | GetEnumerator | ImportCollection を反復処理する列挙子を取得します。 |
![]() | GetHashCode | 特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用に適しています。 ( Object から継承されます。) |
![]() | GetType | 現在のインスタンスの Type を取得します。 ( Object から継承されます。) |
![]() | ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 ( Object から継承されます。) |
![]() | ToString | 現在の Object を表す String を返します。 ( Object から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 ( Object から継承されます。) |
![]() | MemberwiseClone | 現在の Object の簡易コピーを作成します。 ( Object から継承されます。) |

ImportCollection メソッド


名前 | 説明 | |
---|---|---|
![]() | Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 ( Object から継承されます。) |
![]() | MemberwiseClone | 現在の Object の簡易コピーを作成します。 ( Object から継承されます。) |
![]() | OnClear | CollectionBase インスタンスの内容を消去するときに、追加のカスタム プロセスを実行します。 ( CollectionBase から継承されます。) |
![]() | OnClearComplete | CollectionBase インスタンスの内容を消去した後に、追加のカスタム プロセスを実行します。 ( CollectionBase から継承されます。) |
![]() | OnInsert | CollectionBase インスタンスに新しい要素を挿入する前に、追加のカスタム プロセスを実行します。 ( CollectionBase から継承されます。) |
![]() | OnInsertComplete | CollectionBase インスタンスに新しい要素を挿入した後に、追加のカスタム プロセスを実行します。 ( CollectionBase から継承されます。) |
![]() | OnRemove | CollectionBase インスタンスから要素を削除するときに、追加のカスタム プロセスを実行します。 ( CollectionBase から継承されます。) |
![]() | OnRemoveComplete | CollectionBase インスタンスから要素を削除した後に、追加のカスタム プロセスを実行します。 ( CollectionBase から継承されます。) |
![]() | OnSet | CollectionBase インスタンスに値を設定する前に、追加のカスタム プロセスを実行します。 ( CollectionBase から継承されます。) |
![]() | OnSetComplete | CollectionBase インスタンスに値を設定した後に、追加のカスタム プロセスを実行します。 ( CollectionBase から継承されます。) |
![]() | OnValidate | 値を検証するときに、追加のカスタム プロセスを実行します。 ( CollectionBase から継承されます。) |

ImportCollection メンバ
プロジェクト内のすべての Import 要素のコレクションを表します。
ImportCollection データ型で公開されるメンバを以下の表に示します。

名前 | 説明 | |
---|---|---|
![]() | Count | ImportCollection 内の Import オブジェクトの数を示す値を取得します。 |
![]() | IsSynchronized | ImportCollection へのアクセスが同期されている (スレッド セーフである) かどうかを示す値を取得します。 |
![]() | SyncRoot | ImportCollection へのアクセスを同期するために使用できるオブジェクトを取得します。 |

名前 | 説明 | |
---|---|---|
![]() | CopyTo | オーバーロードされます。 ImportCollection 全体を互換性のある 1 次元の Array にコピーします。コピー操作は、コピー先の配列の指定したインデックスから始まります。 |
![]() | Equals | オーバーロードされます。 2 つの Object インスタンスが等しいかどうかを判断します。 (Object から継承されます。) |
![]() | GetEnumerator | ImportCollection を反復処理する列挙子を取得します。 |
![]() | GetHashCode | 特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用に適しています。 (Object から継承されます。) |
![]() | GetType | 現在のインスタンスの Type を取得します。 (Object から継承されます。) |
![]() | ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 (Object から継承されます。) |
![]() | ToString | 現在の Object を表す String を返します。 (Object から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 (Object から継承されます。) |
![]() | MemberwiseClone | 現在の Object の簡易コピーを作成します。 (Object から継承されます。) |

ImportCollection メンバ
XML Web サービスへインポートされるドキュメントを表す Import クラスのインスタンスのコレクションを提供します。このクラスは継承できません。
ImportCollection データ型で公開されるメンバを以下の表に示します。

名前 | 説明 | |
---|---|---|
![]() | Capacity | CollectionBase に格納できる要素の数を取得または設定します。(CollectionBase から継承されます。) |
![]() | Count | CollectionBase インスタンスに格納されている要素の数を取得します。このプロパティはオーバーライドできません。(CollectionBase から継承されます。) |
![]() | Item | 指定した 0 から始まるインデックス番号にある Import の値を取得または設定します。 |

名前 | 説明 | |
---|---|---|
![]() | InnerList | CollectionBase インスタンス内の要素のリストを格納する ArrayList を取得します。(CollectionBase から継承されます。) |
![]() | List | CollectionBase インスタンス内の要素のリストを格納する IList を取得します。(CollectionBase から継承されます。) |


名前 | 説明 | |
---|---|---|
![]() | Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 (Object から継承されます。) |
![]() | MemberwiseClone | 現在の Object の簡易コピーを作成します。 (Object から継承されます。) |
![]() | OnClear | CollectionBase インスタンスの内容を消去するときに、追加のカスタム プロセスを実行します。 (CollectionBase から継承されます。) |
![]() | OnClearComplete | CollectionBase インスタンスの内容を消去した後に、追加のカスタム プロセスを実行します。 (CollectionBase から継承されます。) |
![]() | OnInsert | CollectionBase インスタンスに新しい要素を挿入する前に、追加のカスタム プロセスを実行します。 (CollectionBase から継承されます。) |
![]() | OnInsertComplete | CollectionBase インスタンスに新しい要素を挿入した後に、追加のカスタム プロセスを実行します。 (CollectionBase から継承されます。) |
![]() | OnRemove | CollectionBase インスタンスから要素を削除するときに、追加のカスタム プロセスを実行します。 (CollectionBase から継承されます。) |
![]() | OnRemoveComplete | CollectionBase インスタンスから要素を削除した後に、追加のカスタム プロセスを実行します。 (CollectionBase から継承されます。) |
![]() | OnSet | CollectionBase インスタンスに値を設定する前に、追加のカスタム プロセスを実行します。 (CollectionBase から継承されます。) |
![]() | OnSetComplete | CollectionBase インスタンスに値を設定した後に、追加のカスタム プロセスを実行します。 (CollectionBase から継承されます。) |
![]() | OnValidate | 値を検証するときに、追加のカスタム プロセスを実行します。 (CollectionBase から継承されます。) |

Weblioに収録されているすべての辞書からImportCollectionを検索する場合は、下記のリンクをクリックしてください。

- ImportCollectionのページへのリンク