/// <summary>
 /// Constructor where all the dependencies are injected
 /// </summary>
 /// <param name="matterRepositoy"></param>
 /// <param name="matterSettings"></param>
 /// <param name="errorSettings"></param>
 /// <param name="spoAuthorization"></param>
 /// <param name="editFunctions"></param>
 /// <param name="validationFunctions"></param>
 /// <param name="customLogger"></param>
 /// <param name="logTables"></param>
 /// <param name="mailSettings"></param>
 /// <param name="camlQueries"></param>
 /// <param name="listNames"></param>
 /// <param name="generalSettings"></param>
 /// <param name="searchSettings"></param>
 /// <param name="userRepositoy"></param>
 /// <param name="externalSharing"></param>
 /// <param name="configuration"></param>
 /// <param name="userDetails"></param>
 public MatterProvision(IMatterRepository matterRepositoy, IOptions<MatterSettings> matterSettings,
     IOptions<ErrorSettings> errorSettings,
     ISPOAuthorization spoAuthorization, IEditFunctions editFunctions, IValidationFunctions validationFunctions,
     ICustomLogger customLogger, IOptions<LogTables> logTables,
     IOptions<MailSettings> mailSettings,
     IOptions<CamlQueries> camlQueries,
     IOptions<ListNames> listNames,
     IOptions<GeneralSettings> generalSettings,
     IOptions<SearchSettings> searchSettings, IUserRepository userRepositoy, 
     IExternalSharing externalSharing, IConfigurationRoot configuration, IUsersDetails userDetails
     )
 {
     this.matterRepositoy = matterRepositoy;
     this.matterSettings = matterSettings.Value;
     this.spoAuthorization = spoAuthorization;
     this.editFunctions = editFunctions;
     this.errorSettings = errorSettings.Value;
     this.customLogger = customLogger;
     this.logTables = logTables.Value;
     this.validationFunctions = validationFunctions;
     this.mailSettings = mailSettings.Value;
     this.camlQueries = camlQueries.Value;
     this.listNames = listNames.Value;
     this.searchSettings = searchSettings.Value;
     this.userRepositoy = userRepositoy;
     this.externalSharing = externalSharing;
     this.configuration = configuration;
     this.userDetails = userDetails;
     this.generalSettings = generalSettings.Value;
 }
Example #2
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="spoAuthorization"></param>
 /// <param name="generalSettings"></param>
 /// <param name="searchSettings"></param>
 public Search(ISPOAuthorization spoAuthorization,
     IConfigurationRoot configuration,
     ICustomLogger customLogger,
     IUsersDetails userDetails,
     ISPList spList,
     IOptions<GeneralSettings> generalSettings,
     IOptions<SharedSettings> sharedSettings,
     IOptions<LogTables> logTables,
     IOptions<SearchSettings> searchSettings,
     IOptions<CamlQueries> camlQueries,
     IOptions<ListNames> listNames,
     IOptions<ErrorSettings> errorSettings)
 {
     this.spoAuthorization = spoAuthorization;
     this.generalSettings = generalSettings.Value;
     this.searchSettings = searchSettings.Value;
     this.userDetails = userDetails;
     this.customLogger = customLogger;
     this.logTables = logTables.Value;
     this.spList = spList;
     this.camlQueries = camlQueries.Value;
     this.listNames = listNames.Value;
     this.sharedSettings = sharedSettings.Value;
     this.errorSettings = errorSettings.Value;
     this.configuration = configuration;
 }
        public void Setup()
        {
            _dependencyManager = new DependencyManager();
            _dependencyManager.ConfigureStartupDependencies();

            _customLogger = _dependencyManager.Container.GetInstance<ICustomLogger>();
        }
 public MyCustomTokenSigningService(
     Thinktecture.IdentityServer.Core.Configuration.IdentityServerOptions options,
     ICustomLogger logger)
 {
     this.options = options;
     this.logger = logger;
 }
 public MessageBusController(
     IServiceBusModelBuilder modelBuilder, ICustomLogger logger, MessageBusManager busManager)
 {
     _modelBuilder = modelBuilder;
     _messageBusManager = busManager;
     _customLogger = logger;
     _safeExecutionHelper = new SafeExecutionHelper(logger);
 }
Example #6
0
 /// <summary>
 /// All the dependencies are injected 
 /// </summary>
 /// <param name="spoAuthorization"></param>
 /// <param name="generalSettings"></param>
 public SPPage(ISPOAuthorization spoAuthorization, IOptions<GeneralSettings> generalSettings, 
     IOptions<LogTables> logTables, ICustomLogger customLogger, ISPList spList, IOptions<MatterSettings> matterSettings)
 {
     this.generalSettings = generalSettings.Value;
     this.spoAuthorization = spoAuthorization;
     this.logTables = logTables.Value;
     this.customLogger = customLogger;
     this.spList = spList;
     this.matterSettings = matterSettings.Value;
 }
Example #7
0
 /// <summary>
 /// Constructor where GeneralSettings and ErrorSettings are injected
 /// </summary>
 /// <param name="generalSettings"></param>
 /// <param name="errorSettings"></param>
 public SPOAuthorization(IOptions <GeneralSettings> generalSettings,
                         IOptions <ErrorSettings> errorSettings,
                         IOptions <LogTables> logTables,
                         ICustomLogger customLogger,
                         IHttpContextAccessor httpContextAccessor)
 {
     this.generalSettings     = generalSettings.Value;
     this.errorSettings       = errorSettings.Value;
     this.customLogger        = customLogger;
     this.logTables           = logTables.Value;
     this.httpContextAccessor = httpContextAccessor;
 }
Example #8
0
        private void InitCustomStuff()
        {
            ConfigurationElements.InitConfig();

            AutoMapperInitiazlier autoMapperInit = new AutoMapperInitiazlier();

            autoMapperInit.InitMapper();

            _logger = IoCContainer.GetInstace <ICustomLogger>();

            Database.SetInitializer(new MigrateDatabaseToLatestVersion <DbContext, CustomContextMigrationConfig>());
        }
Example #9
0
 public SPContentTypes(IOptions <ContentTypesConfig> contentTypesConfig, IOptions <CamlQueries> camlQueries, ISPList spList,
                       ICustomLogger customLogger, IOptions <LogTables> logTables, IOptions <TaxonomySettings> taxonomySettings, IConfigurationRoot configuration
                       )
 {
     this.contentTypesConfig = contentTypesConfig.Value;
     this.taxonomySettings   = taxonomySettings.Value;
     this.customLogger       = customLogger;
     this.logTables          = logTables.Value;
     this.camlQueries        = camlQueries.Value;
     this.spList             = spList;
     this.configuration      = configuration;
 }
Example #10
0
        public void InitializeValidateItsArgument()
        {
            Action <string> nullAction = null;
            var             ex         = TestUtils.ExpectException <ArgumentNullException>(() => Logger.Initialize(nullAction));

            Assert.AreEqual("writeLineImpl", ex.ParamName);

            ICustomLogger nullCustomLogger = null;

            ex = TestUtils.ExpectException <ArgumentNullException>(() => Logger.Initialize(nullCustomLogger));
            Assert.AreEqual("customLogger", ex.ParamName);
        }
Example #11
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SettingsPage"/> class.
        /// </summary>
        /// <param name="loggerFactory">Logger factory</param>
        /// <param name="menuVisualizer">Menu visualizer</param>
        /// <param name="outputEnvironment">Output environment implementation</param>
        /// <param name="fileService">File service implementation</param>
        public SettingsPage(
            ICustomLoggerFactory loggerFactory,
            IMenuVisualizer menuVisualizer,
            IOutputEnvironment outputEnvironment,
            IFileService fileService)
        {
            this._logger = loggerFactory.CreateLogger <SettingsPage>();

            this._menuVisualizer    = menuVisualizer;
            this._outputEnvironment = outputEnvironment;
            this._fileService       = fileService;
        }
Example #12
0
        public Grabber(IAudiobookService service, ICustomLogger logger, IAudiobookRepository db, OwnRadioClient client)
        {
            if (!Directory.Exists(dirPath))
            {
                Directory.CreateDirectory(dirPath);
            }

            this.logger  = logger;
            this.service = service;
            this.db      = db;
            this.client  = client;
        }
 /// <summary>
 /// Constructor where GeneralSettings and ErrorSettings are injected
 /// </summary>
 /// <param name="generalSettings"></param>
 /// <param name="errorSettings"></param>
 public SPOAuthorization(IOptions<GeneralSettings> generalSettings, 
     IOptions<ErrorSettings> errorSettings, 
     IOptions<LogTables> logTables, 
     ICustomLogger customLogger, 
     IHttpContextAccessor httpContextAccessor)
 {            
     this.generalSettings = generalSettings.Value;
     this.errorSettings = errorSettings.Value;
     this.customLogger = customLogger;
     this.logTables = logTables.Value;
     this.httpContextAccessor = httpContextAccessor;
 }
Example #14
0
 public SPContentTypes(IOptions<ContentTypesConfig> contentTypesConfig, IOptions<CamlQueries> camlQueries, ISPList spList,
     ICustomLogger customLogger, IOptions<LogTables> logTables, IOptions<TaxonomySettings> taxonomySettings, IConfigurationRoot configuration
     )
 {
     this.contentTypesConfig = contentTypesConfig.Value;
     this.taxonomySettings = taxonomySettings.Value;
     this.customLogger = customLogger;
     this.logTables = logTables.Value;
     this.camlQueries = camlQueries.Value;
     this.spList = spList;
     this.configuration = configuration;
 }
Example #15
0
 public AuthService(
     ICustomLogger logger, ITokenService token, ITimeService time,
     IUserRepository users, IGameStateRepository states, IConfigRepository config, StateInitService init
     )
 {
     _logger = logger;
     _token  = token;
     _time   = time;
     _users  = users;
     _states = states;
     _config = config;
     _init   = init;
 }
Example #16
0
 public ExternalSharing(ISPOAuthorization spoAuthorization, IOptions <ListNames> listNames,
                        IOptions <GeneralSettings> generalSettings,
                        IOptions <MatterSettings> matterSettings,
                        IOptions <LogTables> logTables, IUsersDetails userDetails, ICustomLogger customLogger)
 {
     this.spoAuthorization = spoAuthorization;
     this.listNames        = listNames.Value;
     this.generalSettings  = generalSettings.Value;
     this.matterSettings   = matterSettings.Value;
     this.logTables        = logTables.Value;
     this.userDetails      = userDetails;
     this.customLogger     = customLogger;
 }
        private static void Main()
        {
            _customLogger = _container.GetInstance<ICustomLogger>();
            AppDomain.CurrentDomain.UnhandledException += CurrentDomain_HandleException;

            ServiceBase[] servicesToRun =
            {
                new SchedulerService(_customLogger)
            };

            _customLogger.Info("Starting scheduler service..");
            ServiceBase.Run(servicesToRun);
        }
Example #18
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="deserializer"></param>
 /// <param name="config"></param>
 /// <param name="domainEventMediator"></param>
 /// <param name="logger"></param>
 /// <param name="rabbitMqParams"></param>
 public RabbitMqDomainEventsConsumer(
     DomainEventJsonDeserializer deserializer,
     RabbitMqConnectionFactory config,
     DomainEventMediator domainEventMediator,
     ICustomLogger <RabbitMqDomainEventsConsumer> logger,
     IOptions <RabbitMqConfigParams> rabbitMqParams)
 {
     _deserializer        = deserializer;
     _config              = config;
     _domainEventMediator = domainEventMediator;
     _logger              = logger;
     _rabbitMqParams      = rabbitMqParams;
 }
Example #19
0
 /// <summary>
 /// Controlls the functionality for email related.
 /// </summary>
 /// <param name="errorSettings"></param>
 /// <param name="customLogger"></param>
 /// <param name="matterCenterServiceFunctions"></param>
 /// <param name="logTables"></param>
 /// <param name="documentProvision"></param>
 /// <param name="documentSettings"></param>
 public EmailController(IOptions <ErrorSettings> errorSettings,
                        ICustomLogger customLogger,
                        IMatterCenterServiceFunctions matterCenterServiceFunctions,
                        IOptions <LogTables> logTables, IDocumentProvision documentProvision,
                        IOptions <DocumentSettings> documentSettings)
 {
     this.errorSettings = errorSettings.Value;
     this.matterCenterServiceFunctions = matterCenterServiceFunctions;
     this.customLogger      = customLogger;
     this.logTables         = logTables.Value;
     this.documentProvision = documentProvision;
     this.documentSettings  = documentSettings.Value;
 }
Example #20
0
 public DIController(ISingletonService singletonSrv,
                     IScopedService scopeSrv,
                     ITransientService transientSrv,
                     IComando comando,
                     ICustomLogger logger)
 {
     _singletonSrv = singletonSrv;
     _scopeSrv     = scopeSrv;
     _transientSrv = transientSrv;
     _comando      = comando;
     _logger       = logger;
     _logger.Log("****** Instancia DIController ******");
 }
Example #21
0
        /// <summary>
        /// Create a log entry with the data in the StringBuilder instance
        /// </summary>
        /// <param name="log"></param>
        /// <param name="sb"></param>
        public static void PerformNormalLogging(Log log, StringBuilder sb, ICustomLogger logger)
        {
            if (log == null)
            {
                logger.Log(new Log(sb.ToString()));
            }
            else
            {
                log.Message = sb.ToString();

                logger.Log(log);
            }
        }
Example #22
0
        public static void LogTrace(this ICustomLogger logger, Exception exception, string message, params object[] args)
        {
            var exceptionMessage = $"Exception Message:{exception.Message}";
            var innerException   = $"Inner Message:{exception.InnerException}";
            var stackTrace       = $"Stack Trace:{exception.StackTrace}";
            var line             = $"[Trace] <{DateTime.Now.ToLongTimeString()}> : {message}\r\n\t{exceptionMessage}\r\n\t{innerException}\r\n\t{stackTrace}";

            File.AppendAllText(logger.LogFileInfo.FullName, line + $"\r\n");
            if (logger.OutputToConsole)
            {
                Console.WriteLine(line);
            }
        }
Example #23
0
 /// <summary>
 /// Controlls the functionality for email related.
 /// </summary>
 /// <param name="errorSettings"></param>
 /// <param name="customLogger"></param>
 /// <param name="matterCenterServiceFunctions"></param>
 /// <param name="logTables"></param>
 /// <param name="documentProvision"></param>
 /// <param name="documentSettings"></param>
 public EmailController(IOptions<ErrorSettings> errorSettings,
     ICustomLogger customLogger,             
     IMatterCenterServiceFunctions matterCenterServiceFunctions, 
     IOptions<LogTables> logTables, IDocumentProvision documentProvision,            
     IOptions<DocumentSettings> documentSettings)
 {            
     this.errorSettings = errorSettings.Value;
     this.matterCenterServiceFunctions = matterCenterServiceFunctions;
     this.customLogger = customLogger;
     this.logTables = logTables.Value;
     this.documentProvision = documentProvision;
     this.documentSettings = documentSettings.Value;       
 }
Example #24
0
        public AuthenticationUserController(IAuthenticationUserLogic authUserLogic, ICustomLogger customLogger)
        {
            if (authUserLogic == null)
            {
                throw new ArgumentNullException("user's authentication logic");
            }
            if (customLogger == null)
            {
                throw new ArgumentNullException("logger");
            }

            _authUserLogic = authUserLogic;
            _customLogger  = customLogger;
        }
Example #25
0
 public MatterProvision(IMatterRepository matterRepositoy, IOptions<MatterSettings> matterSettings, IOptions<ErrorSettings> errorSettings,
     ISPOAuthorization spoAuthorization, IEditFunctions editFunctions, ValidationFunctions validationFunctions,
     ICustomLogger customLogger, IOptions<LogTables> logTables, IOptions<MailSettings> mailSettings)
 {
     this.matterRepositoy = matterRepositoy;
     this.matterSettings = matterSettings.Value;
     this.spoAuthorization = spoAuthorization;
     this.editFunctions = editFunctions;
     this.errorSettings = errorSettings.Value;
     this.customLogger = customLogger;
     this.logTables = logTables.Value;
     this.validationFunctions = validationFunctions;
     this.mailSettings = mailSettings.Value;
 }
        public UserLogic(IUserDAO userDAO, ICustomLogger customLogger)
        {
            if (userDAO == null)
            {
                throw new ArgumentNullException("userDAO");
            }
            if (customLogger == null)
            {
                throw new ArgumentNullException("logger");
            }

            _userDAO      = userDAO;
            _customLogger = customLogger;
        }
Example #27
0
 public static ICustomLogger GetDefault()
 {
     if (_default == null)
     {
         lock (lazyLock)
         {
             if (_default == null)
             {
                 _default = new DefaultCustomLogger();
             }
         }
     }
     return(_default);
 }
 public MatterProvision(IMatterRepository matterRepositoy, IOptions <MatterSettings> matterSettings, IOptions <ErrorSettings> errorSettings,
                        ISPOAuthorization spoAuthorization, IEditFunctions editFunctions, ValidationFunctions validationFunctions,
                        ICustomLogger customLogger, IOptions <LogTables> logTables, IOptions <MailSettings> mailSettings)
 {
     this.matterRepositoy     = matterRepositoy;
     this.matterSettings      = matterSettings.Value;
     this.spoAuthorization    = spoAuthorization;
     this.editFunctions       = editFunctions;
     this.errorSettings       = errorSettings.Value;
     this.customLogger        = customLogger;
     this.logTables           = logTables.Value;
     this.validationFunctions = validationFunctions;
     this.mailSettings        = mailSettings.Value;
 }
Example #29
0
        public ExternalSharing(ISPOAuthorization spoAuthorization, IOptions<ListNames> listNames, 
            IOptions<GeneralSettings> generalSettings, 
            IOptions<MatterSettings> matterSettings, 
            IOptions<LogTables> logTables, IUsersDetails userDetails, ICustomLogger customLogger)
        {
            this.spoAuthorization = spoAuthorization;
            this.listNames = listNames.Value;
            this.generalSettings = generalSettings.Value;
            this.matterSettings = matterSettings.Value;
            this.logTables = logTables.Value;
            this.userDetails = userDetails;
            this.customLogger = customLogger;

        }
Example #30
0
        public IEnumerable <Exam> Read(string path, ICustomLogger logger)
        {
            const string CurrentEncoding = "utf-8";
            const int    OffsetOfMarks   = 3;
            var          exams           = new List <Exam>();

            try
            {
                using var reader           = new StreamReader(path);
                using var csv              = new CsvReader(reader, CultureInfo.InvariantCulture);
                csv.Configuration.Encoding = Encoding.GetEncoding(CurrentEncoding);
                var subjectName = csv.Parser.Read().Skip(OffsetOfMarks);

                while (csv.Read())
                {
                    for (int i = 0; i < subjectName.Count(); i++)
                    {
                        exams.Add(new Exam
                        {
                            Student = new Student(csv.GetField(0), csv.GetField(1), csv.GetField(2)),
                            Subject = subjectName.Skip(i).First(),
                            Mark    = csv.GetField <int>(i + OffsetOfMarks),
                        });
                    }
                }
            }
            catch (FileNotFoundException e)
            {
                logger.Setup().Fatal(e.Message, e.GetType());
            }
            catch (ArgumentOutOfRangeException e)
            {
                logger.Setup().Error(e.Message, e.GetType());
            }
            catch (TypeConverterException e)
            {
                logger.Setup().Error(e.Message, e.GetType());
            }
            catch (CsvHelper.MissingFieldException e)
            {
                logger.Setup().Error(e.Message, e.GetType());
            }
            catch (ArgumentNullException e)
            {
                logger.Setup().Error(e.Message, e.GetType());
            }

            return(exams);
        }
Example #31
0
 /// <summary>
 /// constructor where are all the dependencies are injected
 /// </summary>
 /// <param name="errorSettings"></param>
 /// <param name="matterCenterServiceFunctions"></param>
 /// <param name="userRepositoy"></param>
 /// <param name="customLogger"></param>
 /// <param name="logTables"></param>
 /// <param name="generalSettings"></param>
  public UserController(IOptions<ErrorSettings> errorSettings,
      IMatterCenterServiceFunctions matterCenterServiceFunctions,
      IUserRepository userRepositoy,
      ICustomLogger customLogger, 
      IOptions<LogTables> logTables,  
      IOptions<GeneralSettings> generalSettings
      )
  {
      this.errorSettings = errorSettings.Value; 
      this.matterCenterServiceFunctions = matterCenterServiceFunctions;            
      this.customLogger = customLogger;
      this.logTables = logTables.Value;             
      this.generalSettings = generalSettings.Value;
      this.userRepositoy = userRepositoy;
  }
Example #32
0
        public XmlCreator(ICustomLogger logger, IXmlService service)
        {
            if (logger is null)
            {
                throw new ArgumentNullException(nameof(logger));
            }

            if (service is null)
            {
                throw new ArgumentNullException(nameof(service));
            }

            this.logger  = logger;
            this.service = service;
        }
 /// <summary>
 /// Constructor where all dependencies are injected
 /// </summary>
 /// <param name="errorSettings"></param>
 /// <param name="sharedSettings"></param>
 /// <param name="matterCenterServiceFunctions"></param>
 /// <param name="customLogger"></param>
 /// <param name="logTables"></param>
 /// <param name="sharedRepository"></param>
  public SharedController(IOptions<ErrorSettings> errorSettings,
      IOptions<SharedSettings> sharedSettings,            
      IMatterCenterServiceFunctions matterCenterServiceFunctions,            
      ICustomLogger customLogger, IOptions<LogTables> logTables,
      ISharedRepository sharedRepository
      )
  {
      this.errorSettings = errorSettings.Value;            
      
      this.matterCenterServiceFunctions = matterCenterServiceFunctions;
      this.sharedRepository = sharedRepository;
      this.customLogger = customLogger;
      this.logTables = logTables.Value;
      this.sharedSettings = sharedSettings.Value;
  }
Example #34
0
 /// <summary>
 /// constructor where are all the dependencies are injected
 /// </summary>
 /// <param name="errorSettings"></param>
 /// <param name="matterCenterServiceFunctions"></param>
 /// <param name="userRepositoy"></param>
 /// <param name="customLogger"></param>
 /// <param name="logTables"></param>
 /// <param name="generalSettings"></param>
 public UserController(IOptions <ErrorSettings> errorSettings,
                       IMatterCenterServiceFunctions matterCenterServiceFunctions,
                       IUserRepository userRepositoy,
                       ICustomLogger customLogger,
                       IOptions <LogTables> logTables,
                       IOptions <GeneralSettings> generalSettings
                       )
 {
     this.errorSettings = errorSettings.Value;
     this.matterCenterServiceFunctions = matterCenterServiceFunctions;
     this.customLogger    = customLogger;
     this.logTables       = logTables.Value;
     this.generalSettings = generalSettings.Value;
     this.userRepositoy   = userRepositoy;
 }
        public AccountController(IAccountManager accountManager,
                                 IJwtFactory jwtFactory,
                                 IOptions <JwtIssuerOptions> jwtOptions,
                                 ICustomLogger logger)
        {
            _accountManager = accountManager;
            _jwtFactory     = jwtFactory;
            _jwtOptions     = jwtOptions.Value;
            _logger         = logger;

            _serializerSettings = new JsonSerializerSettings
            {
                Formatting = Formatting.Indented
            };
        }
Example #36
0
        /// <summary>
        /// Constructor where all dependencies are injected
        /// </summary>
        /// <param name="errorSettings"></param>
        /// <param name="sharedSettings"></param>
        /// <param name="matterCenterServiceFunctions"></param>
        /// <param name="customLogger"></param>
        /// <param name="logTables"></param>
        /// <param name="sharedRepository"></param>
        public SharedController(IOptions <ErrorSettings> errorSettings,
                                IOptions <SharedSettings> sharedSettings,
                                IMatterCenterServiceFunctions matterCenterServiceFunctions,
                                ICustomLogger customLogger, IOptions <LogTables> logTables,
                                ISharedRepository sharedRepository
                                )
        {
            this.errorSettings = errorSettings.Value;

            this.matterCenterServiceFunctions = matterCenterServiceFunctions;
            this.sharedRepository             = sharedRepository;
            this.customLogger   = customLogger;
            this.logTables      = logTables.Value;
            this.sharedSettings = sharedSettings.Value;
        }
 /// <summary>
 /// Constructor where all the required dependencies are injected
 /// </summary>
 /// <param name="errorSettings"></param>
 /// <param name="documentSettings"></param>
 /// <param name="spoAuthorization"></param>
 /// <param name="matterCenterServiceFunctions"></param>
 /// <param name="documentRepositoy"></param>
 public DocumentController(IOptions <ErrorSettings> errorSettings,
                           IOptions <DocumentSettings> documentSettings,
                           ISPOAuthorization spoAuthorization,
                           IMatterCenterServiceFunctions matterCenterServiceFunctions,
                           IDocumentRepository documentRepositoy,
                           ICustomLogger customLogger, IOptions <LogTables> logTables
                           )
 {
     this.errorSettings                = errorSettings.Value;
     this.documentSettings             = documentSettings.Value;
     this.spoAuthorization             = spoAuthorization;
     this.matterCenterServiceFunctions = matterCenterServiceFunctions;
     this.documentRepositoy            = documentRepositoy;
     this.customLogger = customLogger;
     this.logTables    = logTables.Value;
 }
Example #38
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ClientPage"/> class.
        /// </summary>
        /// <param name="loggerFactory">Logger factory</param>
        /// <param name="menuVisualizer">Menu visualizer</param>
        /// <param name="outputEnvironment">Output environment implementation</param>
        /// <param name="clientService">Client service implementation</param>
        /// <param name="bookService">Book service implementation</param>
        /// <param name="commentService">Comment service implementation</param>
        public ClientPage(
            ICustomLoggerFactory loggerFactory,
            IMenuVisualizer menuVisualizer,
            IOutputEnvironment outputEnvironment,
            IClientService clientService,
            IBookService bookService,
            ICommentService commentService)
        {
            this._logger            = loggerFactory.CreateLogger <ClientPage>();
            this._outputEnvironment = outputEnvironment;
            this._menuVisualizer    = menuVisualizer;

            this._clientService  = clientService;
            this._bookService    = bookService;
            this._commentService = commentService;
        }
 /// <summary>
 /// Constructor where all the required dependencies are injected
 /// </summary>
 /// <param name="errorSettings"></param>
 /// <param name="documentSettings"></param>
 /// <param name="spoAuthorization"></param>
 /// <param name="matterCenterServiceFunctions"></param>
 /// <param name="documentRepositoy"></param>
 public DocumentController(IOptions<ErrorSettings> errorSettings,
     IOptions<DocumentSettings> documentSettings,
     ISPOAuthorization spoAuthorization,
     IMatterCenterServiceFunctions matterCenterServiceFunctions,
     IDocumentRepository documentRepositoy,
     ICustomLogger customLogger, IOptions<LogTables> logTables
     )
 {
     this.errorSettings = errorSettings.Value;
     this.documentSettings = documentSettings.Value;
     this.spoAuthorization = spoAuthorization;
     this.matterCenterServiceFunctions = matterCenterServiceFunctions;
     this.documentRepositoy = documentRepositoy;
     this.customLogger = customLogger;
     this.logTables = logTables.Value;
 }
Example #40
0
        public MyCustomTokenSigningService(
            Thinktecture.IdentityServer.Core.Configuration.IdentityServerOptions options,
            ICustomLogger logger)
        {
            if (options == null)
            {
                throw new ArgumentNullException("options");
            }
            if (logger == null)
            {
                throw new ArgumentNullException("logger");
            }

            this.options = options;
            this.logger  = logger;
        }
 /// <summary>
 /// Constructor where all the required dependencies are injected
 /// </summary>
 /// <param name="errorSettings"></param>
 /// <param name="taxonomySettings"></param>
 /// <param name="generalSettings"></param>
 /// <param name="spoAuthorization"></param>
 /// <param name="matterCenterServiceFunctions"></param>
 /// <param name="taxonomyRepository"></param>
 public TaxonomyController(IOptions <ErrorSettings> errorSettings,
                           IOptions <TaxonomySettings> taxonomySettings,
                           IOptions <GeneralSettings> generalSettings,
                           ISPOAuthorization spoAuthorization,
                           IMatterCenterServiceFunctions matterCenterServiceFunctions,
                           ITaxonomyRepository taxonomyRepository, ICustomLogger customLogger, IOptions <LogTables> logTables)
 {
     this.errorSettings                = errorSettings.Value;
     this.taxonomySettings             = taxonomySettings.Value;
     this.generalSettings              = generalSettings.Value;
     this.spoAuthorization             = spoAuthorization;
     this.matterCenterServiceFunctions = matterCenterServiceFunctions;
     this.taxonomyRepository           = taxonomyRepository;
     this.customLogger = customLogger;
     this.logTables    = logTables.Value;
 }
 /// <summary>
 /// Constructor where all the required dependencies are injected
 /// </summary>
 /// <param name="errorSettings"></param>
 /// <param name="taxonomySettings"></param>
 /// <param name="generalSettings"></param>
 /// <param name="spoAuthorization"></param>
 /// <param name="matterCenterServiceFunctions"></param>
 /// <param name="taxonomyRepository"></param>
 public TaxonomyController(IOptions<ErrorSettings> errorSettings, 
     IOptions<TaxonomySettings> taxonomySettings, 
     IOptions<GeneralSettings> generalSettings,
     ISPOAuthorization spoAuthorization, 
     IMatterCenterServiceFunctions matterCenterServiceFunctions,
     ITaxonomyRepository taxonomyRepository, ICustomLogger customLogger, IOptions<LogTables> logTables)
 {
     this.errorSettings = errorSettings.Value;
     this.taxonomySettings = taxonomySettings.Value;
     this.generalSettings = generalSettings.Value;
     this.spoAuthorization = spoAuthorization;
     this.matterCenterServiceFunctions = matterCenterServiceFunctions;            
     this.taxonomyRepository = taxonomyRepository;
     this.customLogger = customLogger;
     this.logTables = logTables.Value;
 }
        public UnifiToFileSystemExporter(
            IBlacklist blacklist,
            IDirectoryWrapper directoryWrapperInstance,
            IFileWrapper fileWrapper,
            ICustomLogger customLogger,
            string rootPath)
        {
            _directoryWrapper = directoryWrapperInstance;
            _fileWrapper      = fileWrapper;
            _customLogger     = customLogger;
            _rootPath         = rootPath;

            CheckRootPath(directoryWrapperInstance);
            _dateTimeStamp = DateTime.Now.ToString("dd_MM_yyyy_HH-mm-ss");
            _blacklist     = blacklist;
        }
Example #44
0
 /// <summary>
 /// Constructor to inject required dependencies
 /// </summary>
 /// <param name="generalSettings"></param>
 /// <param name="taxonomySettings"></param>
 /// <param name="logTables"></param>
 /// <param name="spoAuthorization"></param>
 /// <param name="customLogger"></param>
 public Taxonomy(IOptions<GeneralSettings> generalSettings, 
     IOptions<TaxonomySettings> taxonomySettings,
     IOptions<ContentTypesConfig> contentTypeSettings,
     IOptions<LogTables> logTables,
     ISPOAuthorization spoAuthorization, ICustomLogger customLogger, 
     IConfigurationRoot configuration)
 {
     this.generalSettings = generalSettings.Value;
     this.taxonomySettings = taxonomySettings.Value;
     this.contentTypeSettings = contentTypeSettings.Value;
     this.logTables = logTables.Value;
     this.spoAuthorization = spoAuthorization;
     taxonomyResponseVM = new TaxonomyResponseVM();
     this.customLogger = customLogger;
     
     this.configuration = configuration;
 }       
Example #45
0
        public AudiobookDownloader()
        {
            InitializeComponent();

            logger  = new CustomLogger(textLog);
            db      = new SqLiteAudiobookRepository();
            service = new AbooksService(logger, baseUrl);
            client  = new OwnRadioClient(logger);
            grabber = new Grabber(service, logger, db, client);

            if (Boolean.Parse(ConfigurationManager.AppSettings["IsUseProxy"]))
            {
                IsProxy.Checked = true;
            }

            proxy.Text = ConfigurationManager.AppSettings["ProxyIp"];
        }
 /// <summary>
 /// Constructir where all the dependencies are injected
 /// </summary>
 /// <param name="spoAuthorization"></param>
 public UsersDetails(IOptions <MatterSettings> matterSettings,
                     IOptions <ListNames> listNames,
                     ISPOAuthorization spoAuthorization,
                     ICustomLogger customLogger,
                     IOptions <LogTables> logTables,
                     IHttpContextAccessor httpContextAccessor,
                     IOptions <GeneralSettings> generalSettings)
 {
     this.matterSettings   = matterSettings.Value;
     this.listNames        = listNames.Value;
     this.spoAuthorization = spoAuthorization;
     //this.spList = spList;
     this.customLogger        = customLogger;
     this.logTables           = logTables.Value;
     this.httpContextAccessor = httpContextAccessor;
     this.generalSettings     = generalSettings.Value;
 }
Example #47
0
        /// <summary>
        /// Constructor to inject required dependencies
        /// </summary>
        /// <param name="generalSettings"></param>
        /// <param name="taxonomySettings"></param>
        /// <param name="logTables"></param>
        /// <param name="spoAuthorization"></param>
        /// <param name="customLogger"></param>
        public Taxonomy(IOptions <GeneralSettings> generalSettings,
                        IOptions <TaxonomySettings> taxonomySettings,
                        IOptions <ContentTypesConfig> contentTypeSettings,
                        IOptions <LogTables> logTables,
                        ISPOAuthorization spoAuthorization, ICustomLogger customLogger,
                        IConfigurationRoot configuration)
        {
            this.generalSettings     = generalSettings.Value;
            this.taxonomySettings    = taxonomySettings.Value;
            this.contentTypeSettings = contentTypeSettings.Value;
            this.logTables           = logTables.Value;
            this.spoAuthorization    = spoAuthorization;
            taxonomyResponseVM       = new TaxonomyResponseVM();
            this.customLogger        = customLogger;

            this.configuration = configuration;
        }
Example #48
0
 /// <summary>
 /// Constructir where all the dependencies are injected
 /// </summary>
 /// <param name="spoAuthorization"></param>
 public UsersDetails(IOptions<MatterSettings> matterSettings, 
     IOptions<ListNames> listNames,
     ISPOAuthorization spoAuthorization, 
     ICustomLogger customLogger, 
     IOptions<LogTables> logTables,
     IHttpContextAccessor httpContextAccessor,
     IOptions<GeneralSettings> generalSettings)
 {
     this.matterSettings = matterSettings.Value;
     this.listNames = listNames.Value;
     this.spoAuthorization = spoAuthorization;
     //this.spList = spList;
     this.customLogger = customLogger;
     this.logTables = logTables.Value;
     this.httpContextAccessor = httpContextAccessor;
     this.generalSettings = generalSettings.Value;
 }
 public RequestProcessor(HttpListenerContext context, Dictionary<string, IRequestProcessor> processors,
     IRequestProcessor defaultProcessor, ICustomLogger logger)
 {
     _logger = logger;
     try
     {
         var result = HttpStatusCode.OK;
         result = !processors.ContainsKey(context.Request.Url.LocalPath.ToLower())
             ? defaultProcessor.Process(context, null)
             : processors[context.Request.Url.LocalPath.ToLower()].Process(context, _presenter);
         _logger.LogRequest(context.Request.HttpMethod, context.Request.Url.ToString(), result);
     }
     catch (MethodNotAllowedException ex)
     {
         var result = _presenter.FormatError(HttpStatusCode.MethodNotAllowed, ex.Message);
         var responseArray = Encoding.UTF8.GetBytes(result);
         context.Response.StatusCode = (int) HttpStatusCode.MethodNotAllowed;
         context.Response.ContentType = "text/html; charset=utf-8";
         context.Response.ContentLength64 = responseArray.Length;
         context.Response.OutputStream.Write(responseArray, 0, responseArray.Length);
         context.Response.OutputStream.Close();
         _logger.LogRequest(ex.RequestedMethod, ex.Query, HttpStatusCode.MethodNotAllowed);
     }
     catch (MissedParamsException ex)
     {
         var result = _presenter.FormatError(HttpStatusCode.Forbidden, ex.Message);
         var responseArray = Encoding.UTF8.GetBytes(result);
         context.Response.StatusCode = (int) HttpStatusCode.Forbidden;
         context.Response.ContentType = "text/html; charset=utf-8";
         context.Response.ContentLength64 = responseArray.Length;
         context.Response.OutputStream.Write(responseArray, 0, responseArray.Length);
         context.Response.OutputStream.Close();
         _logger.LogRequest(context.Request.HttpMethod, ex.Query, HttpStatusCode.Forbidden);
     }
     catch (ArgumentNullException ex)
     {
     }
     catch (Exception ex)
     {
         if (context != null)
         {
             context.Response.StatusCode = (int) HttpStatusCode.InternalServerError;
             context.Response.OutputStream.Close();
         }
     }
 }
        /// <summary>
        /// DcouemtsController Constructor where all the required dependencies are injected
        /// </summary>
        /// <remarks></remarks>        /// 
        /// <param name="errorSettings"></param>
        /// <param name="documentSettings"></param>
        /// <param name="matterCenterServiceFunctions"></param>
        /// <param name="documentRepositoy"></param>
        /// <param name="customLogger"></param>
        /// <param name="logTables"></param>
        /// <param name="documentProvision"></param>
        /// <param name="generalSettings"></param>
        public DocumentController(IOptions<ErrorSettings> errorSettings,
            IOptions<DocumentSettings> documentSettings,            
            IMatterCenterServiceFunctions matterCenterServiceFunctions,
            IDocumentRepository documentRepositoy,
            ICustomLogger customLogger, IOptions<LogTables> logTables, IDocumentProvision documentProvision,
            IOptions<GeneralSettings> generalSettings

            )
        {
            this.errorSettings = errorSettings.Value;
            this.documentSettings = documentSettings.Value;            
            this.matterCenterServiceFunctions = matterCenterServiceFunctions;
            this.documentRepositoy = documentRepositoy;
            this.customLogger = customLogger;
            this.logTables = logTables.Value;
            this.documentProvision = documentProvision;
            this.generalSettings = generalSettings.Value;
        }
        public FindDuplicateFilesViewModel(ICustomLogger logger, IFileService fileService)
        {
            if(logger == null)
                throw new ArgumentNullException("logger");

            if (fileService == null)
                throw new ArgumentNullException("fileService");

            _logger = logger;
            _fileService = fileService;
            _viewName = "Find Duplicates";
            _enableButton = true;
            _tokenSource = new CancellationTokenSource();
            _selectedFolder = ConfigurationManager.AppSettings.Get("StartUpFolder");
            _errorMessage = string.Empty;
            DuplicateFiles = new ObservableCollection<DuplicateFile>();
            SearchDuplicates = new DelegateCommand<string>(SearchDuplicateFiles, CanExecuteMethod);
            DeleteDuplicates = new DelegateCommand(DeleteDuplicateFiles, () => EnableButton);
            CancelCommand = new DelegateCommand(() => _tokenSource.Cancel());
        }
 /// <summary>
 /// Constructor where all the required dependencies are injected
 /// </summary>
 /// <param name="errorSettings"></param>
 /// <param name="matterSettings"></param>
 /// <param name="matterCenterServiceFunctions"></param>
 /// <param name="matterRepositoy"></param>
 /// <param name="customLogger"></param>
 /// <param name="logTables"></param>
 /// <param name="validationFunctions"></param>
 /// <param name="editFunctions"></param>
 /// <param name="matterProvision"></param>
 public MatterController(IOptions<ErrorSettings> errorSettings,
     IOptions<MatterSettings> matterSettings,
     
     IMatterCenterServiceFunctions matterCenterServiceFunctions,
     IMatterRepository matterRepositoy,
     ICustomLogger customLogger, IOptions<LogTables> logTables,
     IValidationFunctions validationFunctions,
     IEditFunctions editFunctions,
     IMatterProvision matterProvision
     )
 {
     this.errorSettings = errorSettings.Value;
     this.matterSettings = matterSettings.Value;            
     this.matterCenterServiceFunctions = matterCenterServiceFunctions;
     this.matterRepositoy = matterRepositoy;
     this.customLogger = customLogger;
     this.logTables = logTables.Value;
     this.validationFunctions = validationFunctions;
     this.editFunctions = editFunctions;
     this.matterProvision = matterProvision;
 }
Example #53
0
 /// <summary>
 /// All the dependencies are injected into the constructor
 /// </summary>
 /// <param name="spoAuthorization"></param>
 /// <param name="generalSettings"></param>
 public SPList(ISPOAuthorization spoAuthorization,
     IOptions<CamlQueries> camlQueries, 
     IOptions<ErrorSettings> errorSettings,
     IOptions<SearchSettings> searchSettings,
     IOptions<ContentTypesConfig> contentTypesConfig,
     ICustomLogger customLogger, 
     IOptions<LogTables> logTables, 
     IOptions<MailSettings> mailSettings,
     IOptions<GeneralSettings> generalSettings,
     IHostingEnvironment hostingEnvironment, 
     IUsersDetails userDetails)
 {
     this.searchSettings = searchSettings.Value;
     this.camlQueries = camlQueries.Value;
     this.spoAuthorization = spoAuthorization;
     this.customLogger = customLogger;
     this.logTables = logTables.Value;
     this.mailSettings = mailSettings.Value;
     this.hostingEnvironment = hostingEnvironment;
     this.errorSettings = errorSettings.Value;
     this.userDetails = userDetails;
     this.generalSettings = generalSettings.Value;
 }
 public DocumentProvision(IDocumentRepository docRepository, 
     IUserRepository userRepository, 
     IUploadHelperFunctions uploadHelperFunctions, 
     IOptions<GeneralSettings> generalSettings, 
     IOptions<DocumentSettings> documentSettings, 
     ICustomLogger customLogger,
     IOptions<SearchSettings> searchSettings,
     IConfigurationRoot configuration,
     IHttpContextAccessor httpContextAccessor,
     IOptions<LogTables> logTables, IOptions<ErrorSettings> errorSettings)
 {
     this.docRepository = docRepository;
     this.uploadHelperFunctions = uploadHelperFunctions;
     this.userRepository = userRepository;
     this.generalSettings = generalSettings.Value;
     this.documentSettings = documentSettings.Value;
     this.customLogger = customLogger;
     this.logTables = logTables.Value;
     this.errorSettings = errorSettings.Value;
     this.searchSettings = searchSettings.Value;
     this.configuration = configuration;
     this.httpContextAccessor = httpContextAccessor;
 }
		internal static void EnsureSdbLoggingService ()
		{
			if (logger == null)
				Mono.Debugging.Soft.LoggingService.CustomLogger = logger = new MDLogger ();
		}
 public HardCodedCompanyLoader(ICustomLogger logger)
 {
     _logger = logger;
 }
Example #57
0
 public FileService(ICustomLogger logger)
 {
     _logger = logger;
     AllFiles = new Dictionary<string, List<string>>();
 }
 public MyCustomClaimsProvider(ICustomLogger logger, IUserService userSvc)
     : base(userSvc)
 {
     this.logger = logger;
     this.logger.Log("yay, custom type was injected");
 }
 public SchedulerService(ICustomLogger customLogger)
 {
     _customLogger = customLogger;
     InitializeComponent();
 }
 public JsonCompanyLoader(ICustomLogger _logger)
 {
     this._logger = _logger;
 }