コード例 #1
0
        /// <summary>
        /// Get the Domain entity Service object that supports(CRUD) operations.
        /// </summary>
        /// <param name="type"></param>
        /// <returns></returns>
        public static object GetValdiator(Type type)
        {
            EntityRegistrationContext ctx = _managableEntities[type.FullName];

            if (ctx.FactoryMethodForValidator != null)
            {
                return(ctx.FactoryMethodForValidator());
            }

            return(_entityRegistrarIoc.GetValidator(type.FullName));
        }
コード例 #2
0
        /// <summary>
        /// Get instance of entity validator.
        /// </summary>
        /// <param name="typeFullName">typeof(T).FullName</param>
        /// <returns></returns>
        public static object GetValidator(string typeFullName)
        {
            EntityRegistrationContext ctx = _managableEntities[typeFullName];

            if (ctx.FactoryMethodForValidator != null)
            {
                return(ctx.FactoryMethodForValidator());
            }

            return(ctx.Validator);
        }