Ejemplo n.º 1
0
        public static void Register(IConfigService configService, IResourceService resourceService, IEncryptionService encryptionService, IAccessPolicyProvider accessPolicyProvider, IUtilityProvider utilityProvider, ISiteConfigProvider siteConfigProvider)
        {
            if (configService == null)
            {
                throw new Exception("Please provide a config service");
            }

            if (resourceService == null)
            {
                throw new Exception("Please provide a resource service");
            }

            if (encryptionService == null)
            {
                throw new Exception("Please provide a Encryption service");
            }

            if (accessPolicyProvider == null)
            {
                throw new Exception("Please provide a Access Policy Service Provider");
            }

            if (utilityProvider == null)
            {
                throw new Exception("Please provide a Utility Provider");
            }

            if (siteConfigProvider == null)
            {
                throw new Exception("Please provide a Site Specific Config Service");
            }

            ConfigService        = configService;
            ResourceService      = resourceService;
            EncryptionService    = encryptionService;
            AccessPolicyProvider = accessPolicyProvider;
            UtilityProvider      = utilityProvider;
            SiteConfigProvider   = siteConfigProvider;
            ControlConfigReader  = ConfigurationReader.Instance;
            PropertyConfigurator.Configure();
        }
Ejemplo n.º 2
0
        public static void Register(IConfigService configService, IResourceService resourceService, IEncryptionService encryptionService, IAccessPolicyProvider accessPolicyProvider, IUtilityProvider utilityProvider, ISiteConfigProvider siteConfigProvider)
        {
            if (configService == null)
            {
                throw new Exception("Please provide a config service");
            }

            if (resourceService == null)
            {
                throw new Exception("Please provide a resource service");
            }

            if (encryptionService == null)
            {
                throw new Exception("Please provide a Encryption service");
            }

            if (accessPolicyProvider == null)
            {
                throw new Exception("Please provide a Access Policy Service Provider");
            }

            if(utilityProvider == null)
            {
                throw new Exception("Please provide a Utility Provider");
            }

            if (siteConfigProvider == null)
            {
                throw new Exception("Please provide a Site Specific Config Service");
            }

            ConfigService = configService;
            ResourceService = resourceService;
            EncryptionService = encryptionService;
            AccessPolicyProvider = accessPolicyProvider;
            UtilityProvider = utilityProvider;
            SiteConfigProvider = siteConfigProvider;
            ControlConfigReader = ConfigurationReader.Instance;
            PropertyConfigurator.Configure();
        }