Exemple #1
0
        static GraffitiUsers()
        {
            string controller_Type = ConfigurationManager.AppSettings["Graffiti::Users::IGraffitiUserController"] ??
                                     "Graffiti.Core.GraffitiCoreUserController, Graffiti.Core";

            Type type = Type.GetType(controller_Type);

            if (type == null)
                throw new Exception("The Type: " + controller_Type + " does not exist");

            controller = Activator.CreateInstance(type) as IGraffitiUserController;

            if(controller == null)
                throw new Exception("The Type: " + controller_Type + " could not be instantiated as a IGraffitiUserController");
        }
Exemple #2
0
        static GraffitiUsers()
        {
            string controller_Type = ConfigurationManager.AppSettings["Graffiti::Users::IGraffitiUserController"] ??
                                     "Graffiti.Core.GraffitiCoreUserController, Graffiti.Core";

            Type type = Type.GetType(controller_Type);

            if (type == null)
            {
                throw new Exception("The Type: " + controller_Type + " does not exist");
            }

            controller = Activator.CreateInstance(type) as IGraffitiUserController;

            if (controller == null)
            {
                throw new Exception("The Type: " + controller_Type + " could not be instantiated as a IGraffitiUserController");
            }
        }