Class ArrayType<TLogixType>
A LogixType that represents an array of other logix types (either atomic or structure).
public sealed class ArrayType<TLogixType> : ArrayType, ILogixSerializable, IEnumerable<TLogixType>, IEnumerable where TLogixType : LogixType
Type Parameters
TLogixType
- Inheritance
-
ArrayType<TLogixType>
- Implements
-
IEnumerable<TLogixType>
- Inherited Members
Constructors
ArrayType(Array)
Creates a new ArrayType<TLogixType> initialized with the provided one dimensional array.
public ArrayType(Array array)
Parameters
array
ArrayThe one dimensional array to initialize the array type with.
Exceptions
- ArgumentNullException
array
is null.- ArgumentException
array
is empty, containsnull
orNullType
elements, or is an array of more than one logix type.
ArrayType(XElement)
public ArrayType(XElement element)
Parameters
element
XElementThe element to parse.
Exceptions
- ArgumentNullException
element
is null.- InvalidOperationException
element
does not have required attributes or child elements.
ArrayType(TLogixType[,,])
Creates a new ArrayType<TLogixType> initialized with the provided three dimensional array.
public ArrayType(TLogixType[,,] array)
Parameters
array
TLogixType[,,]The three dimensional array to initialize the array type with.
Exceptions
- ArgumentNullException
array
is null.- ArgumentException
array
is empty, containsnull
orNullType
elements, or is an array of more than one logix type.
ArrayType(TLogixType[,])
Creates a new ArrayType<TLogixType> initialized with the provided two dimensional array.
public ArrayType(TLogixType[,] array)
Parameters
array
TLogixType[,]The two dimensional array to initialize the array type with.
Exceptions
- ArgumentNullException
array
is null.- ArgumentException
array
is empty, containsnull
orNullType
elements, or is an array of more than one logix type.
ArrayType(TLogixType[])
Creates a new ArrayType<TLogixType> initialized with the provided one dimensional array.
public ArrayType(TLogixType[] array)
Parameters
array
TLogixType[]The one dimensional array to initialize the array type with.
Exceptions
- ArgumentNullException
array
is null.- ArgumentException
array
is empty, containsnull
orNullType
elements, or is an array of more than one logix type.
Properties
this[ushort]
Gets the LogixType instance at the specified index.
public TLogixType this[ushort x] { get; set; }
Parameters
x
ushortThe index of the array element
Property Value
- TLogixType
Exceptions
- ArgumentOutOfRangeException
index
is out of range of the array.
this[ushort, ushort]
Gets the LogixType instance at the specified index.
public TLogixType this[ushort x, ushort y] { get; set; }
Parameters
Property Value
- TLogixType
Exceptions
- ArgumentOutOfRangeException
index
is out of range of the array.
this[ushort, ushort, ushort]
Gets the LogixType instance at the specified index.
public TLogixType this[ushort x, ushort y, ushort z] { get; set; }
Parameters
x
ushortThe x index of the array element
y
ushortThe y index of the array element
z
ushortThe z index of the array element
Property Value
- TLogixType
Exceptions
- ArgumentOutOfRangeException
index
is out of range of the array.
Methods
GetEnumerator()
Returns an enumerator that iterates through the collection.
public IEnumerator<TLogixType> GetEnumerator()
Returns
- IEnumerator<TLogixType>
An enumerator that can be used to iterate through the collection.
Operators
implicit operator ArrayType<TLogixType>(TLogixType[,,])
Implicitly converts the provided array of logix type objects to an ArrayType<TLogixType>.
public static implicit operator ArrayType<TLogixType>(TLogixType[,,] array)
Parameters
array
TLogixType[,,]
Returns
- ArrayType<TLogixType>
A new ArrayType<TLogixType> containing the elements of the provided array.
implicit operator ArrayType<TLogixType>(TLogixType[,])
Implicitly converts the provided array of logix type objects to an ArrayType<TLogixType>.
public static implicit operator ArrayType<TLogixType>(TLogixType[,] array)
Parameters
array
TLogixType[,]
Returns
- ArrayType<TLogixType>
A new ArrayType<TLogixType> containing the elements of the provided array.
implicit operator ArrayType<TLogixType>(TLogixType[])
Implicitly converts the provided array of logix type objects to an ArrayType<TLogixType>.
public static implicit operator ArrayType<TLogixType>(TLogixType[] array)
Parameters
array
TLogixType[]
Returns
- ArrayType<TLogixType>
A new ArrayType<TLogixType> containing the elements of the provided array.