/// <summary> /// Gets a type information accessor /// /// /// <exception cref="MetadataBuilderException"></exception> /// /// </summary> /// <param name="informationAccessor">The instance of information accessor</param> public void SetInfoAccessor(Func <Type, object> informationAccessor) { Guard.AgainstNullReference <MetadataBuilderException>(informationAccessor, "informationAccessor", "Can't get collection information"); var collectionInformation = informationAccessor(typeof(ICollectionInfo)); Guard.AgainstNullReference <MetadataBuilderException>(collectionInformation, "Can't get collection information"); this._collectionInfo = (ICollectionInfo)collectionInformation; this._length = this._collectionInfo.Length; }
public static Collection SyncCollection(Collection collection, ICollectionInfo schema) { SyncContainer(collection, schema); foreach (var item in collection.Items) { SyncElement(item, schema.Item); } return collection; }
private bool IsCompatibleCollection(ICollectionInfo schema, Type type) { return IsCompatibleContainer(schema, type) && IsCompatibleContainer(schema.Item, type.GetItemType()); }
public Collection(ICollectionInfo info, Type type, ObjectPair <object> collections) { Info = info; Type = type; Collections = collections; }
public Collection(ColumnDescriptor parent, ICollectionInfo collectionInfo) : base(parent, parent.PropertyPath.LookupAllItems()) { _collectionInfo = collectionInfo; }
public Collection(ColumnDescriptor parent, ICollectionInfo collectionInfo) : base(parent, parent.PropertyPath.LookupAllItems()) { _collectionInfo = collectionInfo; }