示例#1
0
 /// <summary>
 /// Creates a new <see cref="T:TypeMap" /> with the specified <see cref="T:Type" /> and <see cref="T:IMappingProvider" />.
 /// </summary>
 /// <param name="t"><see cref="T:Type" /> of object to map.</param>
 /// <param name="provider"><see cref="T:IMappingProvider" /> to use for creating a <see cref="T:TypeMap" /></param>
 public TypeMap( Type t, IMappingProvider provider )
 {
     this.m_fields = new List<FieldMap>();
     this.m_children = new List<PersistentFieldMap>();
     this.m_referenced = new List<FieldMap>();
     this.m_foreignkeys = new List<FieldMap>();
     this.Warnings = new List<string>();
     this.Type = t;
     this.NamingConvention = ConventionTable.Instance.NamingConvention;
     provider.MapByType( t, this );
 }