public static void ResetAllFeatures <TTenant, TUser>(this MajidTenantManager <TTenant, TUser> tenantManager, int tenantId)
     where TTenant : MajidTenant <TUser>
     where TUser : MajidUserBase
 {
     AsyncHelper.RunSync(() => tenantManager.ResetAllFeaturesAsync(tenantId));
 }
 public static void SetFeatureValue <TTenant, TUser>(this MajidTenantManager <TTenant, TUser> tenantManager, TTenant tenant, string featureName, string value)
     where TTenant : MajidTenant <TUser>
     where TUser : MajidUserBase
 {
     AsyncHelper.RunSync(() => tenantManager.SetFeatureValueAsync(tenant, featureName, value));
 }
 public static void Create <TTenant, TUser>(this MajidTenantManager <TTenant, TUser> tenantManager, TTenant tenant)
     where TTenant : MajidTenant <TUser>
     where TUser : MajidUserBase
 {
     AsyncHelper.RunSync(() => tenantManager.CreateAsync(tenant));
 }
 public static void SetFeatureValues <TTenant, TUser>(this MajidTenantManager <TTenant, TUser> tenantManager, int tenantId, params NameValue[] values)
     where TTenant : MajidTenant <TUser>
     where TUser : MajidUserBase
 {
     AsyncHelper.RunSync(() => tenantManager.SetFeatureValuesAsync(tenantId, values));
 }
 public static IReadOnlyList <NameValue> GetFeatureValues <TTenant, TUser>(this MajidTenantManager <TTenant, TUser> tenantManager, int tenantId)
     where TTenant : MajidTenant <TUser>
     where TUser : MajidUserBase
 {
     return(AsyncHelper.RunSync(() => tenantManager.GetFeatureValuesAsync(tenantId)));
 }
 public static string GetFeatureValueOrNull <TTenant, TUser>(this MajidTenantManager <TTenant, TUser> tenantManager, int tenantId, string featureName)
     where TTenant : MajidTenant <TUser>
     where TUser : MajidUserBase
 {
     return(AsyncHelper.RunSync(() => tenantManager.GetFeatureValueOrNullAsync(tenantId, featureName)));
 }
 public static TTenant FindByTenancyName <TTenant, TUser>(this MajidTenantManager <TTenant, TUser> tenantManager, string tenancyName)
     where TTenant : MajidTenant <TUser>
     where TUser : MajidUserBase
 {
     return(AsyncHelper.RunSync(() => tenantManager.FindByTenancyNameAsync(tenancyName)));
 }
 public static TTenant GetById <TTenant, TUser>(this MajidTenantManager <TTenant, TUser> tenantManager, int id)
     where TTenant : MajidTenant <TUser>
     where TUser : MajidUserBase
 {
     return(AsyncHelper.RunSync(() => tenantManager.GetByIdAsync(id)));
 }