示例#1
0
 public string GetSchema(EntityArea area)
 {
     string schema;
       if (SchemaMappings.TryGetValue(area.Name, out schema))
     return schema;
       return area.Name;
 }
示例#2
0
 public OperationLogModule(EntityArea area, LogLevel logLevel = LogLevel.Details)
     : base(area, "OperationLog", "Operation log module.", version: CurrentVersion)
 {
     this.LogLevel = logLevel;
       RegisterEntities(typeof(IOperationLog));
       App.RegisterService<IOperationLogService>(this);
 }
示例#3
0
 public DbInfoModule(EntityArea area)
     : base(area, "DbInfo", version: CurrentVersion)
 {
     RegisterEntities(typeof(IDbInfo), typeof(IDbModuleInfo));
       this.RegisterSize("AppVersion", 20);
       App.RegisterService<IDbInfoService>(this);
 }
示例#4
0
 public TemplateModule(EntityArea area, TemplateModuleSettings settings = null)
     : base(area, "TemplateModule", version: CurrentVersion)
 {
     _settings = settings ?? new TemplateModuleSettings();
       RegisterEntities(typeof(ITextTemplate));
       App.RegisterService<ITemplateTransformService>(this);
 }
示例#5
0
 public DbUpgradeLogModule(EntityArea area, string name = "DbUpgradeLog")
     : base(area, name, version: CurrentVersion)
 {
     RegisterEntities(EntityTypes);
       App.RegisterService<IDbUpgradeLogService>(this);
       var dsService = App.DataAccess;
       dsService.Events.DataSourceStatusChanging += Events_DataSourceStatusChanging;
 }
示例#6
0
 public TransactionLogModule(EntityArea area, TransactionLogSettings settings = null)
     : base(area, "TransactionLog", version: CurrentVersion)
 {
     Settings = settings ?? new TransactionLogSettings();
       App.RegisterConfig(Settings);
       RegisterEntities(typeof(ITransactionLog));
       App.RegisterService<ITransactionLogService>(this);
 }
示例#7
0
 public OAuthClientModule(EntityArea area, OAuthClientSettings settings = null)
     : base(area, "OAuthClient", version: CurrentVersion)
 {
     Settings = settings ?? new OAuthClientSettings();
       this.App.RegisterConfig(this.Settings);
       RegisterEntities(typeof(IOAuthRemoteServer), typeof(IOAuthRemoteServerAccount), typeof(IOAuthAccessToken),
       typeof(IOAuthClientFlow), typeof(IOAuthOpenIdToken), typeof(IOAuthExternalUser));
       App.RegisterService<IOAuthClientService>(this);
       Requires<EncryptedData.EncryptedDataModule>();
 }
示例#8
0
 public LoginModule(EntityArea area, LoginModuleSettings settings, string name = null)
     : base(area, name ?? "LoginModule", "Login module", version: CurrentVersion)
 {
     _settings = settings;
       App.RegisterConfig(_settings);
       //Register entities
       RegisterEntities(typeof(ILogin), typeof(ISecretQuestion), typeof(ISecretQuestionAnswer),  typeof(ITrustedDevice),
       typeof(ILoginExtraFactor), typeof(IPasswordHistory), typeof(ILoginProcess));
       //Register services
       App.RegisterService<ILoginService>(this);
       App.RegisterService<ILoginProcessService>(this);
       App.RegisterService<ILoginManagementService>(this);
       App.RegisterService<ILoginAdministrationService>(this);
       Requires<EncryptedDataModule>();
       Requires<TextTemplates.TemplateModule>();
       RegisterSize("EventType", 50);
       // Create recaptcha service if settings are there
       if (_settings.Recaptcha != null) {
     var recaptcha = new RecaptchaService(_settings.Recaptcha);
     App.RegisterService<IRecaptchaService>(recaptcha);
       }
 }
示例#9
0
        public BooksModule(EntityArea area)
            : base(area, "Books", "Books module", version: CurrentVersion)
        {
            RegisterEntities(typeof(IBook), typeof(IPublisher), typeof(IAuthor), typeof(IBookAuthor), typeof(IBookReview),
                       typeof(IUser), typeof(IBookOrder), typeof(IBookOrderLine),  typeof(ICoupon), typeof(IImage));

              //Register companion types that describe keys and indexes on entities
              RegisterCompanionTypes(
              typeof(IBookKeys), typeof(IAuthorKeys), typeof(IPublisherKeys));
              //Add extra tracking columns in book, order, coupon entities
              var tranLogExt = new TransactionLogModelExtender();
              tranLogExt.AddUpdateStampColumns(new[] { typeof(IBook), typeof(IBookOrder), typeof(IBookOrderLine), typeof(ICoupon) },
            createIdPropertyName: "CreatedIn", updateIdPropertyName: "UpdatedIn");
              App.ModelExtenders.Add(tranLogExt);
              //Set cached types
              App.CacheSettings.AddCachedTypes(CacheType.FullSet, typeof(IBook), typeof(IPublisher), typeof(IAuthor), typeof(IBookAuthor));
              App.CacheSettings.AddCachedTypes(CacheType.Sparse, typeof(IBookOrder), typeof(IBookOrderLine), typeof(IUser), typeof(IImage));
              //Register api controllers
              App.ApiConfiguration.RegisterControllerTypes(typeof(CatalogController), typeof(UserAccountController), typeof(SignupController));

              RegisterViews();
        }
示例#10
0
 public IncidentLogModule(EntityArea area, string name = "IncidentLog")
     : base(area, name, version: CurrentVersion)
 {
     RegisterEntities(typeof(IIncidentLog), typeof(IIncidentAlert));
       App.RegisterService<IIncidentLogService>(this);
 }
示例#11
0
 public DataHistoryModule(EntityArea area)
     : base(area, "DataHistory", version: CurrentVersion)
 {
     this.RegisterEntities(typeof(IDataHistory));
       App.RegisterService<IDataHistoryService>(this);
 }
示例#12
0
 public SequenceTestModule(EntityArea area)
     : base(area, "SequenceTestModule")
 {
     RegisterEntities(typeof(ICar), typeof(IPerson));
       this.RegisterSequence(IntSequence, typeof(int));
       this.RegisterSequence(LongSequence, typeof(long));
 }
示例#13
0
 public EncryptedDataModule(EntityArea area)
     : base(area, "EncryptedData", version: CurrentVersion)
 {
     RegisterEntities(typeof(IEncryptedData));
       App.RegisterService<IEncryptionService>(this);
 }
示例#14
0
 public DbSchemaInfo(DbModel model, EntityArea area, string schema)
     : base(model, schema, DbObjectType.Schema, area)
 {
     Area = area;
       base.GlobalName = Schema;
 }
示例#15
0
 public ErrorLogModule(EntityArea area)
     : base(area, "ErrorLog", "Error Logging Module.", version: CurrentVersion)
 {
     RegisterEntities(typeof(IErrorLog));
       App.RegisterService<IErrorLogService>(this);
 }
示例#16
0
 public EntityModuleV1(EntityArea area)
     : base(area, "TestModule", version: new Version("1.0.0.0"))
 {
     RegisterEntities(typeof(IParentEntity), typeof(IChildEntity), typeof(IEntityToDelete), typeof(ITable));
 }
示例#17
0
 public LockTestModule(EntityArea area)
     : base(area, "LockTestModule", version: new Version("1.0.0.0"))
 {
     RegisterEntities(typeof(IDoc), typeof(IDocDetail));
 }
示例#18
0
 public NotificationLogModule(EntityArea area)
     : base(area, "NotificationLog", version: CurrentVersion)
 {
     RegisterEntities(typeof(INotificationLog));
       App.RegisterService<INotificationLogService>(this);
 }
示例#19
0
 public EventLogModule(EntityArea area)
     : base(area, "EventLog", version: CurrentVersion)
 {
     this.RegisterEntities(typeof(IEvent), typeof(IEventParameter));
       App.RegisterService<IEventLogService>(this);
 }
示例#20
0
 public EntityModuleV2(EntityArea area)
     : base(area, "TestModule", version: new Version("1.1.0.0"))
 {
     base.RegisterEntities(typeof(IParentEntity), typeof(IChildEntityRenamed), typeof(ITable), typeof(INewTable));
     base.RegisterCompanionTypes(typeof(IParentEntityKeys));
 }
示例#21
0
 private bool IsActive(EntityArea area)
 {
     return true;
       /*
       if(!_driver.Supports(DbFeatures.Schemas))
     return true;
       return _dbModel.ContainsSchema(area.Name);
        */
 }
示例#22
0
 public LoginLogModule(EntityArea area, string name = "LoginLog", string description = null)
     : base(area, name, description, version: CurrentVersion)
 {
     RegisterEntities(typeof(ILoginLog));
       App.RegisterService<ILoginLogService>(this);
 }
示例#23
0
 public WebCallLogModule(EntityArea area)
     : base(area, "WebLog", version: CurrentVersion)
 {
     RegisterEntities(typeof(IWebCallLog));
       App.RegisterService<IWebCallLogService>(this);
 }