Exemple #1
0
        public static T TenantId <T>(this ITenantSession session)
        {
            if (string.IsNullOrEmpty(session.TenantId))
            {
                throw new InvalidOperationException("This ITenantSession.TenantId is Null or Empty");
            }

            return(session.TenantId.To <T>());
        }
Exemple #2
0
 public TenantOptionsFactory(
     IEnumerable <IConfigureOptions <TOptions> > setups,
     IEnumerable <IPostConfigureOptions <TOptions> > postSetups,
     Action <TOptions, Tenant> tenantSetup,
     ITenantSession tenantSession)
 {
     _setups        = setups;
     _postSetups    = postSetups;
     _tenantSession = tenantSession;
     _tenantSetup   = tenantSetup;
 }
 public PreInsertTenantEntityHook(ITenantSession session)
 {
     _session = session ?? throw new ArgumentNullException(nameof(session));
 }
Exemple #4
0
 public PreInsertTenantEntityHook(ITenantSession context)
 {
     _context = context ?? throw new ArgumentNullException(nameof(context));
 }
 public FrontEndController(ITenantSession tenantSession)
 {
     _tenantSession = tenantSession;
 }
Exemple #6
0
 public TaskContext(IUserInterface ui, ILogger logger, HybridConfiguration hybridConfigurationObject, IOnPremisesSession onPremisesSession, ITenantSession tenantSession)
 {
     this.UI     = ui;
     this.Logger = logger;
     this.HybridConfigurationObject = hybridConfigurationObject;
     this.OnPremisesSession         = onPremisesSession;
     this.TenantSession             = tenantSession;
     this.Parameters = new ContextParameters();
     this.Errors     = new List <LocalizedString>();
     this.Warnings   = new List <LocalizedString>();
 }
 public TenantOptionsCache(ITenantSession tenantSession)
 {
     _tenantSession = tenantSession;
 }