예제 #1
0
 public void Change(string name, string defaultTheme,
                    DatabaseProviderConfiguration tenantDb)
 {
     Validate(name, defaultTheme, tenantDb);
     Name         = name;
     DefaultTheme = defaultTheme;
     TenantDb     = tenantDb;
 }
예제 #2
0
        public static Tenant Create(int id, string name, string defaultTheme,
                                    DatabaseProviderConfiguration tenantDb)
        {
            Validate(name, defaultTheme, tenantDb);

            return(new Tenant()
            {
                Id = id,
                Name = name,
                DefaultTheme = defaultTheme,
                TenantDb = tenantDb
            });
        }
예제 #3
0
 private static void Validate(string name, string defaultTheme,
                              DatabaseProviderConfiguration tenantDb)
 {
     if (String.IsNullOrWhiteSpace(name))
     {
         throw new ArgumentNullException(nameof(name));
     }
     if (String.IsNullOrWhiteSpace(defaultTheme))
     {
         throw new ArgumentNullException(nameof(defaultTheme));
     }
     if (tenantDb == null)
     {
         throw new ArgumentNullException(nameof(tenantDb));
     }
 }