AssemblyCollection Class |
Namespace: AGI.Parallel.Client
The AssemblyCollection type exposes the following members.
| Name | Description | |
|---|---|---|
| AssemblyCollection |
Initializes a new instance of the AssemblyCollection class.
|
| Name | Description | |
|---|---|---|
| Count | Gets the number of elements contained in the ICollectionT. | |
| IsReadOnly | Gets a value indicating whether the ICollectionT is read-only. | |
| Item |
Gets or sets the element at the specified index.
|
| Name | Description | |
|---|---|---|
| Add(Assembly) |
Adds an item to the AssemblyCollection.
| |
| Add(AssemblyName) |
Adds the assembly name to the collection.
| |
| Add(String) |
Adds the assembly located at the specified path.
| |
| AddFromAssemblyName |
Adds the assembly name to the collection.
| |
| AddRange |
Adds the elements of the specified collection to the end of the AssemblyCollection.
| |
| AsAssemblyNameList |
Returns the assemblies in the collection as a list of assembly names.
| |
| Clear | Removes all items from the ICollectionT. | |
| Contains | Determines whether the ICollectionT contains a specific value. | |
| CopyTo | Copies the elements of the ICollectionT to an Array, starting at a particular Array index. | |
| Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
| Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
| GetEnumerator | Returns an enumerator that iterates through the collection. | |
| GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
| GetType | Gets the Type of the current instance. (Inherited from Object.) | |
| IndexOf |
Determines the index of a specific item in the AssemblyCollection.
| |
| Insert |
Inserts an item to the AssemblyCollection at the specified index.
| |
| MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
| Remove | Removes the first occurrence of a specific object from the ICollectionT. | |
| RemoveAt |
Removes the assembly item at the specified index.
| |
| ToString | Returns a string that represents the current object. (Inherited from Object.) |
public static void ConfigureAssemblyCollection(AssemblyCollection assemblyCollection) { // Add from file assemblyCollection.Add("C:\\Assemblies\\YourAssemblyA.dll"); // Add assembly object assemblyCollection.Add(Assembly.GetExecutingAssembly()); assemblyCollection.Add(Assembly.ReflectionOnlyLoadFrom("C:\\Assemblies\\YourAssemblyB.dll")); // Add from assembly name assemblyCollection.AddFromAssemblyName("YourAssemblyC, Version=2.0.0.0, Culture=neutral, PublicKeyToken=46f7a65aaf1b26ao"); // Add from range assemblyCollection.AddRange(new List<Assembly> { Assembly.LoadFrom("YourAssemblyD"), Assembly.LoadFrom("YouAssemblyE") }); Console.WriteLine("\nCount: {0}\n", assemblyCollection.Count); foreach (Assembly assembly in assemblyCollection) { Console.WriteLine(assembly.FullName); } /* * The output of the code example should resemble: * Count: 6 * YourAssemblyA, Version=1.0.0.0, Culture=neutral, PublicKeyToken=46f7a65aaf1b26ao * AssemblyCollectionExample, Version=2.0.0.0, Culture=neutral, PublicKeyToken=46f7a65aaf1b26ao * YourAssemblyB, Version=1.0.0.0, Culture=neutral, PublicKeyToken=46f7a65aaf1b26ao * YourAssemblyC, Version=1.0.0.0, Culture=neutral, PublicKeyToken=46f7a65aaf1b26ao * YourAssemblyD, Version=1.0.0.0, Culture=neutral, PublicKeyToken=46f7a65aaf1b26ao * YourAssemblyE, Version=1.0.0.0, Culture=neutral, PublicKeyToken=46f7a65aaf1b26ao */ }
STK Parallel Computing Server 2.10 API for .NET