Class ModuleInfoGroup
Represents a group of ModuleInfo instances that are usually deployed together. ModuleInfoGroups are also used by the ModuleCatalog to prevent common deployment problems such as having a module that's required at startup that depends on modules that will only be downloaded on demand. The group also forwards Ref and InitializationMode values to the ModuleInfos that it contains.
Inheritance
Implements
Namespace: Sartorius.SAF.Presentation.Modularity
Assembly: Sartorius.SAF.Presentation.dll
Syntax
public class ModuleInfoGroup : IModuleCatalogItem, IList<ModuleInfo>, ICollection<ModuleInfo>, IEnumerable<ModuleInfo>, IList, ICollection, IEnumerable
Properties
View SourceCount
Gets the number of elements contained in the ModuleInfoGroup.
Declaration
public int Count { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
InitializationMode
Gets or sets the InitializationMode for the whole group. Any ModuleInfo classes that are added after setting this value will also get this InitializationMode.
Declaration
public InitializationMode InitializationMode { get; set; }
Property Value
Type | Description |
---|---|
InitializationMode | The initialization mode. |
See Also
View SourceIsFixedSize
Gets a value indicating whether the ModuleInfoGroup has a fixed size.
Declaration
public bool IsFixedSize { get; }
Property Value
Type | Description |
---|---|
System.Boolean | false, because the ModuleInfoGroup does not have a fixed length. |
IsReadOnly
Gets a value indicating whether the ModuleInfoGroup is read-only.
Declaration
public bool IsReadOnly { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsSynchronized
Gets a value indicating whether access to the System.Collections.ICollection is synchronized (thread safe).
Declaration
public bool IsSynchronized { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Item[Int32]
Gets or sets the ModuleInfo at the specified index.
Declaration
public ModuleInfo this[int index] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index |
Property Value
Type | Description |
---|---|
ModuleInfo | The ModuleInfo at the specified index |
Ref
Gets or sets the Ref value for the whole group. Any ModuleInfo classes that are added after setting this value will also get this Ref. The ref value will also be used by the IModuleManager to determine which IModuleTypeLoader to use. For example, if the ref property can be converted to an URL, it the XapModuleTypeLoader will be used (Only available in the Silverlight version of CAL). For example, using an "file://" prefix with a valid URL will cause the FileModuleTypeLoader to be used (Only available in the desktop version of CAL).
Declaration
public string Ref { get; set; }
Property Value
Type | Description |
---|---|
System.String | The ref value that will be used. |
See Also
View SourceSyncRoot
Gets an object that can be used to synchronize access to the System.Collections.ICollection.
Declaration
public object SyncRoot { get; }
Property Value
Type | Description |
---|---|
System.Object |
Methods
View SourceAdd(ModuleInfo)
Adds an ModuleInfo moduleInfo to the ModuleInfoGroup.
Declaration
public void Add(ModuleInfo item)
Parameters
Type | Name | Description |
---|---|---|
ModuleInfo | item | The ModuleInfo to the ModuleInfoGroup. |
Clear()
Removes all ModuleInfos from the ModuleInfoGroup.
Declaration
public void Clear()
Contains(ModuleInfo)
Determines whether the ModuleInfoGroup contains a specific value.
Declaration
public bool Contains(ModuleInfo item)
Parameters
Type | Name | Description |
---|---|---|
ModuleInfo | item | The object to locate in the ModuleInfoGroup. |
Returns
Type | Description |
---|---|
System.Boolean | true if |
CopyTo(ModuleInfo[], Int32)
Copies the elements of the ModuleInfoGroup to an System.Array, starting at a particular System.Array index.
Declaration
public void CopyTo(ModuleInfo[] array, int arrayIndex)
Parameters
Type | Name | Description |
---|---|---|
ModuleInfo[] | array | The one-dimensional System.Array that is the destination of the elements copied from ModuleInfoGroup. The System.Array must have zero-based indexing. |
System.Int32 | arrayIndex | The zero-based index in |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
System.ArgumentOutOfRangeException |
|
System.ArgumentException |
|
ForwardValues(ModuleInfo)
Forwards InitializationMode and Ref properties from this ModuleInfoGroup
to moduleInfo
.
Declaration
protected void ForwardValues(ModuleInfo moduleInfo)
Parameters
Type | Name | Description |
---|---|---|
ModuleInfo | moduleInfo | The module info to forward values to. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | An System.ArgumentNullException is thrown if |
GetEnumerator()
Returns an enumerator that iterates through the collection.
Declaration
public IEnumerator<ModuleInfo> GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerator<ModuleInfo> | A System.Collections.Generic.IEnumerator<T> that can be used to iterate through the collection. |
IndexOf(ModuleInfo)
Determines the index of a specific item in the System.Collections.Generic.IList<T>.
Declaration
public int IndexOf(ModuleInfo item)
Parameters
Type | Name | Description |
---|---|---|
ModuleInfo | item | The object to locate in the System.Collections.Generic.IList<T>. |
Returns
Type | Description |
---|---|
System.Int32 | The index of |
IndexOf(Object)
Determines the index of a specific item in the ModuleInfoGroup.
Declaration
public int IndexOf(object value)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value | The System.Object to locate in the ModuleInfoGroup. Must be of type ModuleInfo |
Returns
Type | Description |
---|---|
System.Int32 | The index of |
Insert(Int32, ModuleInfo)
Inserts an item to the System.Collections.Generic.IList<T> at the specified index.
Declaration
public void Insert(int index, ModuleInfo item)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based index at which |
ModuleInfo | item | The object to insert into the System.Collections.Generic.IList<T>. |
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException |
|
Insert(Int32, Object)
Inserts an item to the ModuleInfoGroup at the specified index.
Declaration
public void Insert(int index, object value)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based index at which |
System.Object | value | The System.Object to insert into the ModuleInfoGroup. Must be of type ModuleInfo |
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException |
|
System.ArgumentNullException | If |
System.ArgumentException | If |
Remove(ModuleInfo)
Removes the first occurrence of a specific object from the ModuleInfoGroup.
Declaration
public bool Remove(ModuleInfo item)
Parameters
Type | Name | Description |
---|---|---|
ModuleInfo | item | The object to remove from the ModuleInfoGroup. |
Returns
Type | Description |
---|---|
System.Boolean | true if |
RemoveAt(Int32)
Removes the System.Collections.Generic.IList<T> item at the specified index.
Declaration
public void RemoveAt(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based index of the item to remove. |
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException |
|
System.NotSupportedException | The System.Collections.Generic.IList<T> is read-only. |
Explicit Interface Implementations
View SourceICollection.CopyTo(Array, Int32)
Copies the elements of the System.Collections.ICollection to an System.Array, starting at a particular System.Array index.
Declaration
void ICollection.CopyTo(Array array, int index)
Parameters
Type | Name | Description |
---|---|---|
System.Array | array | The one-dimensional System.Array that is the destination of the elements copied from System.Collections.ICollection. The System.Array must have zero-based indexing. |
System.Int32 | index | The zero-based index in |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
System.ArgumentOutOfRangeException |
|
System.ArgumentException |
|
System.ArgumentException | The type of the source System.Collections.ICollection cannot be cast automatically to the type of the destination |
IEnumerable.GetEnumerator()
Returns an enumerator that iterates through a collection.
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.IEnumerator | An System.Collections.IEnumerator object that can be used to iterate through the collection. |
IList.Add(Object)
Adds an item to the ModuleInfoGroup.
Declaration
int IList.Add(object value)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value | The System.Object to add to the ModuleInfoGroup. Must be of type ModuleInfo |
Returns
Type | Description |
---|---|
System.Int32 | The position into which the new element was inserted. |
IList.Contains(Object)
Determines whether the ModuleInfoGroup contains a specific value.
Declaration
bool IList.Contains(object value)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value | The System.Object to locate in the ModuleInfoGroup. Must be of type ModuleInfo |
Returns
Type | Description |
---|---|
System.Boolean | true if the System.Object is found in the ModuleInfoGroup; otherwise, false. |
IList.Item[Int32]
Gets or sets the System.Object at the specified index.
Declaration
object IList.this[int index] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index |
Returns
Type | Description |
---|---|
System.Object |
IList.Remove(Object)
Removes the first occurrence of a specific object from the ModuleInfoGroup.
Declaration
void IList.Remove(object value)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value | The System.Object to remove from the ModuleInfoGroup. Must be of type ModuleInfo |