/// <summary> /// If you have invalidation problems look at exceptions in: select * from sys.transmission_queue /// If there are exceptions like: 'Could not obtain information about Windows NT group/user' /// Change login to a SqlServer authentication (i.e.: sa) /// Change Server Authentication mode and enable SA: http://msdn.microsoft.com/en-us/library/ms188670.aspx /// Change Database ownership to sa: ALTER AUTHORIZATION ON DATABASE::yourDatabase TO sa /// </summary> public static void Start(SchemaBuilder sb, bool?withSqlDependency = null, IServerBroadcast?serverBroadcast = null) { if (sb.NotDefined(MethodInfo.GetCurrentMethod())) { PermissionAuthLogic.RegisterTypes(typeof(CachePermission)); sb.SwitchGlobalLazyManager(new CacheGlobalLazyManager()); if (withSqlDependency == true && !Connector.Current.SupportsSqlDependency) { throw new InvalidOperationException("Sql Dependency is not supported by the current connection"); } WithSqlDependency = withSqlDependency ?? Connector.Current.SupportsSqlDependency; if (serverBroadcast != null && WithSqlDependency) { throw new InvalidOperationException("cacheInvalidator is only necessary if SqlDependency is not enabled"); } ServerBroadcast = serverBroadcast; if (ServerBroadcast != null) { ServerBroadcast !.Receive += ServerBroadcast_Receive; sb.Schema.BeforeDatabaseAccess += () => ServerBroadcast !.Start(); } sb.Schema.SchemaCompleted += () => Schema_SchemaCompleted(sb); sb.Schema.BeforeDatabaseAccess += StartSqlDependencyAndEnableBrocker; sb.Schema.InvalidateCache += CacheLogic.ForceReset; } }
public static void Start(SchemaBuilder sb) { if (sb.NotDefined(MethodBase.GetCurrentMethod())) { PermissionAuthLogic.RegisterTypes(typeof(OmniboxPermission)); } }
/// <summary> /// If you have invalidation problems look at exceptions in: select * from sys.transmission_queue /// If there are exceptions like: 'Could not obtain information about Windows NT group/user' /// Change login to a SqlServer authentication (i.e.: sa) /// Change Server Authentication mode and enable SA: http://msdn.microsoft.com/en-us/library/ms188670.aspx /// Change Database ownership to sa: ALTER AUTHORIZATION ON DATABASE::yourDatabase TO sa /// </summary> public static void Start(SchemaBuilder sb, bool?withSqlDependency = null, ICacheMultiServerInvalidator cacheInvalidator = null) { if (sb.NotDefined(MethodInfo.GetCurrentMethod())) { PermissionAuthLogic.RegisterTypes(typeof(CachePermission)); sb.SwitchGlobalLazyManager(new CacheGlobalLazyManager()); if (withSqlDependency == true && !Connector.Current.SupportsSqlDependency) { throw new InvalidOperationException("Sql Dependency is not supported by the current connection"); } WithSqlDependency = withSqlDependency ?? Connector.Current.SupportsSqlDependency; if (cacheInvalidator != null && WithSqlDependency) { throw new InvalidOperationException("cacheInvalidator is only necessary if SqlDependency is not enabled"); } CacheInvalidator = cacheInvalidator; if (CacheInvalidator != null) { CacheInvalidator.ReceiveInvalidation += CacheInvalidator_ReceiveInvalidation; } sb.Schema.SchemaCompleted += Schema_SchemaCompleted; sb.Schema.BeforeDatabaseAccess += StartSqlDependencyAndEnableBrocker; } }
public static void Start(SchemaBuilder sb) { if (sb.NotDefined(MethodInfo.GetCurrentMethod())) { PermissionAuthLogic.RegisterTypes(typeof(DynamicPanelPermission)); DynamicLogic.GetCodeFiles += GetCodeGenStarter; AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(AssemblyResolveHandler); } }
public static void Start(SchemaBuilder sb, bool googleMapsChartScripts) { if (sb.NotDefined(MethodInfo.GetCurrentMethod())) { QueryLogic.Start(sb); PermissionAuthLogic.RegisterTypes(typeof(ChartPermission)); ChartColorLogic.Start(sb); ChartScriptLogic.Start(sb, googleMapsChartScripts); UserChartLogic.Start(sb); } }
public static void StartAllModules(SchemaBuilder sb, bool activeDirectoryIntegration = false) { TypeAuthLogic.Start(sb); PropertyAuthLogic.Start(sb); QueryAuthLogic.Start(sb); OperationAuthLogic.Start(sb); PermissionAuthLogic.Start(sb); if (activeDirectoryIntegration) { PermissionAuthLogic.RegisterTypes(typeof(ActiveDirectoryPermission)); } }
public static void Start(SchemaBuilder sb, DynamicQueryManager dqm) { if (sb.NotDefined(MethodInfo.GetCurrentMethod())) { QueryLogic.Start(sb, dqm); PermissionAuthLogic.RegisterTypes(typeof(ChartPermission)); ChartColorLogic.Start(sb, dqm); ChartScriptLogic.Start(sb, dqm); UserChartLogic.Start(sb, dqm); } }
public static void Start(SchemaBuilder sb, bool countLocalizationHits) { if (sb.NotDefined(MethodInfo.GetCurrentMethod())) { CultureInfoLogic.AssertStarted(sb); PermissionAuthLogic.RegisterTypes(typeof(TranslationPermission)); if (countLocalizationHits) { DescriptionManager.NotLocalizedMember += DescriptionManager_NotLocalizedMemeber; } } }
public static void Start(SchemaBuilder sb, bool registerAll) { if (sb.NotDefined(MethodInfo.GetCurrentMethod())) { MixinDeclarations.AssertDeclared(typeof(OperationLogEntity), typeof(DiffLogMixin)); PermissionAuthLogic.RegisterTypes(typeof(TimeMachinePermission)); OperationLogic.SurroundOperation += OperationLogic_SurroundOperation; if (registerAll) { RegisterShouldLog <Entity>((entity, oper) => true); } } }
public static void Start(SchemaBuilder sb, bool excelReport) { if (sb.NotDefined(MethodInfo.GetCurrentMethod())) { PermissionAuthLogic.RegisterTypes(typeof(ExcelPermission)); if (excelReport) { QueryLogic.Start(sb); sb.Include <ExcelReportEntity>() .WithSave(ExcelReportOperation.Save) .WithDelete(ExcelReportOperation.Delete) .WithQuery(() => s => new { Entity = s, s.Id, s.Query, s.File.FileName, s.DisplayName, }); } } }