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.
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 |
|---|---|
| int |
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 |
|---|---|
| bool | 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 |
|---|---|
| bool |
IsSynchronized
Gets a value indicating whether access to the ICollection is synchronized (thread safe).
Declaration
public bool IsSynchronized { get; }
Property Value
| Type | Description |
|---|---|
| bool |
this[int]
Gets or sets the ModuleInfo at the specified index.
Declaration
public ModuleInfo this[int index] { get; set; }
Parameters
| Type | Name | Description |
|---|---|---|
| int | 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 |
|---|---|
| string | The ref value that will be used. |
See Also
View SourceSyncRoot
Gets an object that can be used to synchronize access to the ICollection.
Declaration
public object SyncRoot { get; }
Property Value
| Type | Description |
|---|---|
| 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 |
|---|---|
| bool | true if |
CopyTo(ModuleInfo[], int)
Copies the elements of the ModuleInfoGroup to an Array, starting at a particular Array index.
Declaration
public void CopyTo(ModuleInfo[] array, int arrayIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| ModuleInfo[] | array | The one-dimensional Array that is the destination of the elements copied from ModuleInfoGroup. The Array must have zero-based indexing. |
| int | arrayIndex | The zero-based index in |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException |
|
| ArgumentOutOfRangeException |
|
| 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 |
|---|---|
| ArgumentNullException | An ArgumentNullException is thrown if |
GetEnumerator()
Returns an enumerator that iterates through the collection.
Declaration
public IEnumerator<ModuleInfo> GetEnumerator()
Returns
| Type | Description |
|---|---|
| IEnumerator<ModuleInfo> | A IEnumerator<T> that can be used to iterate through the collection. |
IndexOf(ModuleInfo)
Determines the index of a specific item in the IList<T>.
Declaration
public int IndexOf(ModuleInfo item)
Parameters
| Type | Name | Description |
|---|---|---|
| ModuleInfo | item | The object to locate in the IList<T>. |
Returns
| Type | Description |
|---|---|
| int | 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 |
|---|---|---|
| object | value | The object to locate in the ModuleInfoGroup. Must be of type ModuleInfo |
Returns
| Type | Description |
|---|---|
| int | The index of |
Insert(int, ModuleInfo)
Inserts an item to the IList<T> at the specified index.
Declaration
public void Insert(int index, ModuleInfo item)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | The zero-based index at which |
| ModuleInfo | item | The object to insert into the IList<T>. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentOutOfRangeException |
|
Insert(int, object)
Inserts an item to the ModuleInfoGroup at the specified index.
Declaration
public void Insert(int index, object value)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | The zero-based index at which |
| object | value | The object to insert into the ModuleInfoGroup. Must be of type ModuleInfo |
Exceptions
| Type | Condition |
|---|---|
| ArgumentOutOfRangeException |
|
| ArgumentNullException | If |
| 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 |
|---|---|
| bool | true if |
RemoveAt(int)
Removes the IList<T> item at the specified index.
Declaration
public void RemoveAt(int index)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | The zero-based index of the item to remove. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentOutOfRangeException |
|
| NotSupportedException | The IList<T> is read-only. |