public TestableV1Feed(
     IEntityRepository<Package> repo,
     ConfigurationService configuration,
     ISearchService searchService)
     : base(repo, configuration, searchService)
 {
 }
 protected ConfigurableRemoteServiceBase( 
     Configuration configuration, 
     ConfigurationService configurationService)
     : base(configuration)
 {
     ConfigurationService = configurationService;
 }
Exemple #3
0
        public LdapService(ConfigurationService configuration)
        {
            var ldapConfig = new LdapAuthenticatorConfiguration();
            configuration.ResolveConfigObject(ldapConfig, "Auth.LdapUser.");

            this.Configuration = ldapConfig;
        }
        public void TestLoadHidden()
        {
            var configurationService = new ConfigurationService();

            configurationService.LoadConfiguration("/test.password.$hidden", "MTMzN2wzM3Q="); // base64("1337l33t")
            Assert.AreEqual("1337l33t", configurationService.Configuration.Get("test.password"));
        }
 public ApiController(
     IEntitiesContext entitiesContext,
     IPackageService packageService,
     IPackageFileService packageFileService,
     IUserService userService,
     INuGetExeDownloaderService nugetExeDownloaderService,
     IContentService contentService,
     IIndexingService indexingService,
     ISearchService searchService,
     IAutomaticallyCuratePackageCommand autoCuratePackage,
     IStatusService statusService,
     IMessageService messageService,
     AuditingService auditingService,
     ConfigurationService configurationService)
 {
     EntitiesContext = entitiesContext;
     PackageService = packageService;
     PackageFileService = packageFileService;
     UserService = userService;
     NugetExeDownloaderService = nugetExeDownloaderService;
     ContentService = contentService;
     StatisticsService = null;
     IndexingService = indexingService;
     SearchService = searchService;
     AutoCuratePackage = autoCuratePackage;
     StatusService = statusService;
     MessageService = messageService;
     AuditingService = auditingService;
     ConfigurationService = configurationService;
 }
        private void OnLoad(object sender, RoutedEventArgs e)
        {
            if (GraphicsDeviceManager.Current.RenderMode != RenderMode.Hardware)
            {
                MessageBox.Show("Please activate enableGPUAcceleration=true on your Silverlight plugin page.", "Warning", MessageBoxButton.OK);
                return;
            }

            IConfigurationService configurationService = new ConfigurationService();

            Tracer.TraceLevel = configurationService.GetValue<TraceLevels>(ConfigSections.Debug, ConfigKeys.DebugLogLevel);
            Tracer.Info("Checking for updates...");

            //Application.Current.CheckAndDownloadUpdateCompleted += Current_CheckAndDownloadUpdateCompleted;
            //Application.Current.CheckAndDownloadUpdateAsync();

            _game = new Engine(DrawingSurface);

            IInputService inputService = new InputService(_game);

            _game.Services.AddService(typeof(IConfigurationService), configurationService);
            _game.Services.AddService(typeof(IInputService), inputService);

            _game.Run();
        }
Exemple #7
0
        protected void Application_Start()
        {
            var configurationService = new ConfigurationService(ConfigurationManager.ConnectionStrings["DefaultConnection"].ConnectionString);
            ObjectFactory.Initialize(registry =>
                                         {
                                             registry.For<IConfigurationService>().Use(configurationService);
                                             registry.Scan(x =>
                                                               {

                                                                   x.AssembliesFromApplicationBaseDirectory();
                                                                   x.WithDefaultConventions();
                                                               });
                                         });

            ObjectFactory.Container.Inject(typeof(IHttpControllerActivator), new StructureMapHttpControllerActivator(ObjectFactory.Container));
            GlobalConfiguration.Configuration.DependencyResolver = new IoCContainer(ObjectFactory.Container);
            GlobalConfiguration.Configuration.Formatters.JsonFormatter.SerializerSettings = new JsonSerializerSettings
                                                                                                {
                                                                                                    ContractResolver =
                                                                                                        new LowercaseContractResolver
                                                                                                        ()
                                                                                                };
            AreaRegistration.RegisterAllAreas();

            WebApiConfig.Register(GlobalConfiguration.Configuration);
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);
        }
        public void Test()
        {
            string filename = "companyData.json";
              List<Company> expected;
              List<Company> actual;

              try
              {
            var file = "../../../Stocks.Service/companyData.json";
            var configurationService = new ConfigurationService(file);
            expected = configurationService.GetCompanies();

            var worker = new FileSerializer();
            worker.SerializeJson(filename, expected);

            actual = worker.DeserializeJson<Company>(filename);
              }
              finally
              {
            if (File.Exists(filename))
              File.Delete(filename);
              }

              Assert.Equal(expected.Count, actual.Count);

              for (int i = 0; i < actual.Count; i++)
              {
            Assert.Equal(expected[i].Symbol, actual[i].Symbol);
            Assert.Equal(expected[i].Name, actual[i].Name);
              }
        }
 protected SecuredRemoteServiceBase(
     Configuration configuration,
     ConfigurationService configurationService,
     AuthenticationService authenticationService)
     : base(configuration, configurationService)
 {
     AuthenticationService = authenticationService;
 }
 public HomeController(Func<IWeeeClient> apiClient, IWeeeCache cache, BreadcrumbService breadcrumb, CsvWriterFactory csvWriterFactory, ConfigurationService configService)
 {
     this.apiClient = apiClient;
     this.cache = cache;
     this.breadcrumb = breadcrumb;
     this.csvWriterFactory = csvWriterFactory;
     this.configurationService = configService;
 }
Exemple #11
0
        public void Startup(ConfigurationService config, IAppBuilder app)
        {
            Configure(config);

            if (BaseConfig.Enabled)
            {
                AttachToOwinApp(config, app);
            }
        }
        public void GetSectionTest()
        {
            var cs = new ConfigurationService();
            var api = cs.GetSection("Url:api");
            var breeze = cs.GetSection("Url:api_breeze");

            api.ShouldBe("https://localhost:44332/");
            breeze.ShouldBe("/breeze/");
        }
 public static CodeFlowService Create(ConfigurationService configurationService, EventAggregator eventAggregator)
 {
     var authorWatch = configurationService["AuthorWatch"];
     var secondAuthorWatch = configurationService["SecondAuthorWatch"];
     var refreshInterval = int.Parse(configurationService["RefreshInterval"]);
     var announceInterval = int.Parse(configurationService["AnnounceInterval"]);
     var publishEventMessenger = eventAggregator.GetEvent<RawPublishEvent>();
     var traceEventMessenger = eventAggregator.GetEvent<TraceEvent>();
     return new CodeFlowService(authorWatch, secondAuthorWatch, refreshInterval, announceInterval, publishEventMessenger, traceEventMessenger);
 }
        static Configuration()
        {
            var configurationService = new ConfigurationService();

            StoragePrimary = configurationService.Get("Storage.Primary");
            StorageContainerCatalog = configurationService.Get("Storage.Container.Catalog") ?? DefaultStorageContainerCatalog;
            StorageContainerArtifacts = configurationService.Get("Storage.Container.Artifacts") ?? DefaultStorageContainerPackages;
            StorageContainerOwnership = configurationService.Get("Storage.Container.Ownership") ?? DefaultStorageContainerOwnership;
            CatalogBaseAddress = configurationService.Get("Catalog.BaseAddress");
        }
 public ODataV1FeedController(
     IEntityRepository<Package> packagesRepository,
     ConfigurationService configurationService,
     ISearchService searchService)
     : base(configurationService)
 {
     _packagesRepository = packagesRepository;
     _configurationService = configurationService;
     _searchService = searchService;
 }
 public static TfsClientService Create(ConfigurationService configurationService, EventAggregator eventAggregator)
 {
     var projectCollectionUrl = configurationService["ProjectCollectionUrl"];
     var projectName = configurationService["ProjectName"];
     var serverCountQueries = configurationService.Where(p => p.Key.StartsWith("query", StringComparison.OrdinalIgnoreCase)).Select(p => p.Value);
     var refreshInterval = int.Parse(configurationService["RefreshInterval"]);
     var nextInterval = int.Parse(configurationService["NextInterval"]);
     var publishEventMessenger = eventAggregator.GetEvent<RawPublishEvent>();
     var traceEventMessenger = eventAggregator.GetEvent<TraceEvent>();
     return new TfsClientService(projectCollectionUrl, projectName, serverCountQueries, refreshInterval, nextInterval, publishEventMessenger, traceEventMessenger);
 }
        public static IContainer Initialize()
        {
            var configuration = new ConfigurationService();

            var builder = new ContainerBuilder();
            builder.Register(c => configuration).As<ConfigurationService>().SingleInstance();
            builder.Register(c => configuration.CurrentConfiguration).As<IAppConfiguration>().SingleInstance();
            builder.Register(c => HttpContext.Current.GetOwinContext().Authentication).InstancePerRequest();

            return AutofacBootstrapper.Initialize(new ContainerBuilder());
        }
 public ODataV2CuratedFeedController(
     IEntitiesContext entities,
     ConfigurationService configurationService,
     ISearchService searchService,
     ICuratedFeedService curatedFeedService)
     : base(configurationService)
 {
     _entities = entities;
     _configurationService = configurationService;
     _searchService = searchService;
     _curatedFeedService = curatedFeedService;
 }
        protected override void AttachToOwinApp(ConfigurationService config, IAppBuilder app)
        {
            var cookieSecurity = config.Current.RequireSSL ? 
                CookieSecureOption.Always : 
                CookieSecureOption.Never;

            var options = new CookieAuthenticationOptions()
            {
                AuthenticationType = AuthenticationTypes.LocalUser,
                AuthenticationMode = AuthenticationMode.Active,
                CookieHttpOnly = true,
                CookieSecure = cookieSecurity,
                LoginPath = new PathString("/users/account/LogOn")
            };
            
            BaseConfig.ApplyToOwinSecurityOptions(options);
            app.UseCookieAuthentication(options);
            app.SetDefaultSignInAsAuthenticationType(AuthenticationTypes.LocalUser);
        }
Exemple #20
0
        public void startServer()
        {
            settingsService = new ConfigurationService();
            serverConfig = settingsService.getConfig();
            //TODO disable deactivated modules

            systemInfoService = new SystemInfoService();
            teamspeakInfoService = new TeamSpeakInfoService();

            var fileSystem = new PhysicalFileSystem(".");
            var options = new FileServerOptions
            {
                EnableDirectoryBrowsing = true,
                FileSystem = fileSystem
            };

            var container = new UnityContainer();
            container.RegisterType<ISystemInfoService, SystemInfoService>(new HierarchicalLifetimeManager());
            container.RegisterType<ITeamSpeakInfoService, TeamSpeakInfoService>(new HierarchicalLifetimeManager());
            container.RegisterType<IConfigurationService, ConfigurationService>(new HierarchicalLifetimeManager());

            container.RegisterInstance<SystemInfoService>(systemInfoService);
            container.RegisterInstance<TeamSpeakInfoService>(teamspeakInfoService);
            container.RegisterInstance<ConfigurationService>(settingsService);

            HttpConfiguration config = new HttpConfiguration();
            config.DependencyResolver = new UnityResolver(container);
            config.Routes.MapHttpRoute(
                name: "DefaultApi",
                routeTemplate: "api/{controller}/{id}",
                defaults: new { id = RouteParameter.Optional }
            );

            StartOptions urls = new StartOptions();

            urls.Urls.Add("http://*:13337");

            WebApp.Start(urls, builder => builder.UseFileServer(options).UseWebApi(config));
        }
        protected override void Load(ContainerBuilder builder)
        {
            var configuration = new ConfigurationService();
            builder.RegisterInstance(configuration)
                   .AsSelf();
            builder.Register(c => configuration.Current)
                   .AsSelf()
                   .As<IAppConfiguration>();

            builder.RegisterType<FileSystemService>()
                .AsSelf()
                .As<IFileSystemService>()
                .SingleInstance();

            switch (configuration.Current.StorageType)
            {
                case StorageType.FileSystem:
                case StorageType.NotSpecified:
                    ConfigureForLocalFileSystem(builder);
                    break;
                case StorageType.AzureStorage:
                    ConfigureForAzureStorage(builder, configuration);
                    break;
            }

            builder.RegisterType<DiagnosticsService>()
                .AsSelf()
                .As<IDiagnosticsService>()
                .SingleInstance();

            builder.RegisterType<ContentService>()
                .AsSelf()
                .As<IContentService>()
                .SingleInstance();

            base.Load(builder);
        }
        private void ConfigureForAzureStorage(ConfigurationService configuration)
        {
            Bind<ICloudBlobClient>()
                .ToMethod(_ => new CloudBlobClientWrapper(configuration.Current.AzureStorageConnectionString, configuration.Current.AzureStorageReadAccessGeoRedundant))
                .InSingletonScope();
            Bind<IFileStorageService>()
                .To<CloudBlobFileStorageService>()
                .InSingletonScope();

            // when running on Windows Azure, we use a back-end job to calculate stats totals and store in the blobs
            Bind<IAggregateStatsService>()
                .ToMethod(_ => new JsonAggregateStatsService(configuration.Current.AzureStorageConnectionString, configuration.Current.AzureStorageReadAccessGeoRedundant))
                .InSingletonScope();

            // when running on Windows Azure, pull the statistics from the warehouse via storage
            Bind<IReportService>()
                .ToMethod(_ => new CloudReportService(configuration.Current.AzureStorageConnectionString, configuration.Current.AzureStorageReadAccessGeoRedundant))
                .InSingletonScope();

            Bind<IStatisticsService>()
                .To<JsonStatisticsService>()
                .InSingletonScope();

            string instanceId;
            try
            {
                instanceId = RoleEnvironment.CurrentRoleInstance.Id;
            }
            catch
            {
                instanceId = Environment.MachineName;
            }

            var localIP = AuditActor.GetLocalIP().Result;

            Bind<AuditingService>()
                .ToMethod(_ => new CloudAuditingService(
                    instanceId, localIP, configuration.Current.AzureStorageConnectionString, CloudAuditingService.AspNetActorThunk))
                .InSingletonScope();
        }
 public ConfigurationApiController()
 {
     _configurationService = new ConfigurationService();
 }
 protected WaitStrategy(int?timeoutInterval = null, int?sleepInterval = null)
 {
     WrappedWebDriver = ServicesCollection.Current.Resolve <WindowsDriver <WindowsElement> >();
     TimeoutInterval  = timeoutInterval;
     SleepInterval    = sleepInterval ?? ConfigurationService.GetSection <DesktopSettings>().SleepInterval;
 }
 public WaitToHaveContentStrategy(int?timeoutInterval = null, int?sleepInterval = null)
     : base(timeoutInterval, sleepInterval)
 {
     TimeoutInterval = timeoutInterval ?? ConfigurationService.GetSection <DesktopSettings>().ElementToHaveContentTimeout;
 }
Exemple #26
0
        private bool SubmitBatchedAddOrDeleteLinkChanges(
            List <XmlDocument> updateDocuments,
            Dictionary <int, LinkChangeAction> updateDocIndexToLinkChangeActionMap,
            ITranslationService translationService,
            ConfigurationService configService,
            ConflictManager conflictManager)
        {
            bool succeeded = true;

            UpdateResult[] results = TfsBatchUpdateHelper.Submit(Core, WorkItemServer, updateDocuments.ToArray());
            if (results.Length != updateDocuments.Count)
            {
                throw new SynchronizationEngineException("Wrong number of link update results.");
            }

            // Collect list of successful LinkChangeActions (for LinkTypes with GetsActionsFromLinkChangeHistory true) to pass to SetServerLinkChangeIds()
            List <LinkChangeAction> actionsNeedingServerLinkIdSet = new List <LinkChangeAction>();

            for (int i = 0; i < results.Length; ++i)
            {
                if (results[i] == null)
                {
                    continue;
                }

                UpdateResult rslt = results[i];

                if (rslt.Exception != null)
                {
                    MigrationConflict        conflict       = null;
                    ConflictResolutionResult resolutionRslt = null;
                    List <MigrationAction>   actions;
                    bool createWitGeneralConflict = false;

                    System.Web.Services.Protocols.SoapException soapException = rslt.Exception as System.Web.Services.Protocols.SoapException;
                    if (soapException != null)
                    {
                        int?tfsErrorNumber = GetTfsErrorNumberFromSoapException(soapException);

                        if (tfsErrorNumber.HasValue)
                        {
                            LinkChangeAction linkChangeAction = updateDocIndexToLinkChangeActionMap[i];
                            switch (tfsErrorNumber)
                            {
                            case TfsConstants.TfsError_AddLink_LinkExists:
                            case TfsConstants.TfsError_DeleteLink_LinkNotFound:
                                // it is ok to eat these exception and skip the action

                                // mark the change action completed so it is not retried later
                                linkChangeAction.Status = LinkChangeAction.LinkChangeActionStatus.Skipped;

                                if (tfsErrorNumber == TfsConstants.TfsError_AddLink_LinkExists)
                                {
                                    TraceManager.TraceInformation("Tried to add a link that already exists so skipping it: " + GetLinkChangeActionDescription(linkChangeAction));
                                }
                                else
                                {
                                    TraceManager.TraceInformation("Tried to delete a link that does not exist so skipping it: " + GetLinkChangeActionDescription(linkChangeAction));
                                }

                                if (soapException.Detail != null)
                                {
                                    TraceManager.TraceVerbose("SoapException.Detail.InnerXml for ignored exception: " + soapException.Detail.InnerXml);
                                }
                                break;

                            case TfsConstants.TfsError_AddLink_TooManyParents:
                                if (linkChangeAction.Group.IsForcedSync)
                                {
                                    if (DeleteExistingParentLinkToForceSyncAddLink(linkChangeAction, updateDocuments[i]))
                                    {
                                        break;
                                    }
                                }

                                conflict = TFSMulitpleParentLinkConflictType.CreateConflict(
                                    updateDocIndexToLinkChangeActionMap[i], rslt.Exception);

                                resolutionRslt = conflictManager.TryResolveNewConflict(conflictManager.SourceId, conflict, out actions);
                                if (!resolutionRslt.Resolved)
                                {
                                    updateDocIndexToLinkChangeActionMap[i].IsConflicted = true;
                                    succeeded = false;
                                }

                                break;

                            case TfsConstants.TfsError_AddLink_Circular:
                            case TfsConstants.TfsError_AddLink_ChildIsAncestor:
                                ILinkProvider linkProvider = ServiceContainer.GetService(typeof(ILinkProvider)) as ILinkProvider;
                                Debug.Assert(null != linkProvider, "linkProvider is NULL");

                                LinkChangeAction          conflictedAction = updateDocIndexToLinkChangeActionMap[i];
                                NonCyclicReferenceClosure linkRefClosure   =
                                    linkProvider.CreateNonCyclicLinkReferenceClosure(conflictedAction.Link.LinkType, conflictedAction.Link.SourceArtifact);

                                conflict = TFSCyclicLinkConflictType.CreateConflict(conflictedAction, rslt.Exception, linkRefClosure);

                                resolutionRslt = conflictManager.TryResolveNewConflict(conflictManager.SourceId, conflict, out actions);
                                if (!resolutionRslt.Resolved)
                                {
                                    updateDocIndexToLinkChangeActionMap[i].IsConflicted = true;
                                    succeeded = false;
                                }
                                break;

                            case TfsConstants.TfsError_LinkAuthorizationFailedLinkLocked:
                                conflict = TFSModifyLockedWorkItemLinkConflictType.CreateConflict(
                                    updateDocIndexToLinkChangeActionMap[i], rslt.Exception);

                                resolutionRslt = conflictManager.TryResolveNewConflict(conflictManager.SourceId, conflict, out actions);
                                if (!resolutionRslt.Resolved)
                                {
                                    updateDocIndexToLinkChangeActionMap[i].IsConflicted = true;
                                }
                                // returning "not succeeded" so that the caller keeps this change group in "ReadyForMigration" status
                                succeeded = false;
                                break;

                            case TfsConstants.TfsError_LinkAuthorizationFailed:
                            case TfsConstants.TfsError_LinkAuthorizationFailedNotServiceAccount:
                                conflict = TFSLinkAccessViolationConflictType.CreateConflict(
                                    updateDocIndexToLinkChangeActionMap[i], rslt.Exception);

                                resolutionRslt = conflictManager.TryResolveNewConflict(conflictManager.SourceId, conflict, out actions);
                                if (!resolutionRslt.Resolved)
                                {
                                    updateDocIndexToLinkChangeActionMap[i].IsConflicted = true;
                                }
                                // returning "not succeeded" so that the caller keeps this change group in "ReadyForMigration" status
                                succeeded = false;
                                break;

                            default:
                                // TFS error doesn't match any that we explicitly handle
                                TraceManager.TraceError("SubmitBatchedAddOrDeleteLinkChanges:TFS error number in SoapException not explictly handled: {0}", tfsErrorNumber);
                                createWitGeneralConflict = true;
                                break;
                            }
                        }
                        else
                        {
                            TraceManager.TraceError("SubmitBatchedAddOrDeleteLinkChanges: Unable to get TFS error number from SoapException: {0}", soapException.ToString());
                            createWitGeneralConflict = true;
                        }
                    }
                    else // Exception is not SoapException
                    {
                        TraceManager.TraceError("SubmitBatchedAddOrDeleteLinkChanges: Exception returned is not SoapException: {0}", rslt.Exception.ToString());
                        createWitGeneralConflict = true;
                    }

                    if (createWitGeneralConflict)
                    {
                        conflict = WitGeneralConflictType.CreateConflict(rslt.Exception);

                        resolutionRslt = conflictManager.TryResolveNewConflict(conflictManager.SourceId, conflict, out actions);
                        if (!resolutionRslt.Resolved)
                        {
                            updateDocIndexToLinkChangeActionMap[i].IsConflicted = true;
                            succeeded = false;
                        }
                    }
                }
                else // rslt.Exception == null
                {
                    LinkChangeAction successfulAction = updateDocIndexToLinkChangeActionMap[i];
                    MarkLinkChangeActionCompleted(successfulAction);

                    TraceManager.TraceVerbose("Successful " + GetLinkChangeActionDescription(successfulAction));

                    List <LinkChangeAction> updatedActions = new List <LinkChangeAction>();
                    updatedActions.Add(successfulAction);

                    if (successfulAction.Link.LinkType.GetsActionsFromLinkChangeHistory)
                    {
                        actionsNeedingServerLinkIdSet.Add(successfulAction);
                    }

                    UpdateLinkConversionHistory(configService, translationService, rslt, updatedActions);
                }
            }

            SetServerLinkChangeIds(actionsNeedingServerLinkIdSet);

            return(succeeded);
        }
Exemple #27
0
 public override void TestInit() => App.NavigationService.NavigateToLocalPage(ConfigurationService.GetSection <TestPagesSettings>().OutputLocalPage);
Exemple #28
0
 public App()
 {
     _shouldStartAppiumLocalService = ConfigurationService.GetSection <MobileSettings>().ExecutionSettings.ShouldStartLocalService;
 }
Exemple #29
0
 public CheckUserSafetyService(IQueryBus queryBus, UsersService usersService, DiscordServersService discordServersService, ConfigurationService configurationService)
 {
     ServerSafeUsers.UsersService = usersService;
     this._queryBus = queryBus;
     this._discordServersService = discordServersService;
     this._configurationService  = configurationService;
 }
 public override void TestInit()
 {
     App.NavigationService.NavigateToLocalPage(ConfigurationService.GetSection <TestPagesSettings>().LayoutPricingPage);
     _free = App.ElementCreateService.CreateByXpath <Heading>("/html/body/div[3]/div/div[1]/div[1]/h4");
     _pro  = App.ElementCreateService.CreateByXpath <Heading>("/html/body/div[3]/div/div[2]/div[1]/h4");
 }
Exemple #31
0
 public AzureTestCasesService()
 {
     _uri = ConfigurationService.GetSection <AzureDevOpsDynamicTestCasesSettings>().Url;
     _personalAccessToken = ConfigurationService.GetSection <AzureDevOpsDynamicTestCasesSettings>().Token;
     _project             = ConfigurationService.GetSection <AzureDevOpsDynamicTestCasesSettings>().ProjectName;
 }
 public LoginViewController(IntPtr handle) : base(handle)
 {
     regions = ConfigurationService.GetAllCountryMap();
 }
 static AzureQueryExecutor()
 {
     _uri = SecretsResolver.GetSecret(() => ConfigurationService.GetSection <AzureDevOpsDynamicTestCasesSettings>().Url);
     _personalAccessToken = SecretsResolver.GetSecret(() => ConfigurationService.GetSection <AzureDevOpsDynamicTestCasesSettings>().Token);
 }
 public DisconnectOperation(ConfigurationService cmService)
 {
     _cmService = cmService;
 }
Exemple #35
0
 // Configuration Logic
 public virtual void Configure(ConfigurationService config)
 {
     BaseConfig = config.ResolveConfigObject(BaseConfig, AuthPrefix + Name + ".");
 }
Exemple #36
0
 /// <summary>
 /// Obtain references to services needed by this class
 /// </summary>
 public void InitializeServices(IServiceContainer syncMonitorServiceContainer)
 {
     m_serviceContainer     = syncMonitorServiceContainer;
     m_configurationService = (ConfigurationService)m_serviceContainer.GetService(typeof(ConfigurationService));
     Debug.Assert(m_configurationService != null, "Configuration service is not initialized");
 }
Exemple #37
0
 public UserController(UserService _UserService, ConfigurationService _configService)
 {
     UserService   = _UserService;
     ConfigService = _configService;
     Hub           = GlobalHost.ConnectionManager.GetHubContext <WhatsLearnHub>();
 }
 public PsesCodeLensHandlers(ILoggerFactory factory, SymbolsService symbolsService, WorkspaceService workspaceService, ConfigurationService configurationService)
 {
     _logger           = factory.CreateLogger <PsesCodeLensHandlers>();
     _workspaceService = workspaceService;
     _symbolsService   = symbolsService;
 }
Exemple #39
0
        private bool SubmitWorkItemLinkChanges(
            LinkChangeGroup linkChanges,
            ServiceContainer serviceContainer,
            ConfigurationService configService,
            ITranslationService translationService,
            TfsLinkingProviderBase.LinkSubmissionPhase submissionPhase)
        {
            var linkChangeActions = ExtractWorkItemLinkChanges(linkChanges);

            if (linkChangeActions.Count == 0)
            {
                return(true);
            }

            ConflictManager conflictManageer         = serviceContainer.GetService(typeof(ConflictManager)) as ConflictManager;
            var             updatedocsForEditLinks   = new List <XmlDocument>(linkChangeActions.Count);
            var             updateDocsForAddLinks    = new List <XmlDocument>(linkChangeActions.Count);
            var             updateDocsForDeleteLinks = new List <XmlDocument>(linkChangeActions.Count);
            Dictionary <int, LinkChangeAction> docForEditlinksToActionMap   = new Dictionary <int, LinkChangeAction>();
            Dictionary <int, LinkChangeAction> docForAddlinksToActionMap    = new Dictionary <int, LinkChangeAction>();
            Dictionary <int, LinkChangeAction> docForDeletelinksToActionMap = new Dictionary <int, LinkChangeAction>();

            for (int i = 0; i < linkChangeActions.Count; ++i)
            {
                if (linkChangeActions[i].Status != LinkChangeAction.LinkChangeActionStatus.ReadyForMigration ||
                    linkChangeActions[i].IsConflicted)
                {
                    continue;
                }

                if (!ProcessActionInCurrentSubmissionPhase(linkChangeActions[i], submissionPhase))
                {
                    continue;
                }

                var tfsUpdateDocument = InitializeUpdateDocument();

                var handler = linkChangeActions[i].Link.LinkType as ILinkHandler;
                Debug.Assert(null != handler);

                handler.UpdateTfs(tfsUpdateDocument, linkChangeActions[i]);

                if (linkChangeActions[i].ChangeActionId.Equals(WellKnownChangeActionId.Add))
                {
                    docForAddlinksToActionMap.Add(updateDocsForAddLinks.Count, linkChangeActions[i]);
                    updateDocsForAddLinks.Add(tfsUpdateDocument.UpdateDocument);
                }
                else if (linkChangeActions[i].ChangeActionId.Equals(WellKnownChangeActionId.Delete))
                {
                    docForDeletelinksToActionMap.Add(updateDocsForDeleteLinks.Count, linkChangeActions[i]);
                    updateDocsForDeleteLinks.Add(tfsUpdateDocument.UpdateDocument);
                }
                else if (linkChangeActions[i].ChangeActionId.Equals(WellKnownChangeActionId.Edit))
                {
                    docForEditlinksToActionMap.Add(updatedocsForEditLinks.Count, linkChangeActions[i]);
                    updatedocsForEditLinks.Add(tfsUpdateDocument.UpdateDocument);
                }
                else
                {
                    TraceManager.TraceVerbose("Change action '{0}' in Link Change Group '{1}' is not supported.",
                                              linkChangeActions[i].ChangeActionId.ToString(), linkChanges.GroupName);
                    linkChangeActions[i].Status = LinkChangeAction.LinkChangeActionStatus.Completed;
                }
            }

            bool succeeded = true;

            if (updatedocsForEditLinks.Count > 0)
            {
                succeeded &= SubmitBatchedAddOrDeleteLinkChanges(
                    updatedocsForEditLinks, docForEditlinksToActionMap, translationService, configService, conflictManageer);
            }
            if (updateDocsForDeleteLinks.Count > 0)
            {
                succeeded &= SubmitBatchedAddOrDeleteLinkChanges(
                    updateDocsForDeleteLinks, docForDeletelinksToActionMap, translationService, configService, conflictManageer);
            }
            if (updateDocsForAddLinks.Count > 0)
            {
                succeeded &= SubmitBatchedAddOrDeleteLinkChanges(
                    updateDocsForAddLinks, docForAddlinksToActionMap, translationService, configService, conflictManageer);
            }
            return(succeeded);
        }
Exemple #40
0
 protected virtual void AttachToOwinApp(ConfigurationService config, IAppBuilder app) { }
        private AppConfiguration GetCurrentAppConfiguration(MemberInfo memberInfo, Type testClassType, ServicesCollection container)
        {
            var androidAttribute                = GetAppAttribute <AndroidAttribute>(memberInfo, testClassType);
            var iosAttribute                    = GetAppAttribute <IOSAttribute>(memberInfo, testClassType);
            var androidWebAttribute             = GetAppAttribute <AndroidWebAttribute>(memberInfo, testClassType);
            var androidSauceLabsAttribute       = GetAppAttribute <AndroidSauceLabsAttribute>(memberInfo, testClassType);
            var androidCrossappTestingAttribute = GetAppAttribute <AndroidCrossBrowserTestingAttribute>(memberInfo, testClassType);
            var androidappStackAttribute        = GetAppAttribute <AndroidBrowserStackAttribute>(memberInfo, testClassType);

            var iosWebAttribute             = GetAppAttribute <IOSWebAttribute>(memberInfo, testClassType);
            var iosSauceLabsAttribute       = GetAppAttribute <IOSSauceLabsAttribute>(memberInfo, testClassType);
            var iosCrossappTestingAttribute = GetAppAttribute <IOSCrossBrowserTestingAttribute>(memberInfo, testClassType);
            var iosappStackAttribute        = GetAppAttribute <IOSBrowserStackAttribute>(memberInfo, testClassType);

            AppConfiguration currentAppConfiguration;

            if (androidAttribute != null && iosAttribute != null)
            {
                throw new ArgumentException("You need to specify only single platform attribute - Android or IOS.");
            }
            else if (androidAttribute != null)
            {
                currentAppConfiguration = androidAttribute.AppConfiguration;
            }
            else if (androidWebAttribute != null)
            {
                currentAppConfiguration = androidWebAttribute.AppConfiguration;
            }
            else if (androidSauceLabsAttribute != null)
            {
                currentAppConfiguration = androidSauceLabsAttribute.AppConfiguration;
                currentAppConfiguration.AppiumOptions = androidSauceLabsAttribute.CreateAppiumOptions(memberInfo, testClassType);
            }
            else if (androidCrossappTestingAttribute != null)
            {
                currentAppConfiguration = androidCrossappTestingAttribute.AppConfiguration;
                currentAppConfiguration.AppiumOptions = androidCrossappTestingAttribute.CreateAppiumOptions(memberInfo, testClassType);
            }
            else if (androidappStackAttribute != null)
            {
                currentAppConfiguration = androidappStackAttribute.AppConfiguration;
                currentAppConfiguration.AppiumOptions = androidappStackAttribute.CreateAppiumOptions(memberInfo, testClassType);
            }
            else if (iosAttribute != null)
            {
                currentAppConfiguration = iosAttribute.AppConfiguration;
            }
            else if (iosWebAttribute != null)
            {
                currentAppConfiguration = iosWebAttribute.AppConfiguration;
            }
            else if (iosSauceLabsAttribute != null)
            {
                currentAppConfiguration = iosSauceLabsAttribute.AppConfiguration;
                currentAppConfiguration.AppiumOptions = iosSauceLabsAttribute.CreateAppiumOptions(memberInfo, testClassType);
            }
            else if (iosCrossappTestingAttribute != null)
            {
                currentAppConfiguration = iosCrossappTestingAttribute.AppConfiguration;
                currentAppConfiguration.AppiumOptions = iosCrossappTestingAttribute.CreateAppiumOptions(memberInfo, testClassType);
            }
            else if (iosappStackAttribute != null)
            {
                currentAppConfiguration = iosappStackAttribute.AppConfiguration;
                currentAppConfiguration.AppiumOptions = iosappStackAttribute.CreateAppiumOptions(memberInfo, testClassType);
            }
            else
            {
                // TODO: --> add Test Case attribute for Andoid and IOS? Extend the Test Case attribute?
                Lifecycle currentLifecycle = Parse <Lifecycle>(ConfigurationService.GetSection <MobileSettings>().ExecutionSettings.DefaultLifeCycle);

                var appConfiguration = new AppConfiguration
                {
                    AppPath       = ConfigurationService.GetSection <MobileSettings>().ExecutionSettings.DefaultAppPath,
                    Lifecycle     = currentLifecycle,
                    AppiumOptions = new AppiumOptions(),
                    ClassFullName = testClassType.FullName,
                };

                InitializeGridOptionsFromConfiguration(appConfiguration.AppiumOptions, testClassType);
                InitializeCustomCodeOptions(appConfiguration.AppiumOptions, testClassType);

                container.RegisterInstance(appConfiguration, "_currentAppConfiguration");
                return(appConfiguration);
            }

            container.RegisterInstance(currentAppConfiguration, "_currentAppConfiguration");
            return(currentAppConfiguration);
        }
 public NHibernateConfiguration(ConfigurationService configurationService)
 {
     _configurationService = configurationService;
 }
Exemple #43
0
 public PreviewViewModel()
 {
     _configService = GetService <ConfigurationService>();
 }
 public ConfigController(ConfigurationService config, AuthenticationService auth)
 {
     _config = config;
     _auth = auth;
 }
Exemple #45
0
 public WaitNotBeVisibleStrategy(int?timeoutInterval = null, int?sleepInterval = null)
     : base(timeoutInterval, sleepInterval)
 {
     TimeoutInterval = timeoutInterval ?? ConfigurationService.GetSection <MobileSettings>().TimeoutSettings.ElementNotToBeVisibleTimeout;
 }
        public override void Load()
        {
            var configuration = new ConfigurationService();
            Bind<ConfigurationService>()
                .ToMethod(context => configuration);
            Bind<IAppConfiguration>()
                .ToMethod(context => configuration.Current);
            Bind<PoliteCaptcha.IConfigurationSource>()
                .ToMethod(context => configuration);

            Bind<Lucene.Net.Store.Directory>()
                .ToMethod(_ => LuceneCommon.GetDirectory(configuration.Current.LuceneIndexLocation))
                .InSingletonScope();

            Bind<ISearchService>()
                .To<LuceneSearchService>()
                .InRequestScope();

            if (!String.IsNullOrEmpty(configuration.Current.AzureStorageConnectionString))
            {
                Bind<ErrorLog>()
                    .ToMethod(_ => new TableErrorLog(configuration.Current.AzureStorageConnectionString))
                    .InSingletonScope();
            }
            else
            {
                Bind<ErrorLog>()
                    .ToMethod(_ => new SqlErrorLog(configuration.Current.SqlConnectionString))
                    .InSingletonScope();
            }

            Bind<ICacheService>()
                .To<HttpContextCacheService>()
                .InRequestScope();

            Bind<IContentService>()
                .To<ContentService>()
                .InSingletonScope();

            Bind<IEntitiesContext>()
                .ToMethod(context => new EntitiesContext(configuration.Current.SqlConnectionString, readOnly: configuration.Current.ReadOnlyMode))
                .InRequestScope();

            Bind<IEntityRepository<User>>()
                .To<EntityRepository<User>>()
                .InRequestScope();

            Bind<IEntityRepository<CuratedFeed>>()
                .To<EntityRepository<CuratedFeed>>()
                .InRequestScope();

            Bind<IEntityRepository<CuratedPackage>>()
                .To<EntityRepository<CuratedPackage>>()
                .InRequestScope();

            Bind<IEntityRepository<PackageRegistration>>()
                .To<EntityRepository<PackageRegistration>>()
                .InRequestScope();

            Bind<IEntityRepository<Package>>()
                .To<EntityRepository<Package>>()
                .InRequestScope();

            Bind<IEntityRepository<PackageDependency>>()
                .To<EntityRepository<PackageDependency>>()
                .InRequestScope();

            Bind<IEntityRepository<PackageStatistics>>()
                .To<EntityRepository<PackageStatistics>>()
                .InRequestScope();

            Bind<IEntityRepository<Credential>>()
                .To<EntityRepository<Credential>>()
                .InRequestScope();

            Bind<ICuratedFeedService>()
                .To<CuratedFeedService>()
                .InRequestScope();

            Bind<IUserService>()
                .To<UserService>()
                .InRequestScope();

            Bind<IPackageService>()
                .To<PackageService>()
                .InRequestScope();

            Bind<EditPackageService>().ToSelf();

            Bind<IFormsAuthenticationService>()
                .To<FormsAuthenticationService>()
                .InSingletonScope();

            Bind<IControllerFactory>()
                .To<NuGetControllerFactory>()
                .InRequestScope();

            Bind<IIndexingService>()
                .To<LuceneIndexingService>()
                .InRequestScope();

            Bind<INuGetExeDownloaderService>()
                .To<NuGetExeDownloaderService>()
                .InRequestScope();

            var mailSenderThunk = new Lazy<IMailSender>(
                () =>
                {
                    var settings = Kernel.Get<ConfigurationService>();
                    if (settings.Current.SmtpUri != null && settings.Current.SmtpUri.IsAbsoluteUri)
                    {
                        var smtpUri = new SmtpUri(settings.Current.SmtpUri);

                        var mailSenderConfiguration = new MailSenderConfiguration
                            {
                                DeliveryMethod = SmtpDeliveryMethod.Network,
                                Host = smtpUri.Host,
                                Port = smtpUri.Port,
                                EnableSsl = smtpUri.Secure
                            };

                        if (!String.IsNullOrWhiteSpace(smtpUri.UserName))
                        {
                            mailSenderConfiguration.UseDefaultCredentials = false;
                            mailSenderConfiguration.Credentials = new NetworkCredential(
                                smtpUri.UserName,
                                smtpUri.Password);
                        }

                        return new MailSender(mailSenderConfiguration);
                    }
                    else
                    {
                        var mailSenderConfiguration = new MailSenderConfiguration
                            {
                                DeliveryMethod = SmtpDeliveryMethod.SpecifiedPickupDirectory,
                                PickupDirectoryLocation = HostingEnvironment.MapPath("~/App_Data/Mail")
                            };

                        return new MailSender(mailSenderConfiguration);
                    }
                });

            Bind<IMailSender>()
                .ToMethod(context => mailSenderThunk.Value);

            Bind<IMessageService>()
                .To<MessageService>();

            Bind<IPrincipal>().ToMethod(context => HttpContext.Current.User);

            switch (configuration.Current.StorageType)
            {
                case StorageType.FileSystem:
                case StorageType.NotSpecified:
                    ConfigureForLocalFileSystem();
                    break;
                case StorageType.AzureStorage:
                    ConfigureForAzureStorage(configuration);
                    break;
            }

            Bind<IFileSystemService>()
                .To<FileSystemService>()
                .InSingletonScope();

            Bind<IPackageFileService>()
                .To<PackageFileService>();

            Bind<IEntityRepository<PackageOwnerRequest>>()
                .To<EntityRepository<PackageOwnerRequest>>()
                .InRequestScope();

            Bind<IUploadFileService>()
                .To<UploadFileService>();

            // todo: bind all package curators by convention
            Bind<IAutomaticPackageCurator>()
                .To<WebMatrixPackageCurator>();
            Bind<IAutomaticPackageCurator>()
                .To<Windows8PackageCurator>();

            // todo: bind all commands by convention
            Bind<IAutomaticallyCuratePackageCommand>()
                .To<AutomaticallyCuratePackageCommand>()
                .InRequestScope();

            Bind<IAggregateStatsService>()
                .To<AggregateStatsService>()
                .InRequestScope();
            Bind<IPackageIdsQuery>()
                .To<PackageIdsQuery>()
                .InRequestScope();
            Bind<IPackageVersionsQuery>()
                .To<PackageVersionsQuery>()
                .InRequestScope();
        }
 public TestableV2Feed(
     IEntityRepository<Package> repo,
     ConfigurationService configuration,
     ISearchService searchService)
     : base(new Mock<IEntitiesContext>().Object, repo, configuration, searchService)
 {
 }
Exemple #48
0
        static void Main(string[] args)
        {
            try
            {
                var sql        = new SqlConnection("Data Source=10.33.170.65;Persist Security Info=True;Initial Catalog=UNIFAudaFNOL;Password=msWh62sQ;User=AxSystem");
                var repository = new ConfigurationRepository(sql);
                ConfigurationService configuration = new ConfigurationService(repository);

                InsuranceCompany company = configuration.GetConfiguration(1, TypeCompany.InsuranceCompany);

                EmailService emailService = new EmailService("10.66.97.2", 25);

                emailService.Send("*****@*****.**", new System.Collections.Generic.List <string>()
                {
                    "*****@*****.**"
                },
                                  null, "Pontuação Guincho", company.Image, company.Image, @"<!DOCTYPE HTML PUBLIC '-//W3C//DTD XHTML 1.0 Transitional //EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'><html xmlns='http://www.w3.org/1999/xhtml' xmlns:v='urn:schemas-microsoft-com:vml' xmlns:o='urn:schemas-microsoft-com:office:office'><head>
                                <!--[if gte mso 9]><xml>
                                 <o:OfficeDocumentSettings>
                                  <o:AllowPNG/>
                                  <o:PixelsPerInch>96</o:PixelsPerInch>
                                 </o:OfficeDocumentSettings>
                                </xml><![endif]-->
                                <meta http-equiv='Content-Type' content='text/html; charset=utf-8'>
                                <meta name='viewport' content='width=device-width'>
                                <!--[if !mso]><!--><meta http-equiv='X-UA-Compatible' content='IE=edge'><!--<![endif]-->
                                <title></title>
    
    
                                <style type='text/css' id='media-query'>
                                  body {
                                  margin: 0;
                                  padding: 0; }

                                  table, tr, td {
                                    vertical-align: top;
                                    border-collapse: collapse; }

                                  .ie-browser table, .mso-container table {
                                    table-layout: fixed; }

                                  * {
                                    line-height: inherit; }

                                  a[x-apple-data-detectors=true] {
                                    color: inherit !important;
                                    text-decoration: none !important; }

                                  [owa] .img-container div, [owa] .img-container button {
                                    display: block !important; }

                                  [owa] .fullwidth button {
                                    width: 100% !important; }

                                  [owa] .block-grid .col {
                                    display: table-cell;
                                    float: none !important;
                                    vertical-align: top; }

                                  .ie-browser .num12, .ie-browser .block-grid, [owa] .num12, [owa] .block-grid {
                                    width: 500px !important; }

                                  .ExternalClass, .ExternalClass p, .ExternalClass span, .ExternalClass font, .ExternalClass td, .ExternalClass div {
                                    line-height: 100%; }

                                  .ie-browser .mixed-two-up .num4, [owa] .mixed-two-up .num4 {
                                    width: 164px !important; }

                                  .ie-browser .mixed-two-up .num8, [owa] .mixed-two-up .num8 {
                                    width: 328px !important; }

                                  .ie-browser .block-grid.two-up .col, [owa] .block-grid.two-up .col {
                                    width: 250px !important; }

                                  .ie-browser .block-grid.three-up .col, [owa] .block-grid.three-up .col {
                                    width: 166px !important; }

                                  .ie-browser .block-grid.four-up .col, [owa] .block-grid.four-up .col {
                                    width: 125px !important; }

                                  .ie-browser .block-grid.five-up .col, [owa] .block-grid.five-up .col {
                                    width: 100px !important; }

                                  .ie-browser .block-grid.six-up .col, [owa] .block-grid.six-up .col {
                                    width: 83px !important; }

                                  .ie-browser .block-grid.seven-up .col, [owa] .block-grid.seven-up .col {
                                    width: 71px !important; }

                                  .ie-browser .block-grid.eight-up .col, [owa] .block-grid.eight-up .col {
                                    width: 62px !important; }

                                  .ie-browser .block-grid.nine-up .col, [owa] .block-grid.nine-up .col {
                                    width: 55px !important; }

                                  .ie-browser .block-grid.ten-up .col, [owa] .block-grid.ten-up .col {
                                    width: 50px !important; }

                                  .ie-browser .block-grid.eleven-up .col, [owa] .block-grid.eleven-up .col {
                                    width: 45px !important; }

                                  .ie-browser .block-grid.twelve-up .col, [owa] .block-grid.twelve-up .col {
                                    width: 41px !important; }

                                  @media only screen and (min-width: 520px) {
                                    .block-grid {
                                      width: 500px !important; }
                                    .block-grid .col {
                                      vertical-align: top; }
                                      .block-grid .col.num12 {
                                        width: 500px !important; }
                                    .block-grid.mixed-two-up .col.num4 {
                                      width: 164px !important; }
                                    .block-grid.mixed-two-up .col.num8 {
                                      width: 328px !important; }
                                    .block-grid.two-up .col {
                                      width: 250px !important; }
                                    .block-grid.three-up .col {
                                      width: 166px !important; }
                                    .block-grid.four-up .col {
                                      width: 125px !important; }
                                    .block-grid.five-up .col {
                                      width: 100px !important; }
                                    .block-grid.six-up .col {
                                      width: 83px !important; }
                                    .block-grid.seven-up .col {
                                      width: 71px !important; }
                                    .block-grid.eight-up .col {
                                      width: 62px !important; }
                                    .block-grid.nine-up .col {
                                      width: 55px !important; }
                                    .block-grid.ten-up .col {
                                      width: 50px !important; }
                                    .block-grid.eleven-up .col {
                                      width: 45px !important; }
                                    .block-grid.twelve-up .col {
                                      width: 41px !important; } }

                                  @media (max-width: 520px) {
                                    .block-grid, .col {
                                      min-width: 320px !important;
                                      max-width: 100% !important;
                                      display: block !important; }
                                    .block-grid {
                                      width: calc(100% - 40px) !important; }
                                    .col {
                                      width: 100% !important; }
                                      .col > div {
                                        margin: 0 auto; }
                                    img.fullwidth, img.fullwidthOnMobile {
                                      max-width: 100% !important; }
                                    .no-stack .col {
                                      min-width: 0 !important;
                                      display: table-cell !important; }
                                    .no-stack.two-up .col {
                                      width: 50% !important; }
                                    .no-stack.mixed-two-up .col.num4 {
                                      width: 33% !important; }
                                    .no-stack.mixed-two-up .col.num8 {
                                      width: 66% !important; }
                                    .no-stack.three-up .col.num4 {
                                      width: 33% !important; }
                                    .no-stack.four-up .col.num3 {
                                      width: 25% !important; }
                                    .mobile_hide {
                                      min-height: 0px;
                                      max-height: 0px;
                                      max-width: 0px;
                                      display: none;
                                      overflow: hidden;
                                      font-size: 0px; } }

                                      </style>
                                  </head>
                                  <body class='clean-body' style='margin: 0;padding: 0;-webkit-text-size-adjust: 100%;background-color: #FFFFFF'>
                                    <style type='text/css' id='media-query-bodytag'>
                                      @media (max-width: 520px) {
                                        .block-grid {
                                          min-width: 320px!important;
                                          max-width: 100%!important;
                                          width: 100%!important;
                                          display: block!important;
                                        }

                                        .col {
                                          min-width: 320px!important;
                                          max-width: 100%!important;
                                          width: 100%!important;
                                          display: block!important;
                                        }

                                          .col > div {
                                            margin: 0 auto;
                                          }

                                        img.fullwidth {
                                          max-width: 100%!important;
                                        }
                                        img.fullwidthOnMobile {
                                          max-width: 100%!important;
                                        }
                                        .no-stack .col {
                                          min-width: 0!important;
                                          display: table-cell!important;
                                        }
                                        .no-stack.two-up .col {
                                          width: 50%!important;
                                        }
                                        .no-stack.mixed-two-up .col.num4 {
                                          width: 33%!important;
                                        }
                                        .no-stack.mixed-two-up .col.num8 {
                                          width: 66%!important;
                                        }
                                        .no-stack.three-up .col.num4 {
                                          width: 33%!important;
                                        }
                                        .no-stack.four-up .col.num3 {
                                          width: 25%!important;
                                        }
                                        .mobile_hide {
                                          min-height: 0px!important;
                                          max-height: 0px!important;
                                          max-width: 0px!important;
                                          display: none!important;
                                          overflow: hidden!important;
                                          font-size: 0px!important;
                                        }
                                      }
                                    </style>
                                    <!--[if IE]><div class='ie-browser'><![endif]-->
                                    <!--[if mso]><div class='mso-container'><![endif]-->
                                    <table class='nl-container' style='border-collapse: collapse;table-layout: fixed;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;vertical-align: top;min-width: 320px;Margin: 0 auto;background-color: #FFFFFF;width: 100%' cellpadding='0' cellspacing='0'>
                                    <tbody>
                                    <tr style='vertical-align: top'>
                                      <td style='word-break: break-word;border-collapse: collapse !important;vertical-align: top'>
                                      <!--[if (mso)|(IE)]><table width='100%' cellpadding='0' cellspacing='0' border='0'><tr><td align='center' style='background-color: #FFFFFF;'><![endif]-->

                                      <div style='background-color:#FFFFFF;'>
                                        <div style='Margin: 0 auto;min-width: 320px;max-width: 500px;overflow-wrap: break-word;word-wrap: break-word;word-break: break-word;background-color: transparent;' class='block-grid two-up '>
                                          <div style='border-collapse: collapse;display: table;width: 100%;background-color:transparent;'>
                                            <!--[if (mso)|(IE)]><table width='100%' cellpadding='0' cellspacing='0' border='0'><tr><td style='background-color:#FFFFFF;' align='center'><table cellpadding='0' cellspacing='0' border='0' style='width: 500px;'><tr class='layout-full-width' style='background-color:transparent;'><![endif]-->

                                                <!--[if (mso)|(IE)]><td align='center' width='250' style=' width:250px; padding-right: 0px; padding-left: 0px; padding-top:5px; padding-bottom:5px; border-top: 0px solid transparent; border-left: 0px solid transparent; border-bottom: 0px solid transparent; border-right: 0px solid transparent;' valign='top'><![endif]-->
                                              <div class='col num6' style='max-width: 320px;min-width: 250px;display: table-cell;vertical-align: top;'>
                                                <div style='background-color: transparent; width: 100% !important;'>
                                                <!--[if (!mso)&(!IE)]><!--><div style='border-top: 0px solid transparent; border-left: 0px solid transparent; border-bottom: 0px solid transparent; border-right: 0px solid transparent; padding-top:5px; padding-bottom:5px; padding-right: 0px; padding-left: 0px;'><!--<![endif]-->

                        
                                                      <div align='right' class='img-container right  autowidth  fullwidthOnMobile ' style='padding-right: 15px;  padding-left: 0px;'>
                                  <!--[if mso]><table width='100%' cellpadding='0' cellspacing='0' border='0'><tr style='line-height:0px;line-height:0px;'><td style='padding-right: 15px; padding-left: 0px;' align='right'><![endif]-->
                                  <div style='line-height:10px;font-size:1px'>&#160;</div>  <img class='right  autowidth  fullwidthOnMobile' align='right' border='0' src='cid:companyLogo' alt='Image' title='Image' style='outline: none;text-decoration: none;-ms-interpolation-mode: bicubic;clear: both;display: block !important;border: 0;height: auto;float: none;width: 100%;max-width: 98px' width='98'>
                                  <!--[if mso]></td></tr></table><![endif]-->
                                  </div>

                        
                                                <!--[if (!mso)&(!IE)]><!--></div><!--<![endif]-->
                                                </div>
                                              </div>
                                                <!--[if (mso)|(IE)]></td><td align='center' width='250' style=' width:250px; padding-right: 0px; padding-left: 0px; padding-top:5px; padding-bottom:5px; border-top: 0px solid transparent; border-left: 0px solid transparent; border-bottom: 0px solid transparent; border-right: 0px solid transparent;' valign='top'><![endif]-->
                                              <div class='col num6' style='max-width: 320px;min-width: 250px;display: table-cell;vertical-align: top;'>
                                                <div style='background-color: transparent; width: 100% !important;'>
                                                <!--[if (!mso)&(!IE)]><!--><div style='border-top: 0px solid transparent; border-left: 0px solid transparent; border-bottom: 0px solid transparent; border-right: 0px solid transparent; padding-top:5px; padding-bottom:5px; padding-right: 0px; padding-left: 0px;'><!--<![endif]-->

                        
                                                      <div align='left' class='img-container left  autowidth  fullwidthOnMobile ' style='padding-right: 0px;  padding-left: 0px;'>
                                  <!--[if mso]><table width='100%' cellpadding='0' cellspacing='0' border='0'><tr style='line-height:0px;line-height:0px;'><td style='padding-right: 0px; padding-left: 0px;' align='left'><![endif]-->
                                  <div style='line-height:5px;font-size:1px'>&#160;</div>  <img class='left  autowidth  fullwidthOnMobile' align='left' border='0' src='cid:soleraLogo' alt='Image' title='Image' style='outline: none;text-decoration: none;-ms-interpolation-mode: bicubic;clear: both;display: block !important;border: 0;height: auto;float: none;width: 100%;max-width: 160px' width='160'>
                                  <!--[if mso]></td></tr></table><![endif]-->
                                  </div>

                        
                                                <!--[if (!mso)&(!IE)]><!--></div><!--<![endif]-->
                                                </div>
                                              </div>
                                            <!--[if (mso)|(IE)]></td></tr></table></td></tr></table><![endif]-->
                                          </div>
                                        </div>
                                      </div>
                                      <div style='background-color:#FFFFFF;'>
                                        <div style='Margin: 0 auto;min-width: 320px;max-width: 500px;overflow-wrap: break-word;word-wrap: break-word;word-break: break-word;background-color: transparent;' class='block-grid '>
                                          <div style='border-collapse: collapse;display: table;width: 100%;background-color:transparent;'>
                                            <!--[if (mso)|(IE)]><table width='100%' cellpadding='0' cellspacing='0' border='0'><tr><td style='background-color:#FFFFFF;' align='center'><table cellpadding='0' cellspacing='0' border='0' style='width: 500px;'><tr class='layout-full-width' style='background-color:transparent;'><![endif]-->

                                                <!--[if (mso)|(IE)]><td align='center' width='500' style='background-color:#0068A5; width:500px; padding-right: 0px; padding-left: 0px; padding-top:25px; padding-bottom:25px; border-top: 0px solid transparent; border-left: 0px solid transparent; border-bottom: 0px solid transparent; border-right: 0px solid transparent;' valign='top'><![endif]-->
                                              <div class='col num12' style='min-width: 320px;max-width: 500px;display: table-cell;vertical-align: top;'>
                                                <div style='background-color: #0068A5; width: 100% !important;'>
                                                <!--[if (!mso)&(!IE)]><!--><div style='border-top: 0px solid transparent; border-left: 0px solid transparent; border-bottom: 0px solid transparent; border-right: 0px solid transparent; padding-top:25px; padding-bottom:25px; padding-right: 0px; padding-left: 0px;'><!--<![endif]-->

                        
                                                      <div class=''>
                                    <!--[if mso]><table width='100%' cellpadding='0' cellspacing='0' border='0'><tr><td style='padding-right: 10px; padding-left: 10px; padding-top: 10px; padding-bottom: 10px;'><![endif]-->
                                    <div style='color:#FFFFFF;line-height:120%;font-family:Arial, 'Helvetica Neue', Helvetica, sans-serif; padding-right: 10px; padding-left: 10px; padding-top: 10px; padding-bottom: 10px;'>	
                                      <div style='font-size:12px;line-height:14px;color:#FFFFFF;font-family:Arial, 'Helvetica Neue', Helvetica, sans-serif;text-align:left;'><p style='margin: 0;font-size: 14px;line-height: 17px;text-align: center'>Olá ${payload.customer},</p><p style='margin: 0;font-size: 14px;line-height: 17px;text-align: center'>Você reportou um sinistro do seu veículo com placa ${payload.carPlate}. Para nos ajudar a agilizar sua solicitação, você pode enviar imagens dos danos usando o link seguro abaixo.</p></div>	
                                    </div>
                                    <!--[if mso]></td></tr></table><![endif]-->
                                  </div>
                        
                        
                          
                                  <div align='center' class='button-container center ' style='padding-right: 10px; padding-left: 10px; padding-top:10px; padding-bottom:10px;'>
                                    <!--[if mso]><table width='100%' cellpadding='0' cellspacing='0' border='0' style='border-spacing: 0; border-collapse: collapse; mso-table-lspace:0pt; mso-table-rspace:0pt;'><tr><td style='padding-right: 10px; padding-left: 10px; padding-top:10px; padding-bottom:10px;' align='center'><v:roundrect xmlns:v='urn:schemas-microsoft-com:vml' xmlns:w='urn:schemas-microsoft-com:office:word' href='' style='height:31pt; v-text-anchor:middle; width:238pt;' arcsize='10%' strokecolor='#FFFFFF' fillcolor='#FFFFFF'><w:anchorlock/><v:textbox inset='0,0,0,0'><center style='color:#0068A5; font-family:Arial, 'Helvetica Neue', Helvetica, sans-serif; font-size:16px;'><![endif]-->
                                      <div style='color: #0068A5; background-color: #FFFFFF; border-radius: 4px; -webkit-border-radius: 4px; -moz-border-radius: 4px; max-width: 460px; width: 65%; border-top: 0px solid transparent; border-right: 0px solid transparent; border-bottom: 0px solid transparent; border-left: 0px solid transparent; padding-top: 5px; padding-right: 20px; padding-bottom: 5px; padding-left: 20px; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; text-align: center; mso-border-alt: none;'>
                                        <a href='${config.general.uri + hash}' target='_blank' style='display: block;text-decoration: none;-webkit-text-size-adjust: none;text-align: center;color: #0068A5; background-color: #FFFFFF; border-radius: 4px; -webkit-border-radius: 4px; -moz-border-radius: 4px; max-width: 460px; width: 65%; border-top: 0px solid transparent; border-right: 0px solid transparent; border-bottom: 0px solid transparent; border-left: 0px solid transparent; padding-top: 5px; padding-right: 20px; padding-bottom: 5px; padding-left: 20px; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;mso-border-alt: none'><span style='font-family:Arial, 'Helvetica Neue', Helvetica, sans-serif;font-size:16px;line-height:32px;'>LINK SEGURO</span></a>
                                      </div>
                                    <!--[if mso]></center></v:textbox></v:roundrect></td></tr></table><![endif]-->
                                  </div>

                        
                                                <!--[if (!mso)&(!IE)]><!--></div><!--<![endif]-->
                                                </div>
                                              </div>
                                            <!--[if (mso)|(IE)]></td></tr></table></td></tr></table><![endif]-->
                                          </div>
                                        </div>
                                      </div>
                                      <div style='background-color:transparent;'>
                                        <div style='Margin: 0 auto;min-width: 320px;max-width: 500px;overflow-wrap: break-word;word-wrap: break-word;word-break: break-word;background-color: transparent;' class='block-grid '>
                                          <div style='border-collapse: collapse;display: table;width: 100%;background-color:transparent;'>
                                            <!--[if (mso)|(IE)]><table width='100%' cellpadding='0' cellspacing='0' border='0'><tr><td style='background-color:transparent;' align='center'><table cellpadding='0' cellspacing='0' border='0' style='width: 500px;'><tr class='layout-full-width' style='background-color:transparent;'><![endif]-->

                                                <!--[if (mso)|(IE)]><td align='center' width='500' style=' width:500px; padding-right: 0px; padding-left: 0px; padding-top:5px; padding-bottom:5px; border-top: 0px solid transparent; border-left: 0px solid transparent; border-bottom: 0px solid transparent; border-right: 0px solid transparent;' valign='top'><![endif]-->
                                              <div class='col num12' style='min-width: 320px;max-width: 500px;display: table-cell;vertical-align: top;'>
                                                <div style='background-color: transparent; width: 100% !important;'>
                                                <!--[if (!mso)&(!IE)]><!--><div style='border-top: 0px solid transparent; border-left: 0px solid transparent; border-bottom: 0px solid transparent; border-right: 0px solid transparent; padding-top:5px; padding-bottom:5px; padding-right: 0px; padding-left: 0px;'><!--<![endif]-->

                        
                                                      <div class=''>
                                    <!--[if mso]><table width='100%' cellpadding='0' cellspacing='0' border='0'><tr><td style='padding-right: 10px; padding-left: 10px; padding-top: 10px; padding-bottom: 10px;'><![endif]-->
                                    <div style='color:#555555;line-height:120%;font-family:Arial, 'Helvetica Neue', Helvetica, sans-serif; padding-right: 10px; padding-left: 10px; padding-top: 10px; padding-bottom: 10px;'>	
                                      <div style='font-size:12px;line-height:14px;color:#555555;font-family:Arial, 'Helvetica Neue', Helvetica, sans-serif;text-align:left;'><p style='margin: 0;font-size: 14px;line-height: 17px;text-align: center'>Não responda esta mensagem, ela foi enviada automaticamente.</p></div>	
                                    </div>
                                    <!--[if mso]></td></tr></table><![endif]-->
                                  </div>
                        
                                                <!--[if (!mso)&(!IE)]><!--></div><!--<![endif]-->
                                                </div>
                                              </div>
                                            <!--[if (mso)|(IE)]></td></tr></table></td></tr></table><![endif]-->
                                          </div>
                                        </div>
                                      </div>
                                    <!--[if (mso)|(IE)]></td></tr></table><![endif]-->
                                      </td>
                                    </tr>
                                    </tbody>
                                    </table>
                                    <!--[if (mso)|(IE)]></div><![endif]-->


                                  </body></html>");

                Console.WriteLine("Acho que envio - Esperar");
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
            finally
            {
                Console.ReadLine();
            }
        }
 public AuthController(UserManager <User> userManager, AppDBContext context, ConfigurationService configuration)
 {
     _configuration = configuration;
     _userManager   = userManager;
     _context       = context;
 }
Exemple #50
0
        protected bool SubmitNonWorkItemLinkChanges(
            LinkChangeGroup linkChanges,
            ServiceContainer serviceContainer,
            ConfigurationService configService,
            ITranslationService translationService,
            TfsLinkingProviderBase.LinkSubmissionPhase submissionPhase)
        {
            // group non-WorkItemLink changes by work item Id
            Dictionary <int, List <LinkChangeAction> > perWorkItemLinkChanges = RegroupLinkChangeActions(linkChanges);
            var orderedWorkitemId = new Dictionary <int, int>();
            int index             = 0;

            foreach (int workItemId in perWorkItemLinkChanges.Keys)
            {
                orderedWorkitemId.Add(index++, workItemId);
            }

            // batch-submit links of each work item
            var updateDocs = new List <XmlDocument>(perWorkItemLinkChanges.Count);

            foreach (var perWorkItemLinkChange in perWorkItemLinkChanges)
            {
                if (perWorkItemLinkChange.Value.Count == 0)
                {
                    continue;
                }

                WorkItem workItem = WorkItemStore.GetWorkItem(perWorkItemLinkChange.Key);

                var tfsUpdateDocument = InitializeUpdateDocument();
                tfsUpdateDocument.CreateWorkItemUpdateDoc(workItem);
                bool hasNonWorkItemLinkChanges = false;
                foreach (LinkChangeAction linkChangeAction in perWorkItemLinkChange.Value)
                {
                    if (linkChangeAction.Status != LinkChangeAction.LinkChangeActionStatus.ReadyForMigration ||
                        linkChangeAction.IsConflicted ||
                        linkChangeAction.Link.LinkType is WorkItemLinkTypeBase)
                    {
                        continue;
                    }

                    if (!ProcessActionInCurrentSubmissionPhase(linkChangeAction, submissionPhase))
                    {
                        continue;
                    }

                    hasNonWorkItemLinkChanges = true;
                    var handler = linkChangeAction.Link.LinkType as ILinkHandler;
                    Debug.Assert(null != handler);
                    handler.UpdateTfs(tfsUpdateDocument, linkChangeAction);
                }

                if (hasNonWorkItemLinkChanges)
                {
                    updateDocs.Add(tfsUpdateDocument.UpdateDocument);
                }
            }

            if (updateDocs.Count == 0)
            {
                return(true);
            }

            UpdateResult[] results = TfsBatchUpdateHelper.Submit(Core, WorkItemServer, updateDocs.ToArray());

            if (results.Length != updateDocs.Count)
            {
                throw new SynchronizationEngineException("Wrong number of link update results.");
            }

            bool succeeded = true;

            for (int i = 0; i < results.Length; ++i)
            {
                UpdateResult rslt = results[i];

                if (rslt.Exception != null &&
                    !rslt.Exception.Message.Contains("The specified link already exists"))
                {
                    TraceManager.TraceError(rslt.Exception.ToString());
                    succeeded = false;
                    // TODO
                    // Try resolve conflict and push to backlog if resolution fails
                    foreach (LinkChangeAction action in perWorkItemLinkChanges[orderedWorkitemId[i]])
                    {
                        action.IsConflicted = true;
                    }
                }
                else
                {
                    foreach (LinkChangeAction action in perWorkItemLinkChanges[orderedWorkitemId[i]])
                    {
                        if (ProcessActionInCurrentSubmissionPhase(action, submissionPhase))
                        {
                            MarkLinkChangeActionCompleted(action);
                        }
                    }

                    if (rslt.Exception == null)
                    {
                        UpdateLinkConversionHistory(configService, translationService, rslt, perWorkItemLinkChanges[orderedWorkitemId[i]]);
                    }
                    else if (rslt.Exception.Message.Contains("The specified link already exists"))
                    {
                        WorkItemLinkStore relatedArtifactsStore = new WorkItemLinkStore(configService.SourceId);
                        relatedArtifactsStore.UpdateSyncedLinks(perWorkItemLinkChanges[orderedWorkitemId[i]]);
                    }
                }
            }
            return(succeeded);
        }
    public DataAccess()
    {
        var config = new ConfigurationService();

        _connectionString = config.ConnectionString;
    }
 public MessageReceivedHandler(DiscordSocketClient client, CommandService commands, IServiceProvider services,
                               EmoteChain emoteChain, InternalStatistics internalStatistics, ConfigurationService configurationService,
                               BotState botState)
 {
     Client               = client;
     Commands             = commands;
     Services             = services;
     EmoteChain           = emoteChain;
     InternalStatistics   = internalStatistics;
     ConfigurationService = configurationService;
     BotState             = botState;
 }
        private void ConfigureForAzureStorage(ConfigurationService configuration)
        {
            Bind<ICloudBlobClient>()
                .ToMethod(
                    _ => new CloudBlobClientWrapper(configuration.Current.AzureStorageConnectionString))
                .InSingletonScope();
            Bind<IFileStorageService>()
                .To<CloudBlobFileStorageService>()
                .InSingletonScope();

            // when running on Windows Azure, pull the statistics from the warehouse via storage
            Bind<IReportService>()
                .ToMethod(context => new CloudReportService(configuration.Current.AzureStorageConnectionString))
                .InSingletonScope();
            Bind<IStatisticsService>()
                .To<JsonStatisticsService>()
                .InSingletonScope();
        }
Exemple #54
0
 public static string GetShopUrl(string urlPart)
 {
     return(Url.Combine(ConfigurationService.GetTestEnvironmentSettings().ShopUrl, urlPart));
 }
        private void ConfigureForAzureStorage(ConfigurationService configuration)
        {
            Bind<ICloudBlobClient>()
                .ToMethod(
                    _ => new CloudBlobClientWrapper(configuration.Current.AzureStorageConnectionString))
                .InSingletonScope();
            Bind<IFileStorageService>()
                .To<CloudBlobFileStorageService>()
                .InSingletonScope();

            // when running on Windows Azure, pull the statistics from the warehouse via storage
            Bind<IReportService>()
                .ToMethod(context => new CloudReportService(configuration.Current.AzureStorageConnectionString))
                .InSingletonScope();
            Bind<IStatisticsService>()
                .To<JsonStatisticsService>()
                .InSingletonScope();

            string instanceId;
            try
            {
                instanceId = RoleEnvironment.CurrentRoleInstance.Id;
            }
            catch (Exception)
            {
                instanceId = Environment.MachineName;
            }

            var localIP = AuditActor.GetLocalIP().Result;

            Bind<AuditingService>()
                .ToMethod(_ => new CloudAuditingService(
                    instanceId, localIP, configuration.Current.AzureStorageConnectionString, CloudAuditingService.AspNetActorThunk))
                .InSingletonScope();
        }
Exemple #56
0
 protected virtual void AttachToOwinApp(ConfigurationService config, IAppBuilder app)
 {
 }
        internal void ComputeFieldDelta(
            ChangeGroupService changeGroupService,
            DateTime waterMarkChangeStartTime,
            FieldValueComparer tfsValueComparer,
            ITranslationService translationService,
            ConfigurationService configService,
            List <ChangeGroup> groups,
            IsWorkItemRevisionProcessed processedRevCallBack)
        {
            Guid sourceId = configService.SourceId;

            List <Revision> revsToBeSynced = FindUnsyncedRevisions(waterMarkChangeStartTime,
                                                                   translationService,
                                                                   sourceId,
                                                                   processedRevCallBack);

            Dictionary <int, object> fieldValueBaseline = new Dictionary <int, object>();

            TryEstablishFieldValueBaseline(fieldValueBaseline, revsToBeSynced);

            foreach (Revision rev in revsToBeSynced)
            {
                // get basic revision info: revision#, author#, and change time
                int    revIndex = (int)rev.Fields[CoreField.Rev].Value;
                string author   = (string)rev.Fields[CoreField.ChangedBy].Value;
                if (string.IsNullOrEmpty(author))
                {
                    author = (string)rev.Fields[CoreField.AuthorizedAs].Value;
                }
                DateTime changedDate = (DateTime)rev.Fields[CoreField.ChangedDate].Value;

                List <Field> fieldForSync   = new List <Field>();
                List <Field> skippingFields = new List <Field>();
                foreach (Field f in rev.Fields)
                {
                    // filter out System.History with empty new value
                    if (TFStringComparer.FieldName.Equals(f.ReferenceName, CoreFieldReferenceNames.History))
                    {
                        if (string.IsNullOrEmpty(f.Value as string))
                        {
                            continue;
                        }
                    }

                    if (MustTakeField(f.FieldDefinition))
                    {
                        // find out fields that changed in this revision
                        object oldValue;
                        fieldValueBaseline.TryGetValue(f.Id, out oldValue);
                        //***Note: When it is a new work item (unmatched on the other side),
                        //         we need to always include fields
                        if ((null != f.Value && (!tfsValueComparer.Equals(oldValue, f.Value) || revIndex == 1)) ||
                            (null == f.Value && null != oldValue && revIndex != 1))
                        {
                            fieldForSync.Add(f);
                            fieldValueBaseline[f.Id] = f.Value;
                        }
                        else if (IsReferencedField(f, configService))
                        {
                            skippingFields.Add(f);
                        }
                    }
                    else if (IsReferencedField(f, configService))
                    {
                        skippingFields.Add(f);
                    }
                }

                if (fieldForSync.Count == 0)
                {
                    continue;
                }

                XmlDocument migrationActionDetails = CreateFieldRevisionDescriptionDoc(
                    revIndex, author, changedDate, fieldForSync, skippingFields);

                Guid changeActionId = revIndex == 1 ?
                                      WellKnownChangeActionId.Add : WellKnownChangeActionId.Edit;

                /// TODO: consider batching revs of different workitems in one change group
                ChangeGroup changeGroup = changeGroupService.CreateChangeGroupForDeltaTable(
                    string.Format("{0}:{1}", WorkItem.Id, revIndex));
                IMigrationAction action = changeGroup.CreateAction(
                    changeActionId,
                    new TfsWITMigrationItem(WorkItem, revIndex),
                    WorkItem.Id.ToString(),
                    "",
                    revIndex.ToString(),
                    "",
                    WellKnownContentType.WorkItem.ReferenceName,
                    migrationActionDetails);

                groups.Add(changeGroup);
            }
        }
Exemple #58
0
 public V1Feed(IEntitiesContext entities, IEntityRepository <Package> repo, ConfigurationService configuration, ISearchService searchService)
     : base(entities, repo, configuration, searchService)
 {
 }
Exemple #59
0
 // Configuration Logic
 public virtual void Configure(ConfigurationService config)
 {
     BaseConfig = config.ResolveConfigObject(BaseConfig, AuthPrefix + Name + ".");
 }
Exemple #60
0
 public SiteMapController(IQueryBus queryBus, ConfigurationService configurationService)
 {
     _queryBus             = queryBus;
     _configurationService = configurationService;
 }