Beispiel #1
0
        public virtual ArrayWithRoles <TValue, TValueQuery, TValueImmutable> NewArrayWithRoles <TValue, TValueQuery, TValueImmutable>(TValue[] array = null)
            where TValue : Mutable <TValueQuery, TValueImmutable>
            where TValueQuery : MutableQuery <TValueImmutable>
        {
            ArrayWithRoles <TValue, TValueQuery, TValueImmutable> retVal;

            if (array != null && array.Length > 0)
            {
                var state   = new ArrayState <TValue>(array);
                var arrayIQ = new ArrayImmutableQueryImpl <TValue, TValueQuery, TValueImmutable>(state);
                retVal = new ArrayWithRolesImpl <TValue, TValueQuery, TValueImmutable>(new ArrayQueryOfMutablesImpl <TValue, TValueQuery, TValueImmutable>(arrayIQ, new ArrayQueryOfQueriesImpl <TValue, TValueQuery, TValueImmutable>(arrayIQ, state), state), state);
            }
            else
            {
                retVal = EmptyArrayWithRoles <TValue, TValueQuery, TValueImmutable> .Array;
            }
            return(retVal);
        }
Beispiel #2
0
 internal ArrayWithRolesDebugView(ArrayWithRolesImpl <TValue, TValueQuery, TValueImmutable> array)
 {
     this._array = array.MQ.IQ;
 }