public CommonCache(ILogger <CommonCache> log, ICoreConfiguration config, IMemoryCache cache) { _syncLock = new object(); _log = log; _config = config; _cache = cache; }
public BoxDestination( ICoreConfiguration coreConfiguration, IGreenshotLanguage greenshotLanguage, IBoxConfiguration boxConfiguration, IBoxLanguage boxLanguage, Func <CancellationTokenSource, Owned <PleaseWaitForm> > pleaseWaitFormFactory, INetworkConfiguration networkConfiguration, IResourceProvider resourceProvider) : base(coreConfiguration, greenshotLanguage) { _boxConfiguration = boxConfiguration; _boxLanguage = boxLanguage; _pleaseWaitFormFactory = pleaseWaitFormFactory; _networkConfiguration = networkConfiguration; _resourceProvider = resourceProvider; _oauth2Settings = new OAuth2Settings { AuthorizationUri = new Uri("https://app.box.com"). AppendSegments("api", "oauth2", "authorize"). ExtendQuery(new Dictionary <string, string> { { "response_type", "code" }, { "client_id", "{ClientId}" }, { "redirect_uri", "{RedirectUrl}" }, { "state", "{State}" } }), TokenUrl = new Uri("https://api.box.com/oauth2/token"), CloudServiceName = "Box", ClientId = boxConfiguration.ClientId, ClientSecret = boxConfiguration.ClientSecret, RedirectUrl = "https://www.box.com/home/", AuthorizeMode = AuthorizeModes.EmbeddedBrowser, Token = boxConfiguration }; }
public ForgotPasswordCommandHandler(IMediator mediator, ICoreConfiguration coreConfiguration, IRedisContext redisContext, IEmailService emailService) { _mediator = mediator; _coreConfiguration = coreConfiguration; _redisContext = redisContext; _emailService = emailService; }
/// <summary> /// Validate the OutputFilePath, and if this is not correct it will be set to the default /// Added for BUG-1992, reset the OutputFilePath / OutputFileAsFullpath if they don't exist (e.g. the configuration is /// used on a different PC) /// </summary> public static void ValidateAndCorrectOutputFilePath(this ICoreConfiguration coreConfiguration) { if (!Directory.Exists(coreConfiguration.OutputFilePath)) { coreConfiguration.RestoreToDefault("OutputFilePath"); } }
public JiraPlugin(IGreenshotHost greenshotHost, ICoreConfiguration coreConfiguration, JiraConnector jiraConnector) { _greenshotHost = greenshotHost; _coreConfiguration = coreConfiguration; _jiraConnector = jiraConnector; Instance = this; }
protected OneNoteDestination(OneNotePage page, ICoreConfiguration coreConfiguration, IGreenshotLanguage greenshotLanguage ) : this(coreConfiguration, greenshotLanguage) { _page = page; }
protected ExcelDestination(string workbookName, ICoreConfiguration coreConfiguration, IGreenshotLanguage greenshotLanguage ) : this(coreConfiguration, greenshotLanguage) { _workbookName = workbookName; }
static GreenshotForm() { if (!IsInDesignMode) { coreConfiguration = IniConfig.Current.Get <ICoreConfiguration>(); } }
public GetAccountListQueryHandler(IDocumentContext documentContext, ICoreConfiguration coreConfiguration, IMediator mediator, IMapper mapper) { _mediator = mediator; _mapper = mapper; _coreConfiguration = coreConfiguration; _documentContext = documentContext; }
public UpdateEmailCommandHandler(IMediator mediator, IDocumentContext documentContext, ICoreConfiguration coreConfiguration, IEmailService emailService) { _mediator = mediator; _coreConfiguration = coreConfiguration; _documentContext = documentContext; _emailService = emailService; }
public ResetPasswordCommandHandler(IMediator mediator, ICoreConfiguration coreConfiguration, IRedisContext redisContext, IDocumentContext documentContext) { _mediator = mediator; _coreConfiguration = coreConfiguration; _redisContext = redisContext; _documentContext = documentContext; }
public AuthenticateUserCommandHandler(IMediator mediator, IDocumentContext documentContext, IRedisContext redisContext, ICoreConfiguration coreConfiguration) { _mediator = mediator; _coreConfiguration = coreConfiguration; _documentContext = documentContext; _redisContext = redisContext; }
public GreenshotServerAction(ICoreConfiguration coreConfiguration, MainForm mainForm, HotkeyHandler hotkeyHandler, [ImportMany] IEnumerable <IDestination> destinations) { _coreConfiguration = coreConfiguration; _mainForm = mainForm; _hotkeyHandler = hotkeyHandler; _destinations = destinations; }
public CreateAccountCommandHandler(IMediator mediator, IDocumentContext documentContext, ICoreConfiguration coreConfiguration, IEmailService emailService, IMapper mapper) { _mediator = mediator; _coreConfiguration = coreConfiguration; _documentContext = documentContext; _emailService = emailService; _mapper = mapper; }
public FileConfigPartViewModel( ICoreConfiguration coreConfiguration, IGreenshotLanguage greenshotLanguage ) { CoreConfiguration = coreConfiguration; GreenshotLanguage = greenshotLanguage; }
protected PrinterDestination( ICoreConfiguration coreConfiguration, IGreenshotLanguage greenshotLanguage, Func <ISurface, ICaptureDetails, Owned <PrintHelper> > printHelperFactory, string printerName) : this(coreConfiguration, greenshotLanguage, printHelperFactory) { _printerName = printerName; }
public PrinterDestination(ICoreConfiguration coreConfiguration, IGreenshotLanguage greenshotLanguage, Func <ISurface, ICaptureDetails, Owned <PrintHelper> > printHelperFactory ) : base(coreConfiguration, greenshotLanguage) { _greenshotLanguage = greenshotLanguage; _printHelperFactory = printHelperFactory; }
public PickerDestination( DestinationHolder destinationHolder, ICoreConfiguration coreConfiguration, IGreenshotLanguage greenshotLanguage ) : base(coreConfiguration, greenshotLanguage) { _destinationHolder = destinationHolder; }
public CaptureConfigViewModel(ICoreConfiguration coreConfiguration, IConfigTranslations configTranslations, IGreenshotLanguage greenshotLanguage) { CoreConfiguration = coreConfiguration; ConfigTranslations = configTranslations; GreenshotLanguage = greenshotLanguage; }
public ApiKeyAuthenticationMiddleware(RequestDelegate next, ICoreConfiguration coreConfiguraton) { this.next = next; _primaryApiKey = coreConfiguraton.Security.PrimaryApiKey; _secondaryApiKey = coreConfiguraton.Security.SecondaryApiKey; _forceSecureApiCalls = coreConfiguraton.Security.ForceSecureApiCalls; }
public GetUserByEmailQueryHandler(IDocumentContext documentContext, ICoreConfiguration coreConfiguration, IMediator mediator) { _mediator = mediator; _coreConfiguration = coreConfiguration; _documentContext = documentContext; //Log Activity, Check Authorization, Etc... }
public ValuesController(ILoggerFactory log, ICoreConfiguration config, Settings settings, IBusinessLogic logic, ITest test) { _log = log.CreateLogger <ValuesController>(); _config = config; _settings = settings; _logic = logic; _test = test; }
public PrintConfigViewModel( ICoreConfiguration coreConfiguration, IGreenshotLanguage greenshotLanguage ) { CoreConfiguration = coreConfiguration; GreenshotLanguage = greenshotLanguage; }
/// <summary> /// Constructor with dependencies /// </summary> /// <param name="coreConfiguration">ICoreConfiguration</param> /// <param name="greenshotLanguage">IGreenshotLanguage</param> public UpdateService( ICoreConfiguration coreConfiguration, IGreenshotLanguage greenshotLanguage) { _coreConfiguration = coreConfiguration; _greenshotLanguage = greenshotLanguage; LatestVersion = CurrentVersion = GetType().Assembly.GetName().Version; _coreConfiguration.LastSaveWithVersion = CurrentVersion.ToString(); }
public OutputConfigViewModel( ICoreConfiguration coreConfiguration, IGreenshotLanguage greenshotLanguage, FileConfigPartViewModel fileConfigPartViewModel) { CoreConfiguration = coreConfiguration; GreenshotLanguage = greenshotLanguage; FileConfigPartViewModel = fileConfigPartViewModel; }
public ExternalCommandDestinationProvider( IExternalCommandConfiguration externalCommandConfiguration, ICoreConfiguration coreConfiguration, IGreenshotLanguage greenshotLanguage) { _externalCommandConfig = externalCommandConfiguration; _coreConfiguration = coreConfiguration; _greenshotLanguage = greenshotLanguage; }
/// <summary> /// Supply values we can't put as defaults /// </summary> /// <param name="property">The property to return a default for</param> /// <returns>object with the default value for the supplied property</returns> public static object GetDefault(this ICoreConfiguration coreConfiguration, string property) { switch (property) { case "OutputFileAsFullpath": if (coreConfiguration.IsPortable) { return(Path.Combine(Application.StartupPath, @"..\..\Documents\Pictures\Greenshots\dummy.png")); } return(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Desktop), "dummy.png")); case "OutputFilePath": if (!coreConfiguration.IsPortable) { return(Environment.GetFolderPath(Environment.SpecialFolder.Desktop)); } var pafOutputFilePath = Path.Combine(Application.StartupPath, @"..\..\Documents\Pictures\Greenshots"); if (!Directory.Exists(pafOutputFilePath)) { try { Directory.CreateDirectory(pafOutputFilePath); return(pafOutputFilePath); } catch (Exception ex) { Log.Warn().WriteLine(ex); // Problem creating directory, fallback to Desktop } } else { return(pafOutputFilePath); } return(Environment.GetFolderPath(Environment.SpecialFolder.Desktop)); case "DWMBackgroundColor": return(Color.Transparent); case "ActiveTitleFixes": return(new List <string> { "Firefox", "IE", "Chrome" }); case "TitleFixMatcher": return(new Dictionary <string, string> { { "Firefox", " - Mozilla Firefox.*" }, { "IE", " - (Microsoft|Windows) Internet Explorer.*" }, { "Chrome", " - Google Chrome.*" } }); case "TitleFixReplacer": return(new Dictionary <string, string> { { "Firefox", "" }, { "IE", "" }, { "Chrome", "" } }); } return(null); }
public GetAccountDetailsQueryHandler(IDocumentContext documentContext, ICoreConfiguration coreConfiguration, IMediator mediator, IMapper mapper) { _mediator = mediator; _mapper = mapper; _coreConfiguration = coreConfiguration; _documentContext = documentContext; //Log Activity, Check Authorization, Etc... }
/// <summary> /// Validate the OutputFileAsFullpath, and if this is not correct it will be set to the default /// Added for BUG-1992, reset the OutputFilePath / OutputFileAsFullpath if they don't exist (e.g. the configuration is /// used on a different PC) /// </summary> public static void ValidateAndCorrectOutputFileAsFullpath(this ICoreConfiguration coreConfiguration) { var outputFilePath = Path.GetDirectoryName(coreConfiguration.OutputFileAsFullpath); if (outputFilePath == null || !File.Exists(coreConfiguration.OutputFileAsFullpath) && !Directory.Exists(outputFilePath)) { coreConfiguration.RestoreToDefault("OutputFileAsFullpath"); } }
public ExternalCommandDestination(ExternalCommandDefinition defintion, IExternalCommandConfiguration externalCommandConfiguration, ICoreConfiguration coreConfiguration, IGreenshotLanguage greenshotLanguage ) : base(coreConfiguration, greenshotLanguage) { _externalCommandDefinition = defintion; _externalCommandConfiguration = externalCommandConfiguration; }
public Widget(ICoreConfiguration configuration) { this.configuration = configuration; }