コード例 #1
0
		protected MetaMember (MetaType declaringType, MemberInfo member)
		{
			Precondition.Require(declaringType, () => Error.ArgumentNull("declaringType"));
			Precondition.Require(member, () => Error.ArgumentNull("member"));
			
			_declaringType = declaringType;
			_member = member;
			_type = member.GetMemberType();
			_accessor = new MetaAccessor(member);
		}
コード例 #2
0
		public AttributedMetaColumn (MetaType declaringType, 
			MemberInfo member, ColumnAttribute attribute)
			: base(declaringType, member)
		{
			Precondition.Require(attribute, () => Error.ArgumentNull("attribute"));
			
			_name = attribute.Name ?? member.Name;
			_autoGenerated = attribute.AutoGenerated;
			_autoUpdate = attribute.AutoUpdate;
			_isKey = attribute.IsKey;
			_isNullable = attribute.Nullable;
			_binderType = attribute.Binder;
		}
コード例 #3
0
		public AttributedMetaAssociation (MetaType declaringType, 
			MemberInfo member, AssociationAttribute attribute)
			: base(declaringType, member)
		{
			Precondition.Require(attribute, () => Error.ArgumentNull("attribute"));
			
			_isNullable = attribute.CanBeNull;
			_isProjected = attribute.Projected;
			_isPersistent = attribute.Persistent;
			_thisKey = attribute.ThisKey ?? ((_isPersistent) ? member.Name : null);
			_otherKey = attribute.OtherKey;
			_prefix = attribute.Prefix ?? String.Concat(member.Name, ".");
		}
コード例 #4
0
		protected MetaColumn (MetaType declaringType, MemberInfo member)
			: base(declaringType, member)
		{
		}
コード例 #5
0
		protected MetaAssociation (MetaType declaringType, MemberInfo member)
			: base(declaringType, member)
		{
			_isMany = Type.IsSequence();
		}