AssemblyCollection Class

A collection of Assembly.
Inheritance Hierarchy
SystemObject
  AGI.Parallel.ClientAssemblyCollection
Namespace:  AGI.Parallel.Client
Assembly:  AGI.Parallel.Client (in AGI.Parallel.Client.dll) Version: 1.3.0.366 (1.3.0.366)
Syntax
[SerializableAttribute]
public sealed class AssemblyCollection : IList<Assembly>, 
        ICollection<Assembly>, IEnumerable<Assembly>, IEnumerable

The AssemblyCollection type exposes the following members.

Constructors
  Name Description
Public method AssemblyCollection
Initializes a new instance of the AssemblyCollection class.
Top
Properties
Methods
  Name Description
Public method Add(Assembly)
Adds an item to the AssemblyCollection.
Public method Add(AssemblyName)
Adds the assembly name to the collection.
Public method Add(String)
Adds the assembly located at the specified path.
Public method AddFromAssemblyName
Adds the assembly name to the collection.
Public method AddRange
Adds the elements of the specified collection to the end of the AssemblyCollection.
Public method AsAssemblyNameList
Returns the assemblies in the collection as a list of assembly names.
Public method Clear
Public method Contains
Public method CopyTo
Public method Equals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected method Finalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public method GetEnumerator
Returns an enumerator that iterates through the collection.
Public method GetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public method GetType
Gets the Type of the current instance.
(Inherited from Object.)
Public method IndexOf
Determines the index of a specific item in the AssemblyCollection.
Public method Insert
Inserts an item to the AssemblyCollection at the specified index.
Protected method MemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public method Remove
Public method RemoveAt
Removes the assembly item at the specified index.
Public method ToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Examples
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
     */
}
See Also

STK Scalability 1.3 API for .NET