Exemplo n.º 1
0
 public AuditTrailManager(
     IRepository <AuditTrailEventRecord> auditTrailRepository,
     ITransactionManager transactionManager,
     IAuditTrailEventProvider providers,
     IClock clock,
     IAuditTrailEventHandler auditTrailEventHandlers,
     IEventDataSerializer serializer,
     ICacheManager cacheManager,
     ISiteService siteService,
     ISignals signals,
     IShapeFactory shapeFactory,
     IClientHostAddressAccessor clientHostAddressAccessor)
 {
     _auditTrailRepository = auditTrailRepository;
     _transactionManager   = transactionManager;
     _providers            = providers;
     _clock = clock;
     _auditTrailEventHandlers = auditTrailEventHandlers;
     _serializer   = serializer;
     _cacheManager = cacheManager;
     _siteService  = siteService;
     _signals      = signals;
     _shapeFactory = shapeFactory;
     _clientHostAddressAccessor = clientHostAddressAccessor;
 }
Exemplo n.º 2
0
 public TestSqlEventStore(
     EventStoreSettings settings,
     ISqlStatementsLoader sqlStatementsLoader,
     IDbConnectionFactory connectionFactory,
     IEventDataSerializer <TSerializationType> eventDataSerializer)
     : base(
         settings,
         sqlStatementsLoader,
         connectionFactory,
         eventDataSerializer)
 {
 }
Exemplo n.º 3
0
        protected SqlEventStore(
            EventStoreSettings settings,
            ISqlStatementsLoader sqlStatementsLoader,
            IDbConnectionFactory connectionFactory,
            IEventDataSerializer <TSerializationType> eventDataSerializer)
        {
            ConnectionString = settings.ConnectionStrings["EventStore"];

            SqlStatementsLoader = sqlStatementsLoader;
            ConnectionFactory   = connectionFactory;

            EventDataSerializer = eventDataSerializer;
        }
Exemplo n.º 4
0
        public ChannelsAuditTrailProvider(
            IEventDataSerializer serializer,
            ISiteService siteService,
            IWorkContextAccessor workContextAccessor)
        {
            _serializer          = serializer;
            _siteService         = siteService;
            _workContextAccessor = workContextAccessor;

            var settingsPart = GetOutputSettingsPart();

            // System Event logs:
            _sourceName = settingsPart.EventViewerSourceName;
            if (string.IsNullOrWhiteSpace(_sourceName))
            {
                // Test the settings to see whether we should use the tenant name
                // or the default "Application" source. In case we should use the
                // tenant name, a system admin should take care to create it.
                // Creation of a new Log source for an application, from Powershell
                // >> New-EventLog -Source {sourceName} -LogName Application
                _sourceName = "Application";
            }
            // https://docs.microsoft.com/en-us/dotnet/api/system.diagnostics.eventlog?view=netframework-4.8
            // Make sure the EventLog source exists.
            _isEventLogEnabled = settingsPart.IsEventViewerEnabled && EventLog.SourceExists(_sourceName);

            // File system logs:
            // Besides being enabled here from the setting, we should ensure that
            // there is the correctly configured logger and appender. We are using
            // a "custom" logger rather than those injected normally because we need
            // have a file specific for the tenant. This in turn requires a specific
            // unique appender for each tenant, which would be hard to do from the
            // xml configuration files.
            _isFileSystemLogEnabled = settingsPart.IsFileSystemEnabled;
            if (_isFileSystemLogEnabled)
            {
                // Ensure the logger for audit trail exists.
                EnsureLogger();
                // Ensure the logger for audit trail is associated with the correct appender.
                EnsureAppender();
            }
        }
 public AuditTrailEventDisplayBuilder(IShapeFactory shapeFactory, IEventDataSerializer serializer, IAuditTrailManager auditTrailManager) {
     _shapeFactory = shapeFactory;
     _serializer = serializer;
     _auditTrailManager = auditTrailManager;
 }
Exemplo n.º 6
0
 protected SerializerTest(IEventDataSerializer <TEventDataSerializationType> eventSerializer)
 {
     _eventSerializer = eventSerializer;
 }
Exemplo n.º 7
0
 public AuditTrailEventDisplayBuilder(IShapeFactory shapeFactory, IEventDataSerializer serializer, IAuditTrailManager auditTrailManager)
 {
     _shapeFactory      = shapeFactory;
     _serializer        = serializer;
     _auditTrailManager = auditTrailManager;
 }