Automatically Maps the Class identified by a TypeWrapper to a ClassDefinition IClassDef
Ejemplo n.º 1
0
        /// <summary>
        /// Must the Class wrapped by the <paramref name="typeWrapper"/>
        /// be mapped.
        /// </summary>
        /// <param name="typeWrapper"></param>
        /// <returns></returns>
        public static bool MustBeMapped(this TypeWrapper typeWrapper)
        {
            if (typeWrapper.IsNull())
            {
                return(false);
            }
            var autoMapper = new ClassAutoMapper(typeWrapper);

            return(autoMapper.MustBeMapped());
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Maps the Class of <paramref name="typeWrapper"/> to a ClassDef.
        /// Note_ this will not create the reverse relationships on
        /// the Related Class if they are required. If you require reverse relationships to be set up then please
        /// use the <see cref="AllClassesAutoMapper"/>
        /// </summary>
        /// <param name="typeWrapper"></param>
        /// <returns></returns>
        public static IClassDef MapClass(this TypeWrapper typeWrapper)
        {
            if (typeWrapper.IsNull())
            {
                return(null);
            }
            var autoMapper = new ClassAutoMapper(typeWrapper);

            return(autoMapper.Map());
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Must the Class wrapped by the <paramref name="typeWrapper"/>
 /// be mapped.
 /// </summary>
 /// <param name="typeWrapper"></param>
 /// <returns></returns>
 public static bool MustBeMapped(this TypeWrapper typeWrapper)
 {
     if (typeWrapper.IsNull()) return false;
     var autoMapper = new ClassAutoMapper(typeWrapper);
     return autoMapper.MustBeMapped();
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Maps the Class of <paramref name="typeWrapper"/> to a ClassDef.
 /// Note_ this will not create the reverse relationships on
 /// the Related Class if they are required. If you require reverse relationships to be set up then please
 /// use the <see cref="AllClassesAutoMapper"/>
 /// </summary>
 /// <param name="typeWrapper"></param>
 /// <returns></returns>
 public static IClassDef MapClass(this TypeWrapper typeWrapper)
 {
     if (typeWrapper.IsNull()) return null;
     var autoMapper = new ClassAutoMapper(typeWrapper);
     return autoMapper.Map();
 }