Exemplo n.º 1
0
 public CreditCardController(IApplication Application, ILocalLogger Log) : base(Application, Log)
 {
     PartialViewNameFor_ItemsList  = "CreditCards";
     PartialViewNameFor_CreateItem = "CreateCreditCardItem";
     PartialViewNameFor_EditItem   = "EditCreditCardItem";
     PartialViewNameFor_DeleteItem = "DeleteCreditCardItem";
 }
Exemplo n.º 2
0
 public SalaryController(IApplication Application, ILocalLogger Logger) : base(Application, Logger)
 {
     PartialViewNameFor_ItemsList  = "Salaries";
     PartialViewNameFor_EditItem   = "EditSalaryItem";
     PartialViewNameFor_DeleteItem = "DeleteSalaryItem";
     PartialViewNameFor_CreateItem = "CreateSalaryItem";
 }
Exemplo n.º 3
0
        public HubClient(MediaPlayer mediaPlayer, ILocalLogger log, AppSettings settings)
        {
            this.mediaPlayer = mediaPlayer;
            this.log         = log;
            this.settings    = settings;

            hub = new HubConnectionBuilder()
                  .WithUrl($"http://{settings.HubEndpoint}/orchestratorhub")
                  .WithAutomaticReconnect()
                  .Build();

            hub.KeepAliveInterval = TimeSpan.FromSeconds(3);

            hub.On <string>("PlayMedia", PlayMedia);
            hub.On <Guid>("StopMedia", mediaPlayer.StopMedia);
            hub.On("StopAll", mediaPlayer.StopAll);

            hub.Reconnecting += (df) =>
            {
                return(Task.CompletedTask);
            };

            hub.StartAsync();


            statusTimer = new Timer((e) =>
            {
                SendStatus();
            }, null, 1000, 1000);
        }
Exemplo n.º 4
0
        public Application(
            IAnnualBudgetBL AnnualBudgetBL,
            IMonthlyBudgetBL MonthlyBudgetBL,

            IExpenseBL BudgetItemBL,
            ISalaryBL SalaryBL,
            IChequeBL ChequeBL,
            ICreditCardBL CreditCardBL,

            IMonthlyPlanTemplateBL MonthlyPlanTemplateBL,
            ILocalLogger LocalLogger)
        {
            // DI
            annualBudgetBL    = AnnualBudgetBL;
            monthlyBudgetBL   = MonthlyBudgetBL;
            expenseBL         = BudgetItemBL;
            salaryBL          = SalaryBL;
            chequeBL          = ChequeBL;
            creditCardBL      = CreditCardBL;
            monthlyTemplateBL = MonthlyPlanTemplateBL;
            _log = LocalLogger;
            // Init logger
            _log.SetType(typeof(Application));
            // BL hashtable
            buildBusinessLayersHashtable();
        }
Exemplo n.º 5
0
 public ExpenseController(IApplication Application, ILocalLogger Log) : base(Application, Log)
 {
     PartialViewNameFor_ItemsList  = "Expenses";
     PartialViewNameFor_CreateItem = "CreateExpenseItem";
     PartialViewNameFor_EditItem   = "EditExpenseItem";
     PartialViewNameFor_DeleteItem = "DeleteExpenseItem";
 }
Exemplo n.º 6
0
 public BaseController(IApplication ApplicaionLayer, ILocalLogger Log)
 {
     // Setup
     application = ApplicaionLayer;
     _log        = Log;
     // Init logger
     _log = Log.SetType(typeof(Model));
 }
Exemplo n.º 7
0
 public WindowsRemoteManagerGeneral(
     ICommunicator communicator,
     ILocalLogger logger,
     ILocalCacheService cacheService
     )
 {
     this.Communicator      = communicator;
     this.LocalCacheService = cacheService;
     this.Logger            = logger;
 }
Exemplo n.º 8
0
 public PtpClient(
     ILocalLogger logger,
     IPtpConnectionManager connectionManager)
 {
     this.logger            = logger;
     this.connectionManager = connectionManager;
     this.connectionManager.OnEventHappened      += ConnectionManager_OnEventHappened;
     this.connectionManager.OnLocalEventHappened += ConnectionManager_OnLocalEventHappened;
     this.connectionManager.OnChatHistoryUpdated += ConnectionManager_OnChatHistoryUpdated;
     connectionManager.Start();
 }
Exemplo n.º 9
0
        public AudioPlayer(ILocalLogger log)
        {
            this.log = log;

            outputDevice = new WaveOutEvent();
            outputDevice.PlaybackStopped += (e, r) =>
            {
                IsBusy           = false;
                CurrentMediaFile = null;
            };
        }
Exemplo n.º 10
0
        public MediaPlayer(VideoPlayer video, ILocalLogger log, AppSettings settings)
        {
            this.video    = video;
            this.log      = log;
            this.settings = settings;
            audios        = new List <AudioPlayer>();

            if (settings.VideoPlayer)
            {
                video.Show();
            }
        }
        public AuthorApiController(ILocalLogger logger, IAuthorService authorService)
        {
            if (logger == null)
            {
                throw new ArgumentNullException(nameof(logger));
            }

            if (authorService == null)
            {
                throw new ArgumentNullException(nameof(authorService));
            }

            _logger = logger;
            _authorService = authorService;
        }
Exemplo n.º 12
0
        public VideoPlayer(ILocalLogger log, AppSettings settings)
        {
            InitializeComponent();

            this.log = log;

            video.MediaEnded += (e, r) =>
            {
                StopVideo(true);
            };

            LoadDefaultVideo();

            IsFullScreen = settings.Fullscreen;
            SetWindowState();
        }
Exemplo n.º 13
0
        /// <summary>
        /// Инициализация статического модуля обработки ошибок приложения
        /// </summary>
        /// <param name="logModule">уже проинициализированный объект</param>
        /// <param name="userName">Для Web указать "All"</param>
        /// <param name="appName">Наименование приложения. Указать римя приложения или "Application"</param>
        /// <param name="switchOnLocalLogger">Включить локальное логирование</param>
        public static void Init(LogModule logModule, string userName = "******", string appName = "Application", bool switchOnLocalLogger = false)
        {
            lock (Sync)
            {
                LogModule oldLog = _log;
                _log = logModule;
                if (oldLog != null && oldLog is IDisposable)
                {
                    (oldLog as IDisposable).Dispose();
                }

                if (switchOnLocalLogger)
                {
                    var localLogger = LoggerFactory.GetLocalLogger(appName, userName);

                    if (localLogger != null)
                    {
                        _localLogger = localLogger;
                    }
                }
            }
        }
        /// <summary>
        /// IBookRepository injection constructor
        /// </summary>
        /// <param name="bookRepository">Injection of type IBookRepository</param>
        public BookApiController(IBookOrchestration bookOrchestration,
            IBookRepository bookRepository,
            ILocalLogger localLogger)
        {
            if (localLogger == null)
            {
                throw new ArgumentNullException("localLogger");
            }

            if (bookOrchestration == null)
            {
                throw new ArgumentNullException("bookOrchestration");
            }

            if (bookRepository == null)
            {
                throw new ArgumentNullException("bookRepository");
            }

            _localLogger = localLogger;
            _bookOrchestration = bookOrchestration;
            _bookRepository = bookRepository;
        }
Exemplo n.º 15
0
 public MonthlyPlansController(IApplication Application, ILocalLogger Log) : base(Application, Log)
 {
 }
Exemplo n.º 16
0
 public NhUnitOfWork(ILocalLogger logger, ISessionFactoryWrapper sessionFactoryWrapper)
 {
     _logger = logger;
     _sessionFactoryWrapper = sessionFactoryWrapper;
 }
Exemplo n.º 17
0
 public ChequeRepo(ILocalLogger Log)
 {
     _log = Log;
     _log.SetType(typeof(ChequeRepo));
 }
Exemplo n.º 18
0
 public WebApiApplication()
 {
     // IoC Bootstrapper
     _apiBootstrapper = new ApiBootstrapper();
     _logger = _apiBootstrapper.Resolve<ILocalLogger>();
 }
Exemplo n.º 19
0
 public SalaryRepo(ILocalLogger Log)
 {
     _log = Log;
     _log.SetType(typeof(SalaryRepo));
 }
Exemplo n.º 20
0
 public ExpenseRepo(ILocalLogger Log)
 {
     _log = Log;
     _log.SetType(typeof(ExpenseRepo));
 }
Exemplo n.º 21
0
 public CreditCardRepo(ILocalLogger Log)
 {
     _log = Log;
     _log.SetType(typeof(CreditCardRepo));
 }
Exemplo n.º 22
0
 public static void HandleException(Exception Ex, ILocalLogger logger)
 {
     logger.ErrorFormat("Exception at {0} : {1}\r\n{2}", Reflection.GetCallingMethodName(), Ex.Message, Ex.InnerException != null ? Ex.InnerException?.Message : "");
 }
Exemplo n.º 23
0
 public AnnualBudgetController(IApplication Application, ILocalLogger Log) : base(Application, Log)
 {
 }
Exemplo n.º 24
0
 public IncomeBL(IIncomeRepo IncomeRepo, ILocalLogger Log) : base(IncomeRepo, Log)
 {
 }
Exemplo n.º 25
0
 public MonthlyBudgetRepo(ILocalLogger Log)
 {
     _log = Log;
     _log.SetType(typeof(MonthlyBudgetRepo));
 }
Exemplo n.º 26
0
 public ErrorController(ILocalLogger logger)
 {
     _logger = logger;
 }
Exemplo n.º 27
0
 public BudgetItemBaseController(IApplication ApplicaionLayer, ILocalLogger Log) : base(ApplicaionLayer, Log)
 {
 }
 public GenreApiController(ILocalLogger logger,
     IGenreService genreService)
 {
     _logger = logger;
     _genreService = genreService;
 }
Exemplo n.º 29
0
 public BaseBL(IGenericRepository <Model> Repository, ILocalLogger Logger)
 {
     repository = Repository;
     _log       = Logger;
 }
Exemplo n.º 30
0
 public MonthlyPlanTemplateBL(IMonthlyPlanTemplateRepo MonthlyPlanTemplateRepo, ILocalLogger Log) : base(MonthlyPlanTemplateRepo, Log)
 {
 }
Exemplo n.º 31
0
 public RemoteManagerMaster(ICommunicator communicator, ILocalLogger logger, ILocalCacheService cacheService)
     : base(communicator, logger, cacheService)
 {
     //this.UserInteractor = userInteractor;
 }
Exemplo n.º 32
0
 public WindowsRemoteManagerExecutive(string id, string baseFolder, ICommunicator communicator, ILocalLogger logger, ILocalCacheService cacheService)
     : base(communicator, logger, cacheService)
 {
     this.ID         = id;
     this.BaseFolder = baseFolder;
 }
Exemplo n.º 33
0
 public MonthlyBudgetBL(IMonthlyBudgetRepo MonthlyBudgetRepo, ILocalLogger Log) : base(MonthlyBudgetRepo, Log)
 {
 }
Exemplo n.º 34
0
 public ChequeBL(IChequeRepo ChequeRepo, ILocalLogger Log) : base(ChequeRepo, Log)
 {
 }
Exemplo n.º 35
0
 public AnnualBudgetBL(IAnnualBudgetRepo AnnualBudgetRepo, ILocalLogger Log) : base(AnnualBudgetRepo, Log)
 {
 }