示例#1
0
 protected override void ConfigureCaliburn(CoreConfiguration configuration)
 {
     configuration
         .WithPresentationFramework()
         .WithCompositeApplicationLibrary(CreateShell)
         .WithModuleCatalog(new ModuleCatalog().AddModule(typeof (Module1Loader)));
 }
示例#2
0
 public PaymentManager(CoreConfiguration config, IQuotaService quotaService, ITariffService tariffService)
 {
     this.config = config;
     this.quotaService = quotaService;
     this.tariffService = tariffService;
     partnerUrl = (ConfigurationManager.AppSettings["core.payment-partners"] ?? "https://partners.onlyoffice.com/api").TrimEnd('/');
     partnerKey = (ConfigurationManager.AppSettings["core.machinekey"] ?? "C5C1F4E85A3A43F5B3202C24D97351DF");
 }
示例#3
0
 public TariffService(ConnectionStringSettings connectionString, IQuotaService quotaService, ITenantService tenantService)
     : base(connectionString, "tenant")
 {
     this.quotaService = quotaService;
     this.tenantService = tenantService;
     this.config = new CoreConfiguration(tenantService);
     this.cache = AscCache.Default;
     this.CacheExpiration = DEFAULT_CACHE_EXPIRATION;
     this.test = ConfigurationManager.AppSettings["core.payment-test"] == "true";
 }
示例#4
0
 protected override void BeforeStart(CoreConfiguration core)
 {
     base.BeforeStart(core);
     core.AfterStart(() =>
     {
         var binder = (DefaultBinder)Container.GetInstance<IBinder>();
         binder.EnableBindingConventions();
         binder.EnableMessageConventions();
     });
 }
示例#5
0
        private static void ConfigureCoreContextByDefault()
        {
            var cs = DbRegistry.GetConnectionString("core");
            if (cs == null)
            {
                throw new ConfigurationErrorsException("Can not configure CoreContext: connection string with name core not found.");
            }

            var tenantService = new CachedTenantService(new DbTenantService(cs));
            var userService = new CachedUserService(new DbUserService(cs));
            var azService = new CachedAzService(new DbAzService(cs));
            var quotaService = new CachedQuotaService(new DbQuotaService(cs));
            var subService = new CachedSubscriptionService(new DbSubscriptionService(cs));
            var tariffService = new TariffService(cs, quotaService, tenantService);

            Configuration = new CoreConfiguration(tenantService);
            TenantManager = new TenantManager(tenantService, quotaService, tariffService);
            PaymentManager = new PaymentManager(Configuration, quotaService, tariffService);
            UserManager = new UserManager(userService);
            Authentication = new AuthManager(userService);
            AuthorizationManager = new AuthorizationManager(azService);
            SubscriptionManager = new SubscriptionManager(subService);
        }
示例#6
0
 /// <summary>
 /// Configures additional modules befores the starting the framework.
 /// </summary>
 /// <param name="core">The core.</param>
 protected virtual void BeforeStart(CoreConfiguration core) { }
示例#7
0
 public Core()
 {
     Configuration = new CoreConfiguration();
 }
 protected override void given_the_context_of()
 {
     _config = ConventionalModule<CoreConfiguration, ICoreServicesDescription>.Instance;
     _module = _config;
 }
 /// <summary>
 /// Configures the Caliburn framework.
 /// </summary>
 /// <param name="configuration">The core of Caliburn.</param>
 protected virtual void ConfigureCaliburn(CoreConfiguration configuration)
 {
 }
示例#10
0
 public UserProcessingService(CoreConfiguration config, IRepository repo, ILogger logger)
 {
     _config     = config ?? throw new ArgumentNullException(nameof(config));
     _repository = repo ?? throw new ArgumentNullException(nameof(repo));
     _logger     = logger ?? throw new ArgumentNullException(nameof(logger));
 }