Esempio n. 1
0
        public ApplicationCore(string organizationName, string applicationName)
        {
            string hostName = "bamapps.net";
            int    port     = 80;

            CoreClient = new CoreClient(organizationName, applicationName, hostName, port, new CoreLoggerClient(hostName, port));
        }
Esempio n. 2
0
 public ApplicationConfigurationProvider(CoreClient client)
 {
     Args.ThrowIfNull(client, "client");
     Args.ThrowIfNull(client.ConfigurationService, "client.ConfigurationService");
     CoreClient     = client;
     Configurations = new Dictionary <string, Dictionary <string, Dictionary <string, string> > >();
     SaveDefaultConfiguration();
 }
Esempio n. 3
0
 public CoreAsyncProxyableService()
     : base(
         new AsyncCallbackService(new AsyncCallback.Data.Dao.Repository.AsyncCallbackRepository(), Server.AppConf.FromDefaultConfig()),
         DataSettings.Current.GetSysDaoRepository(), Server.AppConf.FromDefaultConfig())
 {
     CoreClient   = new CoreClient();
     _userManager = CoreClient.UserRegistryService;
 }
Esempio n. 4
0
 public ApplicationLogger(CoreClient client, ApplicationLogDatabase logDb)
 {
     Args.ThrowIfNull(client, "client");
     CoreClient = client;
     _daoLogger = new DaoLogger2(logDb)
     {
         CommitCycleDelay = 5000
     };
 }
Esempio n. 5
0
        public CoreProxyableService()
        {
            CoreClient = new CoreClient();
            ServiceRegistry registry = ApplicationServiceRegistryContainer.Instance;
            UserManager     userMgr  = registry.Get <UserManager>();

            DataSettings.Current.Init(userMgr);
            _userManager = userMgr;
        }
Esempio n. 6
0
        private static ServiceRegistry GetServiceRegistry(CoreClient coreClient)
        {
            string contentRoot        = DefaultConfiguration.GetAppSetting("ContentRoot", "c:\\bam\\content");
            string organization       = DefaultConfiguration.GetAppSetting("Organization", "PUBLIC");
            string applicationName    = DefaultConfiguration.GetAppSetting("ApplicationName", "UNKNOWN");
            string databasesPath      = Path.Combine(contentRoot, "Databases");
            string workspaceDirectory = Path.Combine(contentRoot, "Workspace");

            ApplicationLogDatabase logDb = new ApplicationLogDatabase(workspaceDirectory);

            return((ServiceRegistry)(new ServiceRegistry())
                   .For <CoreClient>().Use(coreClient)
                   .For <ApplicationLogDatabase>().Use(logDb)
                   .For <ILogger>().Use <ApplicationLogger>()
                   .For <ILog>().Use <ApplicationLogger>()
                   .For <IConfigurationService>().Use <ApplicationConfigurationProvider>()
                   .For <IUserManager>().Use(coreClient.UserRegistryService));
        }
Esempio n. 7
0
        public static ServiceRegistry CreateTestingServicesRegistryForProd()
        {
            CoreClient coreClient = new CoreClient("heart.bamapps.net", 80);

            return(GetServiceRegistry(coreClient));
        }
Esempio n. 8
0
        public static ServiceRegistry CreateTestingServicesRegistryForDev()
        {
            CoreClient coreClient = new CoreClient(DefaultConfiguration.GetAppSetting("CoreHostName", "localhost"), DefaultConfiguration.GetAppSetting("CorePort", "9101").ToInt());

            return(GetServiceRegistry(coreClient));
        }