Example #1
0
 public AuditActionInvocationFacet(IActionInvocationFacet underlyingFacet, IAuditManager auditManager)
     : base(underlyingFacet.Specification)
 {
     this.underlyingFacet = underlyingFacet;
     this.auditManager    = auditManager;
     identifier           = underlyingFacet.Specification.Identifier;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="DbContextBase"/> class.
 /// </summary>
 /// <param name="eventDispatcher">The event dispatcher.</param>
 /// <param name="options">The options for this context.</param>
 public DbContextBase(IEventDispatcher eventDispatcher, DbContextOptions options)
     : base(options)
 {
     Guard.ArgumentNotNull(eventDispatcher, nameof(eventDispatcher));
     _auditManager    = new AuditManager(this);
     _eventDispatcher = eventDispatcher;
 }
Example #3
0
 public ChampionRepository(IAuditManager auditManager,
                           IMapper <ChampionModel, Champion> mapper,
                           IMapper <PlayerChampionStatsModel, PlayerChampionStats> championStatsMapper)
     : base(auditManager)
 {
     _championEFMapper    = mapper;
     _championStatsMapper = championStatsMapper;
 }
Example #4
0
 public SharedDataController(ISharedDataManager sharedDataManager, IAuditManager auditManager,
                             ILockManager lockManager, ITiersManager tiersManager)
 {
     _sharedDataManager = sharedDataManager;
     _auditManager      = auditManager;
     _lockManager       = lockManager;
     _tiersManager      = tiersManager;
 }
 public PlayerRepository(IAuditManager auditManager,
                         IMapper <PlayerModel, Player> modelToPlayerMapper,
                         IMapper <Player, PlayerModel> playerToModelMapper)
     : base(auditManager)
 {
     _modelToPlayerMapper = modelToPlayerMapper;
     _playerToModelMapper = playerToModelMapper;
 }
Example #6
0
        public LLogger()
        {
            var dataLayer = DataLayerFactory.BuildDataLayer();

            _logManager   = new LogManager();
            _auditManager = new AuditManager(dataLayer);
            _uiLogManager = new UiLogManager(dataLayer);
        }
Example #7
0
 public ActiveAudits()
 {
     auditServiceManager = UnityConfig.IAuditServiceManager;
     auditManager        = UnityConfig.IAuditManager;
     InitializeComponent();
     //DownloadNewAuditAndSave();
     var activeAudits = GetActiveAudits();
 }
Example #8
0
 public LectureService(IStudentGroupService studentGroupService,
                       IEmployeeService employeeService,
                       IRoomService roomService,
                       IAuditManager auditmanager) : base(auditmanager)
 {
     this.studentGroupService = studentGroupService;
     this.employeeService     = employeeService;
     this.roomService         = roomService;
 }
Example #9
0
 public AuditController(
     IAuditManager auditManager,
     ILogger <AuditController> logger,
     WorkContext workContext,
     IServiceResponseMapper serviceResponseMapper
     )
 {
     _auditManager          = auditManager;
     _logger                = logger;
     _workContext           = workContext;
     _serviceResponseMapper = serviceResponseMapper;
 }
Example #10
0
        public ManagerSearch()
        {
            IDirection end = new EndPattern();
            IDirection checkDiagonallyInverse = new CheckDiagonallyInverse(end);
            IDirection checkDiagonally        = new CheckDiagonally(checkDiagonallyInverse);
            IDirection checkLeft  = new CheckLeft(checkDiagonally);
            IDirection checkRight = new CheckRight(checkLeft);
            IDirection checkDown  = new CheckDown(checkRight);

            checkUp  = new CheckUp(checkDown);
            _Manager = new AuditManager();
        }
        public static Task InsertReadRecord <TEntity>(this IAuditManager auditHelper, Pagination <TEntity> page, WorkContext workContext) where TEntity : IEntity
        {
            var p = new
            {
                total         = page.Total,
                offset        = page.Offset,
                pageSize      = page.PageSize,
                sortOrder     = page.SortOrder,
                orderBy       = page.OrderBy,
                data          = page.Data,
                queryOrFilter = page.QueryOrFilter,
                includeNested = page.IncludeNested
            };

            return(auditHelper.InsertAuditRecord(page.Type, null, AuditRecordTypes.READ, workContext, p));
        }
Example #12
0
        public void TestAddAuditTrace()
        {
            var           container    = GetConfiguredContainer();
            IAuditManager auditManager = container.Resolve <IAuditManager>();

            AuditTrace auditTrace = new AuditTraceBuilder("CAT1", "USER1", 1, "My message 1").Build();

            auditManager.AddTrace(auditTrace);
            AuditTrace auditFetch = auditManager.GetTrace((int)auditTrace.Id);

            Assert.AreEqual(auditTrace.BusinessDate, auditFetch.BusinessDate);
            Assert.AreEqual(auditTrace.Category, auditFetch.Category);
            Assert.AreEqual(auditTrace.Context, auditFetch.Context);
            Assert.AreEqual(auditTrace.ExecutionDate, auditFetch.ExecutionDate);
            Assert.AreEqual(auditTrace.Item, auditFetch.Item);
        }
Example #13
0
        public SyncService(IServiceProvider serviceProvider)
        {
            _logger       = serviceProvider.GetService <ILogger <SyncService> >();
            _mapper       = serviceProvider.GetService <IMapper>();
            _notification = serviceProvider.GetService <INotificationManager>();
            _condition    = serviceProvider.GetService <IConditionCompiler>();
            _audit        = serviceProvider.GetService <IAuditManager>();
            _context      = serviceProvider.GetService <ApiContext>();

            var config = serviceProvider.GetService <IConfiguration>();

            _alertInterval = config.GetValue <int>("Api:Alert:IntervalMin");
            _alertMessage  = config.GetValue <string>("Api:Alert:Message");
            _url           = config.GetValue <string>("NiceHash:Url");
            _request       = config.GetValue <string>("NiceHash:Request");
            _locations     = config.GetSection("NiceHash:Locations").Get <int[]>();
        }
Example #14
0
        /// <summary>
        /// Configures the security manager.
        /// </summary>
        /// <param name="document">The document.</param>
        private static void ConfigureSecurityManager(XmlDocument document)
        {
            ISecurityManager securityManager = null;
            XmlNode          securityNode    = document.SelectSingleNode("configuration/security");

            if (securityNode != null)
            {
                NodeAttributes securityAttributes = new NodeAttributes(securityNode);
                if (!string.IsNullOrEmpty(securityAttributes.AsString("sessionManager")))
                {
                    Type sessionManagerType = TypesManager.ResolveType(securityAttributes.AsString("sessionManager"));
                    if (sessionManagerType != null)
                    {
                        ISessionManager sessionManager = (ISessionManager)Activator.CreateInstance(sessionManagerType);
                        IoC.Register <ISessionManager>(sessionManager);
                    }
                }
                if (!string.IsNullOrEmpty(securityAttributes.AsString("auditManager")))
                {
                    Type auditManagerType = TypesManager.ResolveType(securityAttributes.AsString("auditManager"));
                    if (auditManagerType != null)
                    {
                        IAuditManager auditManager = (IAuditManager)Activator.CreateInstance(auditManagerType);
                        IoC.Register <IAuditManager>(auditManager);
                    }
                }
                if (!string.IsNullOrEmpty(securityAttributes.AsString("securityManager")))
                {
                    Type securityManagerType = TypesManager.ResolveType(securityAttributes.AsString("securityManager"));
                    if (securityManagerType != null)
                    {
                        securityManager = (ISecurityManager)Activator.CreateInstance(securityManagerType);
                        IoC.Register <ISecurityManager>(securityManager);
                        string mappersName = securityAttributes.AsString("mapper");
                        securityManager.Configure(mappersName);
                    }
                }
            }
        }
 public static Task InsertUpdatedRecord <TEntity>(this IAuditManager auditHelper, TEntity before, TEntity after, WorkContext workContext) where TEntity : IEntity
 {
     return(auditHelper.InsertAuditRecord(before.GetType(), before.Id, AuditRecordTypes.UPDATE, workContext, new { before, after }));
 }
 protected DapperRepositoryBase(IAuditManager auditManager) : base(auditManager)
 {
 }
 public AuditActionInvocationFacet(IActionInvocationFacet underlyingFacet, IAuditManager auditManager)
     : base(underlyingFacet.Specification) {
     this.underlyingFacet = underlyingFacet;
     this.auditManager = auditManager;
     identifier = underlyingFacet.Specification.Identifier;
 }
Example #18
0
 public ExceptionLogRepository(IAuditManager auditManager)
     : base(auditManager)
 {
 }
 public AuditUpdatedFacet(IUpdatedCallbackFacet underlyingFacet, IAuditManager auditManager)
     : base(underlyingFacet.Specification) {
     this.underlyingFacet = underlyingFacet;
     manager = auditManager;
 }
 internal AuditAttribute(IAuditManager auditManager)
 {
     _auditManager = auditManager;
 }
Example #21
0
 public LoadoutRepository(IAuditManager auditManager)
     : base(auditManager)
 {
 }
 public SearchController()
 {
     _manager       = new AuditManager();
     _managerSearch = new ManagerSearch();
 }
 public AuditAttribute()
 {
     _auditManager = new AuditManager("name=FinderAuditingDataContext");
 }
Example #24
0
 protected FullAuditedRepository(IMongoContext context, IAuditManager auditManager) : base(context, auditManager)
 {
     _auditManager = auditManager;
 }
Example #25
0
 public RoomService(IAuditManager auditManager) : base(auditManager)
 {
 }
Example #26
0
 public ItemRepository(IAuditManager auditManager, IMapper <ItemModel, Item> mapper)
     : base(auditManager)
 {
     _mapper = mapper;
 }
 public static Task InsertCreateRecord <TEntity>(this IAuditManager auditHelper, TEntity entity, WorkContext workContext) where TEntity : IEntity
 {
     return(auditHelper.InsertAuditRecord(entity.GetType(), entity.Id, AuditRecordTypes.CREATE, workContext, entity));
 }
 public StudentGroupServiceAsync(IAuditManager auditManager) : base(auditManager)
 {
 }
 public StudentServiceAsync(IStudentGroupServiceAsync studentGroupService, IAuditManager auditManager) : base(auditManager)
 {
     this.studentGroupService = studentGroupService;
 }
 public ChangeTrackerAuditer(IAuditManager auditManager)
 {
     _auditManager = auditManager;
 }
 public MatchHistoryRepository(IAuditManager auditManager)
     : base(auditManager)
 {
 }
Example #32
0
 public EmployeeServiceAsync(IAuditManager auditManager) : base(auditManager)
 {
 }
Example #33
0
 public QueueRepository(IQueueMapper mapper, IAuditManager auditManager)
     : base(auditManager)
 {
     _mapper = mapper;
 }
Example #34
0
 protected CreationAuditedRepository(IMongoContext context, IAuditManager auditManager) : base(context)
 {
     _auditManager = auditManager;
 }