Example #1
0
        internal static DataServiceProvider Create(SchemeConfiguration schemeConfiguration)
        {
            var domainName = $"{schemeConfiguration.DomainName}".ToLower();

            if (string.IsNullOrEmpty(domainName))
            {
                throw new ArgumentNullException($"DomainName in {nameof(SchemeConfiguration)} must not be null.");
            }

            if (WinFormium.Runtime.Container.IsRegistered <DataServiceProvider>(domainName))
            {
                throw new ArgumentException($"Provider with same domain name \"{domainName}\" has already existed.");
            }


            var provider = new DataServiceProvider(schemeConfiguration);

            WinFormium.Runtime.Container.RegisterInstance(provider, domainName);

            return(provider);
        }
Example #2
0
 public ResourceHandler(SchemeConfiguration configuration)
 {
     Configuration = configuration;
 }
Example #3
0
 private DataServiceProvider(SchemeConfiguration configuration)
 {
     Configuration = configuration;
 }