public PagePropertiesService(IRepository repository, IUrlService urlService, IOptionService optionService, IMediaFileUrlResolver fileUrlResolver)
 {
     this.repository = repository;
     this.urlService = urlService;
     this.optionService = optionService;
     this.fileUrlResolver = fileUrlResolver;
 }
        /// <summary>
        /// Initializes a new instance of the MainViewModel class.
        /// </summary>
        public MainViewModel(IDatabaseService databaseService,
                             IAccountService accountService,
                             ICategoryService categoryService,
                             ITransactionService transactionService,
                             IOptionService optionService)
        {
            DatabaseService = databaseService;
            AccountService = accountService;
            TransactionService = transactionService;
            CategoryService = categoryService;
            OptionService = optionService;




            DatabaseService.Initialize();

            Rendu = new ObservableCollection<KeyValuePair<string, string>>();


            CategoryRunner = new RelayCommand(() =>  TestCategory());
            
            AccountRunner = new RelayCommand(() => TestAccount());

            TransactionRunner = new RelayCommand(() => TestTransaction());
           
        }
 public DefaultContentService(ISecurityService securityService, IRepository repository, IUnitOfWork unitOfWork, IOptionService optionService)
 {
     this.unitOfWork = unitOfWork;
     this.securityService = securityService;
     this.repository = repository;
     this.optionService = optionService;
 }
 public OptionCategoryController(IOptionCategoryService optionCategoryService, IOptionService optionService,
     ISettingService settingService)
 {
     this.optionCategoryService = optionCategoryService;
     this.optionService = optionService;
     this.settingService = settingService;
 }
 public DefaultContentProjectionService(PageContentProjectionFactory pageContentProjectionFactory,
     IOptionService optionService, IUnitOfWork unitOfWork)
 {
     this.optionService = optionService;
     this.pageContentProjectionFactory = pageContentProjectionFactory;
     this.unitOfWork = unitOfWork;
 }
 public DefaultPreviewService(PageContentProjectionFactory pageContentProjectionFactory, IOptionService optionService, IRepository repository, ISecurityService securityService)
 {
     this.pageContentProjectionFactory = pageContentProjectionFactory;
     this.repository = repository;
     this.optionService = optionService;
     this.securityService = securityService;
 }
 public AccountController(ApplicationUserManager userManager, IOrderService orderService,
     IOptionService optionService)
 {
     this.orderService = orderService;
     this.optionService = optionService;
     UserManager = userManager;
 }
 public HtmlContentWidgetService(IRepository repository, IHtmlContentWidgetOptionsService optionsService,
     ISaveWidgetService widgetService, IOptionService optionService)
 {
     this.repository = repository;
     this.optionsService = optionsService;
     this.widgetService = widgetService;
     this.optionService = optionService;
 }
        public ForceLowMemoryMode(IOptionService optionService)
        {
            _optionService = optionService;

            optionService.OptionChanged += Options_OptionChanged;

            RefreshFromSettings();
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="HtmlContentService" /> class.
 /// </summary>
 /// <param name="repository">The repository.</param>
 /// <param name="unitOfWork">The unit of work.</param>
 /// <param name="contentService">The content service.</param>
 /// <param name="optionService">The option service.</param>
 public HtmlContentService(IRepository repository, IUnitOfWork unitOfWork,
     Module.Root.Services.IContentService contentService, IOptionService optionService)
 {
     this.repository = repository;
     this.unitOfWork = unitOfWork;
     this.contentService = contentService;
     this.optionService = optionService;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="DefaultLayoutService" /> class.
 /// </summary>
 /// <param name="repository">The repository.</param>
 /// <param name="optionService">The option service.</param>
 /// <param name="configuration">The configuration.</param>
 /// <param name="accessControlService">The access control service.</param>
 public DefaultLayoutService(IRepository repository, IOptionService optionService, ICmsConfiguration configuration,
     IAccessControlService accessControlService)
 {
     this.repository = repository;
     this.optionService = optionService;
     this.configuration = configuration;
     this.accessControlService = accessControlService;
 }
 public AmazonListingServiceTests()
 {
     _amazonLogService = A.Fake<IAmazonLogService>();
     _amazonProductsApiService = A.Fake<IAmazonProductsApiService>();
     _productVariantService = A.Fake<IProductVariantService>();
     _optionService = A.Fake<IOptionService>();
     _amazonListingService = new AmazonListingService(Session,_amazonLogService,_productVariantService,_optionService,_amazonProductsApiService);
 }
 protected override void DisconnectFromWorkspace(Workspace workspace)
 {
     if (_optionService != null)
     {
         _optionService.OptionChanged -= OnOptionChanged;
         _optionService = null;
     }
 }
 protected override void ConnectToWorkspace(Workspace workspace)
 {
     _optionService = workspace.Services.GetService<IOptionService>();
     if (_optionService != null)
     {
         _optionService.OptionChanged += OnOptionChanged;
     }
 }
        public FullSolutionAnalysisOptionBinding(IOptionService optionService, string languageName)
        {
            _optionService = optionService;
            _languageName = languageName;

            _fullSolutionAnalysis = RuntimeOptions.FullSolutionAnalysis;
            _closedFileDiagnostics = ServiceFeatureOnOffOptions.ClosedFileDiagnostic;
        }
 public DesignerAttributeIncrementalAnalyzer(
     IServiceProvider serviceProvider,
     IOptionService optionService,
     IForegroundNotificationService notificationService,
     IEnumerable<Lazy<IAsynchronousOperationListener, FeatureMetadata>> asyncListeners) :
     base(serviceProvider, optionService, notificationService, asyncListeners)
 {
 }
        /// <summary>
        /// let one such as ETA to set logger for the service layer
        /// </summary>
        internal static void SetLogger(IOptionService optionsService, string loggerName)
        {
            if (loggerName == null)
            {
                ResetLogger();
            }

            Logger.SetLogger(GetLogger(optionsService, loggerName));
        }
Exemple #18
0
 public PagesService(IRepository repository, IOptionService optionService, IMediaFileUrlResolver fileUrlResolver,
     ISearchPagesService searchPagesService, IAccessControlService accessControlService)
 {
     this.repository = repository;
     this.optionService = optionService;
     this.fileUrlResolver = fileUrlResolver;
     this.searchPagesService = searchPagesService;
     this.accessControlService = accessControlService;
 }
        public TodoCommentIncrementalAnalyzer(Workspace workspace, IOptionService optionService, TodoCommentIncrementalAnalyzerProvider owner, TodoCommentTokens todoCommentTokens)
        {
            _workspace = workspace;
            _optionService = optionService;

            _owner = owner;
            _todoCommentTokens = todoCommentTokens;

            _state = new TodoCommentState();
        }
 public AmazonListingService(ISession session,
     IAmazonLogService amazonLogService, 
     IProductVariantService productVariantService, IOptionService optionService, IAmazonProductsApiService amazonProductsApiService)
 {
     _session = session;
     _amazonLogService = amazonLogService;
     _productVariantService = productVariantService;
     _optionService = optionService;
     _amazonProductsApiService = amazonProductsApiService;
 }
 public StatsReportingService(IStatsReportingRepository statsReportingRepository,
     ICompetitionRepository competitionRepository,
     IOptionService optionService,
     IFixtureService fixtureService)
 {
     this.statsReportingRepository = statsReportingRepository;
     this.competitionRepository = competitionRepository;
     this.optionService = optionService;
     this.fixtureService = fixtureService;
 }
        protected AbstractPersistentStorage(IOptionService optionService, string solutionFilePath, Action<AbstractPersistentStorage> disposer)
        {
            Contract.ThrowIfNull(disposer);

            this.SolutionFilePath = solutionFilePath;

            this.refCounter = 0;
            this.optionService = optionService;
            this.disposer = disposer;
        }
        /// <summary>
        /// let ones such as Perf setup to share loggingChecker func
        /// </summary>
        internal static Func<FunctionId, bool> GetLoggingChecker(IOptionService optionsService)
        {
            var functionIds = Enum.GetValues(typeof(FunctionId)).Cast<FunctionId>();
            var functionIdOptions = functionIds.ToDictionary(
                id => id, id => optionsService.GetOption(FunctionIdOptions.GetOption(id)));

            Func<FunctionId, bool> loggingChecker = (functionId) => functionIdOptions[functionId];

            return loggingChecker;
        }
        public void SetUp()
        {
            mockFixtureRepository = Substitute.For<IFixtureRepository>();
            mockCompetitionService = Substitute.For<ICompetitionService>();
            mockOptionService = Substitute.For<IOptionService>();

            fixtureService = new FixtureService(
                mockFixtureRepository,
                mockCompetitionService,
                mockOptionService);
        }
        public GoogleBaseControllerTests()
        {
            _configurationProvider = A.Fake<IConfigurationProvider>();
            _googleBaseSettings = A.Fake<GoogleBaseSettings>();
            _googleBaseManager = A.Fake<IGoogleBaseManager>();
            _productVariantService = A.Fake<IProductVariantService>();
            _optionService = A.Fake<IOptionService>();

            _googleBaseController = new GoogleBaseController(_configurationProvider, _googleBaseSettings, _optionService,
                _productVariantService,_googleBaseManager);
        }
        protected void GetInitialCacheValues(IOptionService service, Option<int> minimumCountKey, Option<long> sizeKey, out int minimumCount, out long size)
        {
            if (service == null)
            {
                minimumCount = InitialMinimumCount;
                size = InitialCacheSize;
            }

            minimumCount = service.GetOption(minimumCountKey);
            size = service.GetOption(sizeKey);
        }
 public ExtensionManager(
     IOptionService optionsService,
     IErrorReportingService errorReportingService,
     IErrorLoggerService errorLoggerService,
     List<IExtensionErrorHandler> errorHandlers)
 {
     _optionsService = optionsService;
     _errorHandlers = errorHandlers;
     _errorReportingService = errorReportingService;
     _errorLoggerService = errorLoggerService;
 }
        protected AbstractPersistentStorage(
            IOptionService optionService, string workingFolderPath, string solutionFilePath, Action<AbstractPersistentStorage> disposer)
        {
            Contract.ThrowIfNull(disposer);

            this.WorkingFolderPath = workingFolderPath;
            this.SolutionFilePath = solutionFilePath;

            _refCounter = 0;
            _optionService = optionService;
            _disposer = disposer;
        }
        protected override AbstractOptionPageControl CreateOptionPage(IServiceProvider serviceProvider)
        {
            if (_optionService == null)
            {
                var componentModel = (IComponentModel)serviceProvider.GetService(typeof(SComponentModel));

                var workspace = componentModel.GetService<VisualStudioWorkspace>();
                _optionService = workspace.Services.GetService<IOptionService>();
            }

            return new InternalOptionsControl(nameof(LoggerOptions), serviceProvider);
        }
        public static bool IsClosedFileDiagnosticsEnabled(IOptionService optionService, string language)
        {
            var option = optionService.GetOption(ClosedFileDiagnostic, language);
            if (!option.HasValue)
            {
                return language == LanguageNames.CSharp ?
                    CSharpClosedFileDiagnosticsEnabledByDefault :
                    DefaultClosedFileDiagnosticsEnabledByDefault;
            }

            return option.Value;
        }
Exemple #31
0
 public MetaTagController(IOptionService optionService, ICacheService cacheService)
 {
     _optionService = optionService;
     _cacheService  = cacheService;
 }
Exemple #32
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SavePagePropertiesCommand" /> class.
 /// </summary>
 /// <param name="pageService">The page service.</param>
 /// <param name="redirectService">The redirect service.</param>
 /// <param name="tagService">The tag service.</param>
 /// <param name="sitemapService">The sitemap service.</param>
 /// <param name="urlService">The URL service.</param>
 /// <param name="optionService">The option service.</param>
 /// <param name="cmsConfiguration">The CMS configuration.</param>
 /// <param name="accessControlService">The access control service.</param>
 public SavePagePropertiesCommand(IPageService pageService, IRedirectService redirectService, ITagService tagService,
                                  ISitemapService sitemapService, IUrlService urlService, IOptionService optionService,
                                  ICmsConfiguration cmsConfiguration, IAccessControlService accessControlService)
 {
     this.pageService          = pageService;
     this.redirectService      = redirectService;
     this.tagService           = tagService;
     this.sitemapService       = sitemapService;
     this.urlService           = urlService;
     this.optionService        = optionService;
     this.cmsConfiguration     = cmsConfiguration;
     this.accessControlService = accessControlService;
 }
Exemple #33
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GetHtmlContentWidgetForEditCommand" /> class.
 /// </summary>
 /// <param name="categoryService">The category service.</param>
 /// <param name="contentService">The content service.</param>
 /// <param name="optionService">The option service.</param>
 public GetHtmlContentWidgetForEditCommand(ICategoryService categoryService, IContentService contentService, IOptionService optionService)
 {
     this.categoryService = categoryService;
     this.contentService  = contentService;
     this.optionService   = optionService;
 }
Exemple #34
0
        public static bool ShouldUseSmartTokenFormatterInsteadOfIndenter(
            IEnumerable <AbstractFormattingRule> formattingRules,
            CompilationUnitSyntax root,
            TextLine line,
            IOptionService optionService,
            OptionSet optionSet,
            out SyntaxToken token)
        {
            Contract.ThrowIfNull(formattingRules);
            Contract.ThrowIfNull(root);

            token = default;
            if (!optionSet.GetOption(FormattingOptions.AutoFormattingOnReturn, LanguageNames.CSharp))
            {
                return(false);
            }

            if (optionSet.GetOption(FormattingOptions.SmartIndent, LanguageNames.CSharp) != FormattingOptions.IndentStyle.Smart)
            {
                return(false);
            }

            var firstNonWhitespacePosition = line.GetFirstNonWhitespacePosition();

            if (!firstNonWhitespacePosition.HasValue)
            {
                return(false);
            }

            token = root.FindToken(firstNonWhitespacePosition.Value);
            if (IsInvalidToken(token))
            {
                return(false);
            }

            if (token.IsKind(SyntaxKind.None) ||
                token.SpanStart != firstNonWhitespacePosition)
            {
                return(false);
            }

            // first see whether there is a line operation for current token
            var previousToken = token.GetPreviousToken(includeZeroWidth: true);

            // only use smart token formatter when we have two visible tokens.
            if (previousToken.Kind() == SyntaxKind.None || previousToken.IsMissing)
            {
                return(false);
            }

            var lineOperation = FormattingOperations.GetAdjustNewLinesOperation(formattingRules, previousToken, token, optionSet.AsAnalyzerConfigOptions(optionService, LanguageNames.CSharp));

            if (lineOperation == null || lineOperation.Option == AdjustNewLinesOption.ForceLinesIfOnSingleLine)
            {
                // no indentation operation, nothing to do for smart token formatter
                return(false);
            }

            // We're pressing enter between two tokens, have the formatter figure out hte appropriate
            // indentation.
            return(true);
        }
Exemple #35
0
 public PersistentStorageService(IOptionService optionService) : this(optionService, null)
 {
 }
Exemple #36
0
 public ShapingCatalogs(IDataService dataService, IOptionService optionService, IPriceService priceService)
 {
     this.dataService   = dataService;
     this.optionService = optionService;
     this.priceService  = priceService;
 }
Exemple #37
0
 public FieldService(IUnitOfWork unitOfWork, IMapper mapper, IFieldOptionService service,
                     IMatrixHeaderService matrixHeaderService, IMatrixRowService matrixRowService, IOptionService optionsService)
 {
     _unitOfWork          = unitOfWork;
     _log                 = LogManager.GetLogger(typeof(FieldService));
     _mapper              = mapper;
     _fieldOptionService  = service;
     _matrixHeaderService = matrixHeaderService;
     _matrixRowService    = matrixRowService;
     _optionsService      = optionsService;
 }
Exemple #38
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GetTemplateForEditCommand" /> class.
 /// </summary>
 /// <param name="layoutService">The layout service.</param>
 /// <param name="optionService">The option service.</param>
 public GetTemplateForEditCommand(ILayoutService layoutService, IOptionService optionService)
 {
     this.layoutService = layoutService;
     this.optionService = optionService;
 }
Exemple #39
0
 private OptionSet(IOptionService service, ImmutableDictionary <OptionKey, object> values)
 {
     _service = service;
     _values  = values;
 }
Exemple #40
0
 public OptionController(ILoggingService loggingService, IOptionService optionService) : base(loggingService)
 {
     _optionService = optionService;
 }
Exemple #41
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GetTemplatesCommand" /> class.
 /// </summary>
 /// <param name="optionService">The option service.</param>
 /// <param name="configuration">The configuration.</param>
 public GetTemplatesCommand(IOptionService optionService, ICmsConfiguration configuration)
 {
     this.optionService = optionService;
     this.configuration = configuration;
 }
Exemple #42
0
 public ResultController(IResultService <Result> resultService, IQuestionService <Question> questionService, IRecognizeService recognizeService, IOptionService <Option> optionService)
 {
     _resultService    = resultService;
     _questionService  = questionService;
     _recognizeService = recognizeService;
     _optionService    = optionService;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="DefaultLayoutService" /> class.
 /// </summary>
 /// <param name="repository">The repository.</param>
 /// <param name="optionService">The option service.</param>
 public DefaultLayoutService(IRepository repository, IOptionService optionService)
 {
     this.repository    = repository;
     this.optionService = optionService;
 }
Exemple #44
0
 public OptionController(IOptionService optionService)
 {
     _optionService = optionService;
 }
Exemple #45
0
 public PersistentStorageService(IOptionService optionService, bool testing) : this(optionService)
 {
     _testing = true;
 }
 public EsentPersistentStorageService(
     IOptionService optionService,
     SolutionSizeTracker solutionSizeTracker)
     : base(optionService, solutionSizeTracker)
 {
 }
Exemple #47
0
 public ArbitrageController(IOptionService optionService)
 {
     _optionService = optionService;
 }
 public EsentPersistentStorageService(IOptionService optionService, bool testing)
     : base(optionService, testing)
 {
 }
Exemple #49
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GetHtmlContentWidgetForEditCommand" /> class.
 /// </summary>
 /// <param name="categoryService">The category service.</param>
 /// <param name="contentService">The content service.</param>
 /// <param name="optionService">The option service.</param>
 /// <param name="cmsConfiguration">The CMS configuration.</param>
 /// <param name="languageService"></param>
 public GetHtmlContentWidgetForEditCommand(ICategoryService categoryService, IContentService contentService, IOptionService optionService, ICmsConfiguration cmsConfiguration, ILanguageService languageService)
 {
     this.categoryService  = categoryService;
     this.contentService   = contentService;
     this.optionService    = optionService;
     this.cmsConfiguration = cmsConfiguration;
     this.languageService  = languageService;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="GetPagePropertiesCommand" /> class.
 /// </summary>
 /// <param name="tagService">The tag service.</param>
 /// <param name="categoryService">The category service.</param>
 /// <param name="optionService">The option service.</param>
 /// <param name="cmsConfiguration">The CMS configuration.</param>
 /// <param name="layoutService">The layout service.</param>
 /// <param name="fileUrlResolver">The file URL resolver.</param>
 /// <param name="languageService">The language service.</param>
 /// <param name="pageService">The page service.</param>
 public GetPagePropertiesCommand(ITagService tagService, ICategoryService categoryService, IOptionService optionService,
                                 ICmsConfiguration cmsConfiguration, ILayoutService layoutService, IMediaFileUrlResolver fileUrlResolver,
                                 ILanguageService languageService, IPageService pageService)
 {
     this.tagService       = tagService;
     this.categoryService  = categoryService;
     this.languageService  = languageService;
     this.optionService    = optionService;
     this.cmsConfiguration = cmsConfiguration;
     this.layoutService    = layoutService;
     this.fileUrlResolver  = fileUrlResolver;
     this.pageService      = pageService;
 }
        public OptionController(IOptions <AppSettings> options, IOptionService optionService) : base(options)
        {
            DependencyHelper.ThrowIfNull(optionService);

            _optionService = optionService;
        }
Exemple #52
0
 private protected override AnalyzerConfigOptions CreateAnalyzerConfigOptions(IOptionService optionService, string?language)
 {
     Debug.Assert((language ?? _language) == _language, $"Use of a {nameof(DocumentOptionSet)} is not expected to differ from the language it was constructed with.");
     return(_backingOptionSet.AsAnalyzerConfigOptions(optionService, language ?? _language));
 }
Exemple #53
0
 public EtwLogger(IOptionService optionService)
     : this(Logger.GetLoggingChecker(optionService))
 {
 }
Exemple #54
0
 public PagesService(IRepository repository, IOptionService optionService)
 {
     this.repository    = repository;
     this.optionService = optionService;
 }
Exemple #55
0
 public AnalyzerConfigOptionsImpl(OptionSet optionSet, IOptionService optionService, string?language)
 {
     _optionSet     = optionSet;
     _optionService = optionService;
     _language      = language;
 }
 public DefaultContentService(ISecurityService securityService, IRepository repository, IOptionService optionService, IChildContentService childContentService)
 {
     this.securityService     = securityService;
     this.repository          = repository;
     this.optionService       = optionService;
     this.childContentService = childContentService;
 }
Exemple #57
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GetTemplatesCommand" /> class.
 /// </summary>
 /// <param name="optionService">The option service.</param>
 public GetTemplatesCommand(IOptionService optionService)
 {
     this.optionService = optionService;
 }
Exemple #58
0
 internal AutomationObject(IOptionService optionService)
 {
     _optionService = optionService;
 }
Exemple #59
0
 internal OptionSet(IOptionService service)
 {
     _service = service;
     _values  = ImmutableDictionary.Create <OptionKey, object>();
 }
Exemple #60
0
 private protected virtual AnalyzerConfigOptions CreateAnalyzerConfigOptions(IOptionService optionService, string?language)
 {
     return(new AnalyzerConfigOptionsImpl(this, optionService, language));
 }