Ejemplo n.º 1
0
        protected AbstractController(IRequestContext requestContext = null, IResponseContext responseContext = null)
        {
            _GlobalApp = GlobalApp.Instance;

            this.requestContext  = requestContext ?? new WebRequestContext();
            this.responseContext = responseContext ?? new WebResponseContext();
        }
Ejemplo n.º 2
0
 public static void Initialize(string dbConnectionStringName)
 {
     if (m_oneAndOnlyApp != null)
     {
         throw new InvalidOperationException("GlobalApp object has already been initialized!");
     }
     //Trace.TraceInformation("Initializing GlobalApp Instance...");
     m_oneAndOnlyApp = new GlobalApp(dbConnectionStringName);
 }
Ejemplo n.º 3
0
        protected void Application_Start()
        {
            //AreaRegistration.RegisterAllAreas();
            //GlobalConfiguration.Configure(WebApiConfig.Register);
            //FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            //RouteConfig.RegisterRoutes(RouteTable.Routes);


            //Http Client Protocol Settings
            System.Net.ServicePointManager.Expect100Continue       = false;
            System.Net.ServicePointManager.MaxServicePointIdleTime = 60 * 60 * 1000;//60 Minutes
            ServicePointManager.DefaultConnectionLimit             = 132;


            FileInfo fi = new FileInfo(System.Web.Hosting.HostingEnvironment.ApplicationPhysicalPath + "\\web.config");

            log4net.Config.XmlConfigurator.ConfigureAndWatch(fi);

            Assembly     assem     = Assembly.GetExecutingAssembly();
            AssemblyName assemName = assem.GetName();

            AggieGlobalLogManager.Info("=================================================================");
            AggieGlobalLogManager.Info("Starting SKYSITE-Web-API-Service v{0}", assemName.Version);
            AggieGlobalLogManager.Info("=================================================================");

            AreaRegistration.RegisterAllAreas();

            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            FilterConfig.RegisterHttpFilters(GlobalConfiguration.Configuration.Filters);

            RouteConfig.RegisterRoutes(RouteTable.Routes);


            FormatterConfig.RegisterFormatters(GlobalConfiguration.Configuration.Formatters);
            HandlerConfig.RegisterHandlers(GlobalConfiguration.Configuration.MessageHandlers);

            //Instnatiate the one & only instance of GlobalApp - facade design pattern to Provide an unified interface to a set of interfaces to deal with business functions
            if (_theGlobalApp == null)
            {
                string dbConnectionStringName = "AggieGlobalDB";
                GlobalApp.Initialize(dbConnectionStringName);
                _theGlobalApp = GlobalApp.Instance;
            }
        }
Ejemplo n.º 4
0
 public ProductResourcesManager(string dbConnectionStringName)
     : base(dbConnectionStringName)
 {
     this._globalApp = GlobalApp.Instance;
     //this.CurrentUser = userIdentity;
 }
Ejemplo n.º 5
0
 private void RegisterGlobalApp(IGlobalApp app)
 {
     app.Init(_api.OpenAPI, _api.GlobalAPI);
     GlobalApps.Add(app);
 }
Ejemplo n.º 6
0
 public ActivityManager(string dbConnectionStringName)
     : base(dbConnectionStringName)
 {
     this._globalApp = GlobalApp.Instance;
     //this.CurrentUser = userIdentity;
 }