EmailContent IEmailContentBuilder.GenerateContent(ITenant tenant) { return new EmailContent { MessageBody = this.someService.GenerateContent() }; }
EmailContent IEmailContentBuilder.GenerateContent(ITenant tenant) { return new EmailContent { MessageBody = "This is the default content." }; }
EmailContent IEmailContentBuilder.GenerateContent(ITenant tenant) { return new EmailContent { MessageBody = "This is content for ruby tenant." }; }
public StyleGuidelineController(ITenant tenant, ISiteContext siteContext, IBenefitsModelFactory benefitsModelFactory) { _tenant = tenant; _siteContext = siteContext; _benefitsModelFactory = benefitsModelFactory; }
private IEmailContentBuilder GetTenantSpecificEmailContentBuilder(ITenant tenant) { var result = this.emailContentBuilders .OfType<ITenantOverride>() .Where(t => t.IsForThisTenant(tenant)) .OfType<IEmailContentBuilder>() .FirstOrDefault(); return result; }
public TenantInstance(ITenant tenant) { if (tenant == null) { throw new ArgumentNullException("tenant"); } Tenant = tenant; Id = Guid.NewGuid(); Properties = new Dictionary<string, object>(); }
IEmailContentBuilder IEmailContentBuilderFactory.GetBuilder(ITenant tenant) { var result = GetTenantSpecificEmailContentBuilder(tenant); if (result == null) result = defaultEmailContentBuilder; if (result == null) result = emailContentBuilders.FirstOrDefault(); if (result == null) throw new ArgumentNullException(); return result; }
public void SetUp() { var config = new DocumentStoreTestConfiguration(_engineVersion); MongoDbTestConnectionProvider.DropTestsTenant(); config.SetTestAddress(TestConfig.ServerAddress); _documentStoreService = new DocumentStoreBootstrapper(); _documentStoreService.Start(config); _documentStoreClient = new DocumentStoreServiceClient( TestConfig.ServerAddress, TestConfig.Tenant ); _tenant = ContainerAccessor.Instance.Resolve<TenantManager>().Current; _projections = _tenant.Container.Resolve<ITriggerProjectionsUpdate>(); _documentDescriptorCollection = MongoDbTestConnectionProvider.ReadModelDb.GetCollection<DocumentDescriptorReadModel>("rm.DocumentDescriptor"); _documentCollection = MongoDbTestConnectionProvider.ReadModelDb.GetCollection<DocumentReadModel>("rm.Document"); _commitCollection = MongoDbTestConnectionProvider.ReadModelDb.GetCollection<BsonDocument>("Commits"); _blobStore = _tenant.Container.Resolve<IBlobStore>(); MongoFlatMapper.EnableFlatMapping(true); }
public int BillingDetails_crud(ITenant _tenant, BillingDetails BillingDetails) { _tenantlist = _tenant; return(_tenantlist.BillingDetails_crud(BillingDetails)); }
public int InsertPlanFeature(ITenant _tenant, string PlanName, string FeatureID, int UserMasterID, int TenantId) { _tenantlist = _tenant; return(_tenantlist.InsertPlanFeature(PlanName, FeatureID, UserMasterID, TenantId)); }
public TenantResolver(ITenant <TenantReadModel> tenant) { _tenant = tenant; }
public SlidersController(ITenant <AppTenant> tenant, ApplicationDbContext context) : base(context, tenant) { }
public TenantJobsInstaller(ITenant tenant) { _tenant = tenant; }
public HotColdCoordinator(IDocumentStore store, DaemonSettings settings, ILogger logger) { _settings = settings; _logger = logger; _tenant = store.As <DocumentStore>().Tenancy.Default; }
public TenantPrincipal(ITenant tenant, TenantIdentity identity) { Tenant = tenant; _identity = identity; }
/// <summary> /// Adds a new tenant to resolver /// </summary> /// <param name="tenant">The tenant instance</param> public void Add(ITenant tenant) { Tenants.Add(tenant); }
public abstract NpgsqlCommand BuildLoadManyCommand(TId[] ids, ITenant tenant);
protected EntityCreateModelBase(ITenant <TenantReadModel> tenant, IMediator mediator, ILoggerFactory loggerFactory) : base(tenant, mediator, loggerFactory) { Entity = new TEntity(); }
public TenantCoreInstaller(ITenant tenant) { _tenant = tenant; }
/// <summary> /// Resolves the module of the appropriate application tenant /// </summary> /// <param name="context">Request context used to select the module</param> /// <returns>Module from the appropriate tenant</returns> public IContainer Resolve(RequestContext context) { this.Tenant = this.tenantSelector.Select(context); return this.Tenant.DependencyContainer; }
private TenantInstance StartInstance(ITenant tenant) { var instance = new TenantInstance(tenant); runningInstances.Add(instance, ShutdownInstance); Log("Started instance '{0}'", instance.Id); return instance; }
public List <CompanyTypeModel> GetCompanyType(ITenant _tenant) { _tenantlist = _tenant; return(_tenantlist.GetCompanyType()); }
public Demo2OnlyController(ITenant tenant) : base(tenant) { }
public string GetAutoInstallPackagesUiUrl(ITenant tenant, IContainer container, bool forContentApp, int appId) { return("mvc not implemented #todo #mvc"); }
// TODO: Move this to a shared localization class..? private bool IsDefaultUICulture(string cultureName, ITenant tenant) { return tenant.DefaultLocale.Name.Equals(cultureName, StringComparison.InvariantCultureIgnoreCase); }
/// <summary> /// Constructor /// </summary> /// <param name="tenant"></param> public HomeController(ITenant tenant) : base(tenant) { }
public ApplicationUsersController(ApplicationDbContext context, ITenant <AppTenant> tenant, UserManager <ApplicationUser> _userManager) { this.tenant = tenant?.Value; this._context = context; this._userManager = _userManager; }
/// <summary> /// Constructor /// </summary> /// <param name="tenant"></param> public StoreController(ITenant tenant) : base(tenant) { }
public DocumentCleaner(StoreOptions options, ITenant tenant) { _options = options; _tenant = tenant; }
public IdAssignment <T> ToIdAssignment <T>(ITenant tenant) { return(Parent.ToIdAssignment <T>(tenant)); }
public TenantConfig(ITenant tenant, IEnumerable <ITenantDataProvider <T> > providers) { _tenant = tenant; _providers = providers; }
public ProductTagsController(ApplicationDbContext context, ITenant<AppTenant> tenant) : base(context, tenant) { }
public TenantSliceGroup(ITenant tenant) { Tenant = tenant; Slices = new LightweightCache <TId, EventSlice <TDoc, TId> >(id => new EventSlice <TDoc, TId>(id, Tenant)); }
public RegionsController(ApplicationDbContext context, ITenant <AppTenant> tenant) : base(context, tenant) { }
public void EnsureStorageExists(ITenant tenant) { }
public int InsertCompany(ITenant _tenant, CompanyModel companyModel) { _tenantlist = _tenant; return(_tenantlist.InsertCompany(companyModel)); }
public CommerceSettingsController(ITenant <AppTenant> tenant, ApplicationDbContext context) : base(context, tenant) { }
public int OtherDetails(ITenant _tenant, OtherDetailsModel OtherDetails) { _tenantlist = _tenant; return(_tenantlist.OtherDetails(OtherDetails)); }
public IStorageOperation Overwrite(IEvent document, IMartenSession session, ITenant tenant) { throw new NotSupportedException(); }
public List <GetPlanDetails> GetPlanDetails(ITenant _tenant, int CustomPlanID, int TenantId) { _tenantlist = _tenant; return(_tenantlist.GetPlanDetails(CustomPlanID, TenantId)); }
public void TruncateDocumentStorage(ITenant tenant) { tenant.RunSql($"truncate table {Events.DatabaseSchemaName}.mt_streams cascade"); }
public int AddPlan(ITenant _tenant, TenantPlan _tenantPlan) { _tenantlist = _tenant; return(_tenantlist.AddPlan(_tenantPlan)); }
public Task TruncateDocumentStorageAsync(ITenant tenant) { return(tenant.RunSqlAsync($"truncate table {Events.DatabaseSchemaName}.mt_streams cascade")); }
public TenantHandlersInstaller(ITenant tenant) { _tenant = tenant; }
public IDeletion DeleteForDocument(IEvent document, ITenant tenant) { throw new NotSupportedException(); }
public TenantAwareController(ITenant tenant) { this.Model = new BaseViewModel(); this.Model.Tenant = tenant; }
bool ITenantOverride.IsForThisTenant(ITenant tenant) { return tenant != null && tenant.TenantId == "ruby"; }
private static bool IsRouteDisabled(ITenant tenant, string controller, string action) { if (tenant.DisabledFeatures != null) { foreach (IFeature rootFeature in tenant.DisabledFeatures.Features) { //Check if feature complex and if the root feature matches the controller if (rootFeature is IComplexFeature && rootFeature.FeatureName.Equals(controller, StringComparison.OrdinalIgnoreCase)) { foreach (IFeature subFeature in ((IComplexFeature)rootFeature).SubFeatures) { if (action.Equals(subFeature.FeatureName)) { //Subfeature found in disabled list. Don't route to it. return true; } } } } } return false; }
async Task<ITenant> IClient.GetCurrentTenantAsync(CancellationToken cancellationToken) { this.tenant = await this.dataStoreAsync .GetResourceAsync<ITenant>(this.CurrentTenantHref, cancellationToken) .ConfigureAwait(false); return this.tenant; }
ITenant IClientSync.GetCurrentTenant() { this.tenant = this.dataStoreSync.GetResource<ITenant>(this.CurrentTenantHref); return this.tenant; }
public DashboardController(ITenant <AppTenant> tenant, ApplicationDbContext context) : base(context, tenant) { }
public QuerySession(DocumentStore store, IManagedConnection connection, IQueryParser parser, IIdentityMap identityMap, ITenant tenant) { Tenant = tenant; _store = store; _connection = connection; _parser = parser; _identityMap = identityMap; WriterPool = store.CreateWriterPool(); Serializer = store.Serializer; }
public void DeleteAllDocuments(ITenant factory) { factory.RunSql( $"delete from {Parent.Table.QualifiedName} where {DocumentMapping.DocumentTypeColumn} = '{Alias}'"); }
private static IManagedConnection buildManagedConnection(SessionOptions options, ITenant tenant, CommandRunnerMode commandRunnerMode) { // Hate crap like this, but if we don't control the transation, use External to direct // IManagedConnection not to call commit or rollback if (!options.OwnsTransactionLifecycle && commandRunnerMode != CommandRunnerMode.ReadOnly) { commandRunnerMode = CommandRunnerMode.External; } if (options.Transaction != null) { options.Connection = options.Transaction.Connection; } if (options.Connection == null) { return(tenant.OpenConnection(commandRunnerMode, options.IsolationLevel, options.Timeout)); } else { return(new ManagedConnection(options, commandRunnerMode)); } }
public HomeController(ITenant<AppTenant> tenant) { this.tenant = tenant?.Value; }