Esempio n. 1
0
        private static Type GetEmptyClassFromBuildNewHandler(DataTypeDescriptor dataTypeDescriptor)
        {
            Type             buildNewHandlerType = TypeManager.GetType(dataTypeDescriptor.BuildNewHandlerTypeName);
            IBuildNewHandler buildNewHandler     = (IBuildNewHandler)Activator.CreateInstance(buildNewHandlerType);

            Type dataType = DataTypeTypesManager.GetDataType(dataTypeDescriptor);

            VerifyAssemblyLocation(dataType);

            return(buildNewHandler.GetTypeToBuild(dataType));
        }
Esempio n. 2
0
        private static Type GetEmptyClassFromBuildNewHandler(DataTypeDescriptor dataTypeDescriptor)
        {
            Type             buildNewHandlerType = TypeManager.GetType(dataTypeDescriptor.BuildNewHandlerTypeName);
            IBuildNewHandler buildNewHandler     = (IBuildNewHandler)Activator.CreateInstance(buildNewHandlerType);

            Type dataType = DataTypeTypesManager.GetDataType(dataTypeDescriptor);

            if (!DataTypeTypesManager.IsAllowedDataTypeAssembly(dataType))
            {
                string message = string.Format("The data interface '{0}' is not located in an assembly in the website Bin folder. Please move it to that location", dataType);
                Log.LogError("EmptyDataClassTypeManager", message);
                throw new InvalidOperationException(message);
            }

            return(buildNewHandler.GetTypeToBuild(dataType));
        }