public LoginWindowViewModel(ILiveService liveAuthService, IConfigurationService configurationService)
        {
            if (liveAuthService == null)
                throw new ArgumentNullException("liveAuthService");

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

            _liveAuthService = liveAuthService;
            _configurationService = configurationService;

            Loaded = new RelayCommand(() =>
            {
                var loginUrl = _liveAuthService.GetLoginUrl();
                this.CurrentPage = new Uri(loginUrl, UriKind.Absolute);
            });

            Navigated = new RelayCommand<NavigationEventArgs>((args) =>
            {
                if (args.Uri.AbsoluteUri.StartsWith("https://login.live.com/oauth20_desktop.srf"))
                {
                    var continueProcessing = false;
                    var parsedQueryParameters = HttpUtility.ParseQueryString(args.Uri.Query);
                    var authorizationCode = parsedQueryParameters["code"];

                    if (authorizationCode != null)
                    {
                        _liveAuthService.GetTokens(authorizationCode);
                        continueProcessing = true;
                    }

                    Messenger.Default.Send<CloseLoginWindow>(new CloseLoginWindow(continueProcessing));
                }
            });
        }
Exemplo n.º 2
0
        public RibbonViewModel(IRegexService regexService, ICommandManager commandManager, 
            INavigationService navigationService, IConfigurationService configurationService, IUIVisualizerService uiVisualizerService,
            IWorkspaceManager workspaceManager, IPleaseWaitService pleaseWaitService, IFilterService filterService)
        {
            Argument.IsNotNull(() => regexService);
            Argument.IsNotNull(() => commandManager);
            Argument.IsNotNull(() => navigationService);
            Argument.IsNotNull(() => configurationService);
            Argument.IsNotNull(() => uiVisualizerService);
            Argument.IsNotNull(() => workspaceManager);
            Argument.IsNotNull(() => pleaseWaitService);
            Argument.IsNotNull(() => filterService);

            _regexService = regexService;
            Filter = filterService.Filter;
            _navigationService = navigationService;
            _configurationService = configurationService;
            _uiVisualizerService = uiVisualizerService;
            _workspaceManager = workspaceManager;
            _pleaseWaitService = pleaseWaitService;
            _filterService = filterService;

            SaveWorkspace = new Command(OnSaveWorkspaceExecute, OnSaveWorkspaceCanExecute);
            CreateWorkspace = new Command(OnCreateWorkspaceExecute);

            ShowSettings = new Command(OnShowSettingsExecute);
            ShowKeyboardMappings = new Command(OnShowKeyboardMappingsExecute);

            Exit = new Command(OnExitExecute);

            commandManager.RegisterCommand(Commands.Settings.General, ShowSettings, this);
            commandManager.RegisterCommand(Commands.File.Exit, Exit, this);

            Title = AssemblyHelper.GetEntryAssembly().Title();
        }
Exemplo n.º 3
0
 public void Setup()
 {
     mr = new MockRepository();
     sc = new ServiceContainer();
     cfgSvc = mr.Stub<IConfigurationService>();
     sc.AddService<IConfigurationService>(cfgSvc);
 }
 public MasterMigratingTable(IConfigurationService<MTableConfiguration> configService,
     IChainTable2 oldTable, IChainTable2 newTable, IChainTableMonitor monitor,
     MTableOptionalBug? bugToEnable = null)
     : base(configService, oldTable, newTable, monitor, bugToEnable)
 {
     this.configService = configService;
 }
Exemplo n.º 5
0
        public AutoLinkerService(DTE2 visualStudio, IConfigurationService configurationService, IVisualStudioService visualStudioService)
        {
            Argument.IsNotNull("visualStudio", visualStudio);
            Argument.IsNotNull("configurationService", configurationService);
            Argument.IsNotNull("visualStudioService", visualStudioService);

            _visualStudio = visualStudio;
            _configurationService = configurationService;
            _visualStudioService = visualStudioService;

            var events = (Events2)_visualStudio.Events;

            _solutionEvents = events.SolutionEvents;
            _solutionEvents.Opened += OnSolutionOpened;
            _solutionEvents.AfterClosing += OnSolutionClosed;

            _solutionItemsEvents = events.MiscFilesEvents;
            _solutionItemsEvents.ItemAdded += OnSolutionItemAdded;
            _solutionItemsEvents.ItemRemoved += OnSolutionItemRemoved;
            _solutionItemsEvents.ItemRenamed += OnSolutionItemRenamed;

            _projectItemsEvents = events.ProjectItemsEvents;
            _projectItemsEvents.ItemAdded += OnSolutionItemAdded;
            _projectItemsEvents.ItemRemoved += OnSolutionItemRemoved;
            _projectItemsEvents.ItemRenamed += OnSolutionItemRenamed;
        }
        public ApplicationConfigurationViewModel(IConfigurationService configurationService)
        {
            _configurationService = configurationService;

            this.ApplicationHostsPathCommand = new RelayCommand(() =>
            {
                MessengerInstance.Send(new FolderDialogMessage((path) =>
                {
                    this.ApplicationConfiguration.ApplicationHostsConfigPath = path;
                }));
            });
            this.NgrokExecutablePathCommand = new RelayCommand(() =>
            {
                MessengerInstance.Send(new FolderDialogMessage((path) =>
                {
                    this.ApplicationConfiguration.NgrokExecutablePath = path;
                }));
            });
            this.SaveConfigurationCommand = new RelayCommand(
                () =>
                {
                    this._configurationService.Save();
                },
                () =>
                {
                    return this._configurationService.IsConfigurationValid;
                });
        }
Exemplo n.º 7
0
 public void Setup()
 {
     repository = new MockRepository();
     sc = new ServiceContainer();
     arch = new IntelArchitecture(ProcessorMode.Protected32);
     dcSvc = repository.StrictMock<IConfigurationService>();
 }
Exemplo n.º 8
0
 public IndexerManagerService(IContainer c, IConfigurationService config, Logger l, ICacheService cache)
 {
     container = c;
     configService = config;
     logger = l;
     cacheService = cache;
 }
Exemplo n.º 9
0
        public MainViewModel(IConfigurationService configService, INuiService nuiService, IKeyboardService keyboardService)
        {
            this.keyboardService = keyboardService;
            this.keyboardService.KeyUp += new EventHandler<KeyEventArgs>(keyboardService_KeyUp);
            this.configService = configService;
            this.nuiService = nuiService;
            this.nuiService.UserRaisedHand += new EventHandler<HandRaisedEventArgs>(nuiService_UserRaisedHand);
            this.nuiService.UserEnteredBounds += new EventHandler(nuiService_UserEnteredBounds);
            this.nuiService.UserExitedBounds += new EventHandler(nuiService_UserExitedBounds);
            this.ToggleCommand = new RelayCommand(this.ExecuteToggleCommand);
            this.AutoPlayCommand = new RelayCommand(this.ExecuteAutoPlayCommand);
            this.ToggleKinectVisionCommand = new RelayCommand(this.ExecuteToggleKinectVisionCommand);
            this.MainBackgroundBrush = (Brush)Application.Current.Resources["DefaultBackground"];
            this.EngineeringBackgroundBrush = new SolidColorBrush(Color.FromArgb(255, 0, 49, 83));

            this.videoTimer = new DispatcherTimer();
            this.videoTimer.Interval = TimeSpan.FromMilliseconds(50);
            this.videoTimer.Tick += new EventHandler(videoTimer_Tick);
            this.videoTimer.Start();

            if (!IsInDesignMode)
            {
                Application.Current.MainWindow.SizeChanged += new SizeChangedEventHandler(MainWindow_SizeChanged);
            }
        }
Exemplo n.º 10
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CruiseServer" /> class.	
        /// </summary>
        /// <param name="configurationService">The configuration service.</param>
        /// <param name="projectIntegratorListFactory">The project integrator list factory.</param>
        /// <param name="projectSerializer">The project serializer.</param>
        /// <param name="stateManager">The state manager.</param>
        /// <param name="fileSystem">The file system.</param>
        /// <param name="executionEnvironment">The execution environment.</param>
        /// <param name="extensionList">The extension list.</param>
        /// <remarks></remarks>
        public CruiseServer(IConfigurationService configurationService,
                            IProjectIntegratorListFactory projectIntegratorListFactory,
                            IProjectSerializer projectSerializer,
                            IProjectStateManager stateManager,
                            IFileSystem fileSystem,
                            IExecutionEnvironment executionEnvironment,
                            List<ExtensionConfiguration> extensionList)
        {
            this.configurationService = configurationService;
            this.projectSerializer = projectSerializer;
            this.fileSystem = fileSystem;
            this.executionEnvironment = executionEnvironment;

            // Leave the manager for backwards compatability - it is marked as obsolete
#pragma warning disable 0618
            manager = new CruiseManager(this);
#pragma warning restore 0618
            serverClient = new CruiseServerClient(this);
            InitializeServerThread();

            // Initialise the configuration
            configuration = configurationService.Load();

            // Initialise the queue manager
            integrationQueueManager = IntegrationQueueManagerFactory.CreateManager(projectIntegratorListFactory, configuration, stateManager);
            integrationQueueManager.AssociateIntegrationEvents(OnIntegrationStarted, OnIntegrationCompleted);
            securityManager = configuration.SecurityManager;

            // Load the extensions
            if (extensionList != null)
            {
                InitialiseExtensions(extensionList);
            }

            this.configurationService.AddConfigurationUpdateHandler(Restart);
            programmDataFolder = this.executionEnvironment.GetDefaultProgramDataFolder(ApplicationType.Server);

            // Initialise the cache time
            var cacheTimeInConfig = ConfigurationManager.AppSettings["cacheTime"];
            if (string.IsNullOrEmpty(cacheTimeInConfig))
            {
                // Set the default cache time to five minutes
                this.cacheTime = new TimeSpan(0, 5, 0);
                Log.Info("Log cache time set to 5 minutes");
            }
            else
            {
                this.cacheTime = TimeSpan.FromSeconds(Convert.ToDouble(cacheTimeInConfig, CultureInfo.CurrentCulture));
                if (this.cacheTime.TotalSeconds < 5)
                {
                    // If the cache time is less then 5s then turn off caching
                    this.cacheTime = TimeSpan.MinValue;
                    Log.Info("Log cache has been turned off");
                }
                else
                {
                    Log.Info("Log cache time set to " + this.cacheTime.TotalSeconds.ToString(CultureInfo.CurrentCulture) + " seconds");
                }
            }
        }
Exemplo n.º 11
0
 public void Setup()
 {
     mr = new MockRepository();
     dcSvc = mr.Stub<IConfigurationService>();
     sc = new ServiceContainer();
     sc.AddService(typeof(IConfigurationService), dcSvc);
 }
Exemplo n.º 12
0
        public void TestFixtureSetUp()
        {
            try
            {
                CodeSharp.Core.Configuration.ConfigWithEmbeddedXml(null
                    , "application_config"
                    , Assembly.GetExecutingAssembly()
                    , "Properties.Model.Test.ConfigFiles")
                    .RenderProperties()
                    .Castle(o => this.Resolve(o.Container));

                Lock.InitAll(DependencyResolver.Resolve<ILockHelper>());
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
            }

            this._log = DependencyResolver.Resolve<ILoggerFactory>().Create(this.GetType());
            this._sessionManager = DependencyResolver.Resolve<Castle.Facilities.NHibernateIntegration.ISessionManager>();
            this._accountService = DependencyResolver.Resolve<IAccountService>();
            this._appService = DependencyResolver.Resolve<IApplicationService>();
            this._configService = DependencyResolver.Resolve<IConfigurationService>();
            DependencyResolver.Resolve<ILockHelper>().Require<Account>();
        }
 public WidgetController(ILog logger, IConfigurationService configurationService, IPostService postService, ICategoryService categoryService, IPageService pageService)
     : base(logger, configurationService)
 {
     this.postService = postService;
     this.categoryService = categoryService;
     this.pageService = pageService;
 }
Exemplo n.º 14
0
 public UpdateService(Logger l, IWebClient c, IConfigurationService cfg, ITrayLockService ls)
 {
     logger = l;
     client = c;
     configService = cfg;
     lockService = ls;
 }
 public StationConnectionChecker(IStationFeedService stationFeedService,
     IConfigurationService configurationService)
 {
     ConfigurationService = configurationService;
     stationCollection = stationFeedService.CachedStations;
     stationCollection.CollectionChanged += StationCollection_OnCollectionChanged;
 }
Exemplo n.º 16
0
 public AutoDLProfileService(IConfigurationService c, ILogger<AutoDLProfileService> l, ILoggerFactory lf)
 {
     configSerivce = c;
     logger = l;
     logFactory = lf;
     Load();
 }
 public DirectoryConnectionConfig(IConfigurationService configService)
 {
     this.ServerName = configService.GetSetting<string>("adLds:serverName", string.Empty);
     this.Port = configService.GetSetting<string>("adLds:port", string.Empty);
     this.Prefix = configService.GetSetting<string>("adLds:prefix", string.Empty);
     this.Container = configService.GetSetting<string>("adLds:container", string.Empty);
 }
Exemplo n.º 18
0
 public BackupJob(IConfigurationService configurationService, ILogger logger)
 {
     if (configurationService == null) throw new ArgumentNullException(nameof(configurationService));
     if (logger == null) throw new ArgumentNullException(nameof(logger));
     _configurationService = configurationService;
     _logger = logger;
 }
Exemplo n.º 19
0
        private static void RegisterUserStore(IConfigurationService configService, ContainerBuilder builder)
        {
            UserStoreType userStoreType;
            Enum.TryParse(configService.GetSetting("IdentityServerUserStore", "None"), out userStoreType);
            builder.Register(ctx => userStoreType);

            switch (userStoreType)
            {
                case UserStoreType.AspNetIdentity:
                    RegisterAspNetIdentity(builder);
                    break;
                case UserStoreType.MembershipReboot:
                    RegisterMembershipReboot(builder);
                    break;
                case UserStoreType.AdLds:
                    RegisterAdLds(builder);
                    break;
                case UserStoreType.UsersApi:
                    RegisterApiServices(configService, builder);
                    break;
                default:
                    throw new InvalidOperationException("Invalid user store type specified");
            }

            if (userStoreType != UserStoreType.UsersApi)
            {
                builder.RegisterType<DomainUserService>().As<IUserService>();
                builder.RegisterType<DomainIdentityManagerService>().As<IIdentityManagerService>();
            }
        }
Exemplo n.º 20
0
        /// <summary>
        /// Initializes a new instance of the IntroductionViewModel class.
        /// </summary>
        public HomeViewModel(IConfigurationService configurationService)
        {
            _configurationService = configurationService;

            selectedFile = _configurationService.IsFileLoaded() ? "hi" : "";

            CreateNewFileCommand = new RelayCommand(() => {
                var saveFileDialog = new SaveFileDialog();
                saveFileDialog.AddExtension = true;
                saveFileDialog.DefaultExt = "pktd";
                saveFileDialog.Filter = "Parakeet File|*.pktd;*.pkd";
                saveFileDialog.FileOk += SaveFileDialog_FileOk;
                saveFileDialog.ShowDialog();
            }, () => string.IsNullOrEmpty(SelectedFile));

            OpenExistingFileCommand = new RelayCommand(() => {
                var openFileDialog = new OpenFileDialog();
                openFileDialog.AddExtension = true;
                openFileDialog.DefaultExt = "pktd";
                openFileDialog.Filter = "Parakeet File|*.pktd;*.pkd";
                openFileDialog.Multiselect = false;
                openFileDialog.FileOk += OpenFileDialog_FileOk;
                openFileDialog.ShowDialog();
            }, () => string.IsNullOrEmpty(SelectedFile));
        }
Exemplo n.º 21
0
		public HomeController(ILog logger, IConfigurationService configurationService, IUrlBuilder urlBuilder, ISetupService setupService, IRoutingService routingService)
			: base(logger, configurationService)
		{
			this.urlBuilder = urlBuilder;
			this.setupService = setupService;
			this.routingService = routingService;
		}
Exemplo n.º 22
0
 public PageController(ILog logger, IConfigurationService configurationService, IPageService pageService, IUrlBuilder urlBuilder, IRoutingService routingService)
     : base(logger, configurationService)
 {
     this.pageService = pageService;
     this.urlBuilder = urlBuilder;
     this.routingService = routingService;
 }
 public WorkerStatusAgent(WorkerNodeStatusDto nodeStatus, IConfigurationService configurationService, ISignalGenerator pingTimer, ILogger logger)
 {
     _nodeStatus = nodeStatus;
     _configurationService = configurationService;
     _pingTimer = pingTimer;
     _logger = logger;
 }
Exemplo n.º 24
0
        public ManifestService(IConfigurationService configurationService, IFileService fileService)
        {
            _configurationService = configurationService;
            _fileService = fileService;

            _manifestCollection = new Lazy<ManifestCollection>(LoadManifestCollection);
        }
 public FileWatcherConfigurationService(IConfigurationService decoratedService, IFileWatcher fileWatcher)
 {
     this.decoratedService = decoratedService;
     this.fileWatcher = fileWatcher;
     this.fileWatcher.OnFileChanged += new FileSystemEventHandler(HandleConfigurationFileChanged);
     decoratedService.AddConfigurationSubfileLoadedHandler( SubfileLoaded );
 }
Exemplo n.º 26
0
 public void Setup()
 {
     this.mr = new MockRepository();
     this.sc = new ServiceContainer();
     loader = mr.Stub<ILoader>();
     arch = mr.StrictMock<IProcessorArchitecture>();
     Address dummy;
     arch.Stub(a => a.TryParseAddress(null, out dummy)).IgnoreArguments().WhenCalled(m =>
     {
         Address addr;
         var sAddr = (string)m.Arguments[0];
         var iColon = sAddr.IndexOf(':');
         if (iColon > 0)
         {
             addr = Address.SegPtr(
                 Convert.ToUInt16(sAddr.Remove(iColon)),
                 Convert.ToUInt16(sAddr.Substring(iColon+1)));
             m.ReturnValue = true;
         }
         else
         {
             m.ReturnValue = Address32.TryParse32((string)m.Arguments[0], out addr);
         }
         m.Arguments[1] = addr;
     }).Return(false);
     this.cfgSvc = mr.Stub<IConfigurationService>();
     this.sc.AddService<IConfigurationService>(cfgSvc);
 }
Exemplo n.º 27
0
        public NewsController(IRssParserService rssParserService, INewsService newsService, IConfigurationService configurationService)
			: base(configurationService)
        {
            _rssParserService = rssParserService;
            _newsService = newsService;
            _useRssDataSource = configurationService.GetSetting(string.Empty, "NewsDataSource", "Dictionaries", "AppSettings", "General", "News").ToLower() == "rss";
        }
Exemplo n.º 28
0
        public SitesViewModel(ISiteDataService siteDataService, IConfigurationService configurationService)
        {
            _siteDataService = siteDataService;
            _configurationService = configurationService;

            _siteDataService.PropertyChanged += (s,e) => {
                if (e.PropertyName == "Sites")
                {
                    this.SiteFilter = String.Empty;
                    this.SelectedSite = this.Sites.FirstOrDefault();
                }
            };

            this.LoadNgrokInspector = new RelayCommand(() => {
                Process.Start("http://localhost:4040/");
            });

            this.RunNgrokCommand = new RelayCommand(() => {

                Process p = new Process();
                p.StartInfo = new ProcessStartInfo( "cmd.exe" ) 
                    {
                        Arguments = string.Format("/k \"{0}\" http -subdomain={1} {2}", Path.Combine(_configurationService.ApplicationConfiguration.NgrokExecutablePath, "ngrok.exe"), this.SelectedSite.Subdomain, this.SelectedSite.LocalhostPort),
                        UseShellExecute = true,
                        WindowStyle = ProcessWindowStyle.Normal
                    };
                p.Start();

            });

            this.SiteFilter = String.Empty;
        }
Exemplo n.º 29
0
 public PostController(ILog logger, IConfigurationService configurationService, IPostService postService, ICategoryService categoryService, IUrlBuilder urlBuilder)
     : base(logger, configurationService)
 {
     this.postService = postService;
     this.categoryService = categoryService;
     this.urlBuilder = urlBuilder;
 }
Exemplo n.º 30
0
        public WebAutomationViewModel(IManifestService manifestService, ITestCollectionService testCollectionService, IConfigurationService configurationService)
        {
            _manifestService = manifestService;
            _testCollectionService = testCollectionService;
            _configurationService = configurationService;

            Header = "Web Automation";

            ResultsViewModel = App.ServiceLocator.GetInstance<ResultsViewModel>();

            Manifests = new ObservableCollection<ManifestViewModel>();
            TransitionArea = ResultsViewModel;

            LoadInformation();

            EditCategoriesCommand = new RelayCommand(EditTestCollections, t => EditTestCollectionViewModel == null);

            LoadManifestCommand = new RelayCommand(parameter =>
                {
                    var dialog = new OpenFileDialog
                        {
                            Filter = "Manifest File|.manifests.json",
                        };

                    var result = dialog.ShowDialog();
                    if (result == true)
                    {
                        _configurationService.TestScriptsPath = Path.GetDirectoryName(dialog.FileName);
                        _manifestService.ReloadManifest();
                        LoadInformation();
                    }
                });
        }
Exemplo n.º 31
0
        public static void ProcessConsoleOverrides(ConsoleOptions consoleOptions, IProcessService processService, ServerConfig serverConfig, IConfigurationService configurationService, Logger logger)
        {
            IServerService serverService = new ServerService(null, processService, null, null, logger, null, null, null, serverConfig);

            // Override port
            if (consoleOptions.Port != 0)
            {
                Int32.TryParse(serverConfig.Port.ToString(), out Int32 configPort);

                if (configPort != consoleOptions.Port)
                {
                    logger.Info("Overriding port to " + consoleOptions.Port);
                    serverConfig.Port = consoleOptions.Port;

                    if (EnvironmentUtil.IsWindows)
                    {
                        if (ServerUtil.IsUserAdministrator())
                        {
                            serverService.ReserveUrls(true);
                        }
                        else
                        {
                            logger.Error("Unable to switch ports when not running as administrator");
                            Environment.Exit(1);
                        }
                    }
                    configurationService.SaveConfig(serverConfig);
                }
            }

            // Override listen public
            if (consoleOptions.ListenPublic || consoleOptions.ListenPrivate)
            {
                if (serverConfig.AllowExternal != consoleOptions.ListenPublic)
                {
                    logger.Info("Overriding external access to " + consoleOptions.ListenPublic);
                    serverConfig.AllowExternal = consoleOptions.ListenPublic;
                    if (EnvironmentUtil.IsWindows)
                    {
                        if (ServerUtil.IsUserAdministrator())
                        {
                            serverService.ReserveUrls(true);
                        }
                        else
                        {
                            logger.Error("Unable to switch to public listening without admin rights.");
                            Environment.Exit(1);
                        }
                    }
                    configurationService.SaveConfig(serverConfig);
                }
            }
        }
Exemplo n.º 32
0
 // Use this ctor from unit tests that can mock IConfigurationService
 public Function(IConfigurationService configService)
 {
     ConfigService = configService;
 }
Exemplo n.º 33
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BogusDatabaseMock"/> class.
 /// </summary>
 /// <param name="configurationService">
 /// The configuration service.
 /// </param>
 /// <param name="fileService">
 /// The file service to use for file operations.
 /// </param>
 /// <param name="tokenReplacer">The token replacer to use.</param>
 public BogusDatabaseMock(IConfigurationService configurationService, IFileService fileService, ITokenReplacer tokenReplacer)
     : base(configurationService, fileService, tokenReplacer)
 {
     this.ScriptsRun      = new List <string>();
     this.ScriptsRunNames = new List <string>();
 }
Exemplo n.º 34
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AssetsThumbnailService"/> class.
 /// </summary>
 /// <param name="configurationService">The configuration service being used to retrieve the default image.</param>
 public AssetsThumbnailService(IConfigurationService configurationService)
 {
     this.defaultImage = configurationService.GetParameterValue("DefaultThumbnailImageUri");
 }
Exemplo n.º 35
0
 public OrderHistoryController(IInfrastructureLogService infrastructureLogService, IConfigurationService configurationService)
 {
     _infrastructureLogService = infrastructureLogService;
     _configurationService     = configurationService;
     _releaseName = _configurationService.ConfigurationSettings.ReleaseName;
 }
Exemplo n.º 36
0
 public UserStore(IUserFactory userFactory, IConfigurationService config)
 {
     this._users = userFactory.GetUsers(config);
 }
Exemplo n.º 37
0
 public SmsService(ISqlService sqlService, IConfigurationService configurationService)
 {
     smsProvider     = new Lox24Provider(configurationService);
     this.sqlService = sqlService;
 }
Exemplo n.º 38
0
 public PostgresqlMediaStore(IConfigurationService configService)
 {
     _configService = configService;
 }
Exemplo n.º 39
0
 public IndexerManagerService(IIndexerConfigurationService config, IProtectionService protectionService, WebClient webClient, Logger l, ICacheService cache, IProcessService processService, IConfigurationService globalConfigService, ServerConfig serverConfig)
 {
     configService            = config;
     this.protectionService   = protectionService;
     this.webClient           = webClient;
     this.processService      = processService;
     this.globalConfigService = globalConfigService;
     this.serverConfig        = serverConfig;
     logger       = l;
     cacheService = cache;
 }
 public FileWatcherConfigurationService(IConfigurationService decoratedService, IFileWatcher fileWatcher)
 {
     this.decoratedService           = decoratedService;
     this.fileWatcher                = fileWatcher;
     this.fileWatcher.OnFileChanged += new FileSystemEventHandler(HandleConfigurationFileChanged);
 }
Exemplo n.º 41
0
 public BackdoorService()
 {
     this.configurationService = DependencyService.Get <IConfigurationService>();
     this.navigationService    = DependencyService.Get <INavigationService>();
 }
Exemplo n.º 42
0
 public LuisService(IConfigurationService configurationService)
 {
     _configurationService = configurationService;
 }
Exemplo n.º 43
0
 public EnvironmentsController(IConfigurationService configuration) : base(configuration)
 {
 }
Exemplo n.º 44
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BaseCsvTemplateExportStrategy"/> class.
 /// </summary>
 /// <param name="logger">The logger.</param>
 /// <param name="dataProvider">The data provider.</param>
 /// <param name="configurationService">The configuration service.</param>
 protected BaseCsvTemplateExportStrategy(ILogWriter logger, IDomainSessionFactoryProvider dataProvider, IConfigurationService configurationService)
 {
     Logger               = logger;
     DataProvider         = dataProvider;
     ConfigurationService = configurationService;
 }
Exemplo n.º 45
0
 /// <summary>
 /// CreditCardView Model.
 /// </summary>
 /// <param name="dataServices">DataServices</param>
 /// <param name="region"> RegionManager to support further navigation</param>
 /// <param name="manager">Event Manager for the communiction between view modules.</param>
 public CreditCardViewModel(IDataServices dataServices, IRegionManager region, IEventManager manager, IDialogService dialogService, IConfigurationService config) : base(String.Empty, dataServices, region, manager, dialogService, config)
 {
     GridIdentifier = KarveCommon.Generic.GridIdentifiers.HelperCreditCard;
 }
 public HungarianNotationInspection(IDeclarationFinderProvider declarationFinderProvider, IConfigurationService <CodeInspectionSettings> settings)
     : base(declarationFinderProvider, TargetDeclarationTypes, IgnoredProcedureTypes)
 {
     _settings = settings;
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="LibraryViewPresentationModel"/> class.
        /// </summary>
        /// <param name="view">The <see cref="ILibraryView"/>.</param>
        /// <param name="eventAggregator">The event aggregator.</param>
        /// <param name="regionManager">The region manager.</param>
        /// <param name="configurationService">The configuration service.</param>
        /// <param name="errorViewResolver">The error view resolver.</param>
        public LibraryViewPresentationModel(ILibraryView view, IEventAggregator eventAggregator, IRegionManager regionManager, IConfigurationService configurationService, Func <IErrorView> errorViewResolver)
        {
            this.eventAggregator      = eventAggregator;
            this.View                 = view;
            this.regionManager        = regionManager;
            this.configurationService = configurationService;
            this.errorViewResolver    = errorViewResolver;

            this.addItemCommand           = new DelegateCommand <object>(this.AddToMediaBin);
            this.parentFolderCommand      = new DelegateCommand <string>(this.ShowParentFolders, this.CanShowParentFolder);
            this.helpViewCommand          = new DelegateCommand <string>(this.ShowHelpView);
            this.playSelectedAssetCommand = new DelegateCommand <object>(this.PlaySelectedAsset);
            this.KeyboardActionCommand    = new DelegateCommand <Tuple <KeyboardAction, object> >(this.ExecuteKeyboardAction);

            this.assets        = new List <Asset>();
            this.currentAssets = new List <Asset>();

            // Todo: Get this value from the config file.
            this.Scale      = 0.2;
            this.ShowImages = true;
            this.ShowVideos = true;
            this.ShowAudio  = true;

            this.PropertyChanged += this.LibraryViewPresentationModel_PropertyChanged;

            this.eventAggregator.GetEvent <AssetsLoadingEvent>().Subscribe(this.OnAssetsLoading, true);
            this.eventAggregator.GetEvent <AssetsAvailableEvent>().Subscribe(this.OnAssetsAvailable, true);
            this.eventAggregator.GetEvent <ResetWindowsEvent>().Subscribe(this.ResetWindow);

            // Add metadata fields.
            this.View.AddMetadataFields(this.configurationService.GetMetadataFields());
            this.View.Model = this;

            this.SearchIntegrationEnabled = this.configurationService.GetParameterValueAsBoolean("SearchIntegrationEnabled").GetValueOrDefault();

            if (!this.SearchIntegrationEnabled)
            {
                this.View.ShowProgressBar();
            }
        }
 public OrderService(IConfigurationService configurationService)
 {
     _connectionString = configurationService.GetConnectionString("Northwind");
 }
Exemplo n.º 49
0
 public GraphQLService(ILoggingService loggingService, IConfigurationService configurationService)
 {
     _loggingService       = loggingService;
     _configurationService = configurationService;
 }
Exemplo n.º 50
0
        private void CreateServices(IServiceFactory svcFactory, IServiceContainer sc)
        {
            sc.AddService <DecompilerHost>(this);

            config = svcFactory.CreateDecompilerConfiguration();
            sc.AddService(typeof(IConfigurationService), config);

            var cmdFactory = new Commands.CommandFactory(sc);

            sc.AddService <ICommandFactory>(cmdFactory);

            var sbSvc = svcFactory.CreateStatusBarService();

            sc.AddService <IStatusBarService>(sbSvc);

            diagnosticsSvc = svcFactory.CreateDiagnosticsService();
            sc.AddService(typeof(IDiagnosticsService), diagnosticsSvc);

            decompilerSvc = svcFactory.CreateDecompilerService();
            sc.AddService(typeof(IDecompilerService), decompilerSvc);

            sc.AddService(typeof(IDecompilerUIService), uiSvc);

            var codeViewSvc = svcFactory.CreateCodeViewerService();

            sc.AddService <ICodeViewerService>(codeViewSvc);

            var segmentViewSvc = svcFactory.CreateImageSegmentService();

            sc.AddService(typeof(ImageSegmentService), segmentViewSvc);

            var del = svcFactory.CreateDecompilerEventListener();

            workerDlgSvc = (IWorkerDialogService)del;
            sc.AddService(typeof(IWorkerDialogService), workerDlgSvc);
            sc.AddService(typeof(DecompilerEventListener), del);

            loader = svcFactory.CreateLoader();
            sc.AddService <ILoader>(loader);

            var abSvc = svcFactory.CreateArchiveBrowserService();

            sc.AddService <IArchiveBrowserService>(abSvc);

            sc.AddService <ILowLevelViewService>(svcFactory.CreateMemoryViewService());
            sc.AddService <IDisassemblyViewService>(svcFactory.CreateDisassemblyViewService());

            var tlSvc = svcFactory.CreateTypeLibraryLoaderService();

            sc.AddService <ITypeLibraryLoaderService>(tlSvc);

            this.projectBrowserSvc = svcFactory.CreateProjectBrowserService();
            sc.AddService <IProjectBrowserService>(projectBrowserSvc);

            var upSvc = svcFactory.CreateUiPreferencesService();

            sc.AddService <IUiPreferencesService>(upSvc);

            var fsSvc = svcFactory.CreateFileSystemService();

            sc.AddService <IFileSystemService>(fsSvc);

            srSvc = svcFactory.CreateSearchResultService();
            sc.AddService <ISearchResultService>(srSvc);

            this.searchResultsTabControl = svcFactory.CreateTabControlHost();
            sc.AddService <ITabControlHostService>(this.searchResultsTabControl);

            var resEditService = svcFactory.CreateResourceEditorService();

            sc.AddService <IResourceEditorService>(resEditService);

            var cgvSvc = svcFactory.CreateCallGraphViewService();

            sc.AddService <ICallGraphViewService>(cgvSvc);

            var viewImpSvc = svcFactory.CreateViewImportService();

            sc.AddService <IViewImportsService>(viewImpSvc);

            var symLdrSvc = svcFactory.CreateSymbolLoadingService();

            sc.AddService <ISymbolLoadingService>(symLdrSvc);

            var selSvc = svcFactory.CreateSelectionService();

            sc.AddService <ISelectionService>(selSvc);
        }
 public TraineeshipApplicationUpdater(IConfigurationService configurationService, ILogService logService) : base("traineeships", configurationService, logService)
 {
 }
 public GasCloudCollisionHandler(IWorldStateService worldStateService, IConfigurationService engineConfigOptions)
 {
     this.worldStateService = worldStateService;
     engineConfig           = engineConfigOptions.Value;
 }
Exemplo n.º 53
0
 /// <summary>
 ///     Initiate controller with dependency injections.
 /// </summary>
 /// <param name="stockTakingPreProductDomain"></param>
 /// <param name="identityDomain"></param>
 public StockTakingPreProductController(IStockTakingPreProductDomain stockTakingPreProductDomain,
                                        IIdentityService identityDomain, IRetrievalOfPreProductDomain retrievalOfPreProductDomain, ICommonDomain commonDomain, IConfigurationService configurationService)
 {
     _stockTakingPreProductDomain = stockTakingPreProductDomain;
     _identityDomain = identityDomain;
     _retrievalOfPreProductDomain = retrievalOfPreProductDomain;
     _configurationService        = configurationService;
     _commonDomain = commonDomain;
 }
Exemplo n.º 54
0
        public ScreenOptions()
        {
            InitializeComponent();

            this.configurationService = Win32ServiceManager.SharedManager.ConfigurationService;
            this.xcapService          = Win32ServiceManager.SharedManager.XcapService;
            this.sipService           = Win32ServiceManager.SharedManager.SipService;

            this.xcapService.onXcapEvent += this.xcapService_onXcapEvent;

            //
            //  Contacts
            //
            this.radioButtonContactsRemote.Checked   += (sender, e) => this.groupBoxXCAP.IsEnabled = true;
            this.radioButtonContactsRemote.Unchecked += (sender, e) => this.groupBoxXCAP.IsEnabled = false;

            //
            //  Messaging
            //
            this.radioButtonMessagingSMSBinary.Checked   += (sender, e) => this.textBoxMessagingPSI.IsEnabled = true;
            this.radioButtonMessagingSMSBinary.Unchecked += (sender, e) => this.textBoxMessagingPSI.IsEnabled = false;


            //
            //  Presence
            //
            this.checkBoxPresenceSubscribe.Checked += (sender, e) =>
            {
                this.checkBoxPresenceRLS.IsEnabled = true;
            };
            this.checkBoxPresenceSubscribe.Unchecked += (sender, e) =>
            {
                this.checkBoxPresenceRLS.IsEnabled = false;
            };

            this.checkBoxPresencePublish.Checked += (sender, e) =>
            {
                this.textBoxPresenceFreeText.IsEnabled         = true;
                this.textBoxPresenceHomePage.IsEnabled         = true;
                this.textBoxHyperAvailabilityTimeout.IsEnabled = true;
                this.borderAvatar.IsEnabled = true;
            };
            this.checkBoxPresencePublish.Unchecked += (sender, e) =>
            {
                this.textBoxPresenceFreeText.IsEnabled         = false;
                this.textBoxPresenceHomePage.IsEnabled         = false;
                this.textBoxHyperAvailabilityTimeout.IsEnabled = false;
                this.borderAvatar.IsEnabled = false;
            };

            this.textBoxPresenceFreeText.TextChanged += (sender, e) => this.presenceChanged = true;
            this.textBoxPresenceHomePage.TextChanged += (sender, e) => this.presenceChanged = true;

            //
            //  NATT
            //
            this.checkBoxStunTurnEnable.Checked += (sender, e) =>
            {
                this.radioButtonStunDiscover.IsEnabled  = true;
                this.radioButtonStunUseThis.IsEnabled   = true;
                this.textBoxStunServerAddress.IsEnabled = true & this.radioButtonStunUseThis.IsChecked.Value;
                this.textBoxStunPort.IsEnabled          = true & this.radioButtonStunUseThis.IsChecked.Value;
            };
            this.checkBoxStunTurnEnable.Unchecked += (sender, e) =>
            {
                this.radioButtonStunDiscover.IsEnabled  = false;
                this.radioButtonStunUseThis.IsEnabled   = false;
                this.textBoxStunServerAddress.IsEnabled = false;
                this.textBoxStunPort.IsEnabled          = false;
            };
            this.radioButtonStunUseThis.Checked += (sender, e) =>
            {
                this.textBoxStunServerAddress.IsEnabled = true & this.checkBoxStunTurnEnable.IsChecked.Value;
                this.textBoxStunPort.IsEnabled          = true & this.checkBoxStunTurnEnable.IsChecked.Value;
            };
            this.radioButtonStunUseThis.Unchecked += (sender, e) =>
            {
                this.textBoxStunServerAddress.IsEnabled = false;
                this.textBoxStunPort.IsEnabled          = false;
            };


            //
            //  Security
            //
            this.checkBoxIPSecSecAgreeEnabled.Unchecked += (sender, e) =>
            {
                this.comboBoxIPSecAlgorithm.IsEnabled  = false;
                this.comboBoxIPSecEAlgorithm.IsEnabled = false;
                this.comboBoxIPSecMode.IsEnabled       = false;
                this.comboBoxIPSecProtocol.IsEnabled   = false;
            };
            this.checkBoxIPSecSecAgreeEnabled.Checked += (sender, e) =>
            {
                this.comboBoxIPSecAlgorithm.IsEnabled  = true;
                this.comboBoxIPSecEAlgorithm.IsEnabled = true;
                this.comboBoxIPSecMode.IsEnabled       = true;
                this.comboBoxIPSecProtocol.IsEnabled   = true;
            };

            //
            //  QoS
            //
            this.checkBoxSessionTimersEnable.Checked += (sender, e) =>
            {
                this.comboBoxSessionTimerRefreser.IsEnabled = true;
                this.textBoxSessionTimersTimeout.IsEnabled  = true;
            };
            this.checkBoxSessionTimersEnable.Unchecked += (sender, e) =>
            {
                this.comboBoxSessionTimerRefreser.IsEnabled = false;
                this.textBoxSessionTimersTimeout.IsEnabled  = false;
            };

            this.Initializeidentity();
            this.InitializeCodecs();
            this.InitializeQoS();

            this.LoadConfiguration();
        }
Exemplo n.º 55
0
 public void Init(IConfigurationService configService)
 {
     _configService = configService;
 }
 public SyncService(IConfigurationService configService, ILogger logger)
 {
     ConfigService = configService;
     Logger        = logger;
 }
Exemplo n.º 57
0
 public SavedSearchAlertRepository(IConfigurationService configurationService, IMapper mapper, ILogService logger)
     : base(configurationService, "savedsearchalerts")
 {
     _mapper = mapper;
     _logger = logger;
 }
 public AdminConfigurationController(IUserService userService, IStringLocalizer <AdminConfigurationController> localizer, ILogger <AdminConfigurationController> logger, IConfigurationService configurationService)
     : base("~/Views/AdminConfiguration.cshtml", userService)
 {
     _userService          = userService ?? throw new ArgumentNullException(nameof(userService));
     _localizer            = localizer ?? throw new ArgumentNullException(nameof(localizer));
     _logger               = logger ?? throw new ArgumentNullException(nameof(logger));
     _configurationService = configurationService ?? throw new ArgumentNullException(nameof(configurationService));
 }
Exemplo n.º 59
0
 public CompaniesHouseApiClient(HttpClient client, ILogger <CompaniesHouseApiClient> logger, IConfigurationService configurationService)
 {
     _client = client;
     _logger = logger;
     _config = configurationService.GetConfig().Result;
 }
Exemplo n.º 60
0
 public void SetUp()
 {
     _configurationService = Mock.Create <IConfigurationService>();
 }