public FrameLogModule(IChangeSetFactory <TChangeSet, TPrincipal> factory, IFrameLogContext <TChangeSet, TPrincipal> context) { this.factory = factory; this.context = context; this.filter = LoggingFilter.Get(context); Enabled = true; }
public FrameLogModule(IChangeSetFactory <TChangeSet, TPrincipal> factory, IFrameLogContext <TChangeSet, TPrincipal> context, ILoggingFilterProvider filter = null) { this.factory = factory; this.context = context; this.filter = (filter ?? Filters.Default).Get(context); Enabled = true; }
public ChangeLogger(IFrameLogContext <TChangeSet, TPrincipal> context, IChangeSetFactory <TChangeSet, TPrincipal> factory, ILoggingFilter filter) { this.context = context; this.factory = factory; this.recorder = new Recorder <TChangeSet, TPrincipal>(factory); this.filter = filter; }
public FrameLogModule(IChangeSetFactory <TChangeSet, TPrincipal> factory, IFrameLogContext <TChangeSet, TPrincipal> context, ILoggingFilterProvider filter = null, ISerializationManager serializer = null) { this.factory = factory; this.context = context; this.filter = (filter ?? Filters.Default).Get(context); this.serializer = (serializer ?? new ValueTranslationManager(context)); Enabled = true; }
/// <summary> /// Gets (or constructs) the FilterAttributeCache for the database in question. /// A typical application will only have one FilterAttributeCache for its lifetime, /// but it is possible to be running FrameLog on multiple databases simultaneously. /// We use the IFrameLogContext.UnderlyingType to create one FilterAttributeCache per /// database-type. /// </summary> internal static FilterAttributeCache For(IFrameLogContext context) { var id = context.UnderlyingContextType; lock (caches) { FilterAttributeCache filter; if (!caches.TryGetValue(id, out filter)) { filter = caches[id] = new FilterAttributeCache(context.Workspace); } return filter; } }
/// <summary> /// Gets (or constructs) the FilterAttributeCache for the database in question. /// A typical application will only have one FilterAttributeCache for its lifetime, /// but it is possible to be running FrameLog on multiple databases simultaneously. /// We use the IFrameLogContext.UnderlyingType to create one FilterAttributeCache per /// database-type. /// </summary> internal static FilterAttributeCache For(IFrameLogContext context) { var id = context.UnderlyingContextType; lock (caches) { FilterAttributeCache filter; if (!caches.TryGetValue(id, out filter)) { filter = caches[id] = new FilterAttributeCache(context.Workspace); } return(filter); } }
/// <summary> /// Gets (or constructs) the LoggingFilter for the database in question. /// A typical application will only have one LoggingFilter for its lifetime, /// but it is possible to be running FrameLog on multiple databases simultaneously. /// We use the IFrameLogContext.UnderlyingType to create one LoggingFilter per /// database-type. /// </summary> internal static LoggingFilter Get <TChangeSet, TPrincipal>(IFrameLogContext <TChangeSet, TPrincipal> context) where TChangeSet : IChangeSet <TPrincipal> { var id = context.UnderlyingContextType; lock (filters) { LoggingFilter filter; if (!filters.TryGetValue(id, out filter)) { filter = filters[id] = new LoggingFilter(context.Workspace); } return(filter); } }
public AttributeBasedLoggingFilter(IFrameLogContext context) { cache = FilterAttributeCache.For(context); }
public ILoggingFilter Get(IFrameLogContext context) { return new BlacklistLoggingFilter(context); }
public BlacklistLoggingFilter(IFrameLogContext context) : base(context) { }
public WhitelistLoggingFilter(IFrameLogContext context) : base(context) { }
public ILoggingFilter Get(IFrameLogContext context) { return(new BlacklistLoggingFilter(context)); }