Esempio n. 1
0
        public static DataReflectorCollection Add <TEntity, TDataReflector>(this DataReflectorCollection collection, TDataReflector reflector)
            where TDataReflector : DataReflector <TEntity>
        {
            if (collection == null)
            {
                throw new NullReferenceException();
            }

            collection.AddReflector <TEntity, TDataReflector>(reflector);
            return(collection);
        }
 /// <summary>
 /// Register EntityReflector for reading entity of T1 type to global EntityAccessor scope
 /// </summary>
 /// <typeparam name="T1">Entity type</typeparam>
 /// <typeparam name="T2">DataReflector type</typeparam>
 /// <param name="reflector">DataReflector instance</param>
 protected void UsingReflector <T1, T2>(T2 reflector)
     where T2 : DataReflector <T1>
 {
     _reflectors.AddReflector <T1, T2>(reflector);
 }