public void Empty() { IKeyedEnumerable <int> empty = KeyedEnumerable <int> .Empty(); Assert.AreEqual(Guid.Empty, empty.Key); CollectionAssert.IsEmpty(empty.Items); }
public AttributedMetaType(Type type) : base(type) { _table = type.Name; TableAttribute[] attrs = (TableAttribute[])type .GetCustomAttributes(typeof(TableAttribute), true); if (attrs != null && attrs.Length > 0) { TableAttribute attr = attrs[0]; _schema = attr.Schema; _table = attr.Name; _projection = attr.Projection; _serializerType = attr.Serializer; } _members = GetMembers(type); _keys = _members.Where(a => a.IsKey).AsReadOnly(); }
public AttributedMetaType (Type type) : base(type) { _table = type.Name; TableAttribute[] attrs = (TableAttribute[])type .GetCustomAttributes(typeof(TableAttribute), true); if (attrs != null && attrs.Length > 0) { TableAttribute attr = attrs[0]; _schema = attr.Schema; _table = attr.Name; _projection = attr.Projection; _serializerType = attr.Serializer; } _members = GetMembers(type); _keys = _members.Where(a => a.IsKey).AsReadOnly(); }