Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            XmlConfigurator.Configure();

            var hostUrl     = ConfigurationManager.AppSettings["ExplorerHostUrl"];
            var defaultLink = ConfigurationManager.AppSettings["DefaultLink"];

            var availableLanguageCultures = new List <string> {
                "en-GB"
            };
            var availableFormattingCultures = new List <FormattingCulture>
            {
                new FormattingCulture("en-GB", new List <string>
                {
                    "dd/MM/yyyy HH:mm",
                    "dd MMMM yyyy HH:mm:ss",
                    "dd/MM/yyyy HH:mm:ss",
                    "dd-MM-yyyy HH:mm:ss",
                    "dd-MMM-yyyy HH:mm:ss",
                    "dd MMM yyyy HH:mm:ss"
                },
                                      new List <string>
                {
                    "dd/MM/yyyy",
                    "dd MMMM yyyy",
                    "dd MMMM",
                    "MMMM yyyy",
                    "dd-MM-yyyy",
                    "dd-MMM-yyyy",
                    "dd MMM yyyy"
                })
            };

            IResourceQuerier resourceQuerier = new ResourceQuerier(typeof(BWF.Globalisation.Resources).Assembly);
            var globalisationProvider        = new GlobalisationProvider(resourceQuerier, availableLanguageCultures, availableFormattingCultures);

            IExplorerHostSettings explorerHostSettings =
                new ExplorerHostSettings(
                    Constants.DataServiceName,        // service name
                    Constants.DataServiceDisplayName, // service display name
                    Constants.DataServiceDescription, // service description
                    hostUrl,
                    defaultLink,
                    globalisationProvider);

            var explorerHost = new BWF.Explorer.StartUp.Concrete.ExplorerHost(explorerHostSettings);

            explorerHost.Start();
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            XmlConfigurator.Configure();
            var hostUrl = ConfigurationManager.AppSettings["ExplorerHostUrl"];

            var availableLanguageCultures = new List <string> {
                "en-GB"
            };
            var availableFormattingCultures = new List <FormattingCulture>
            {
                new FormattingCulture("en-GB", new List <string>
                {
                    "dd/MM/yyyy HH:mm",
                    "dd MMMM yyyy HH:mm:ss",
                    "dd/MM/yyyy HH:mm:ss",
                    "dd-MM-yyyy HH:mm:ss",
                    "dd-MMM-yyyy HH:mm:ss",
                    "dd MMM yyyy HH:mm:ss"
                },
                                      new List <string>
                {
                    "dd/MM/yyyy",
                    "dd MMMM yyyy",
                    "dd MMMM",
                    "MMMM yyyy",
                    "dd-MM-yyyy",
                    "dd-MMM-yyyy",
                    "dd MMM yyyy"
                })
            };

            IResourceQuerier resourceQuerier = new ResourceQuerier(typeof(BWF.Globalisation.Resources).Assembly);
            var globalisationProvider        = new GlobalisationProvider(resourceQuerier, availableLanguageCultures, availableFormattingCultures);

            IExplorerHostSettings explorerHostSettings =
                new ExplorerHostSettings(
                    "BwfBCRExplorerHost",                 // service name
                    "BWF BCR Explorer Host Service",      // service display name
                    "Brady Credit Risk Host for the BWF", // service description
                    hostUrl,
                    globalisationProvider);

            var explorerHost = new BWF.Explorer.StartUp.Concrete.ExplorerHost(explorerHostSettings);

            explorerHost.Start();
        }
Ejemplo n.º 3
0
        static void Main(string[] args)
        {
            var availableCultures = new Cultures();
            var settings          = new Settings();

            XmlConfigurator.Configure();

            var hostUrl     = settings.ExplorerHostUrl;
            var defaultLink = settings.DefaultLink;

            IResourceQuerier resourceQuerier = new ResourceQuerier(typeof(BWF.Globalisation.Resources).Assembly);
            var globalisationProvider        = new GlobalisationProvider(resourceQuerier, availableCultures.LanguageCultures, availableCultures.FormattingCultures);

            IExplorerHostSettings explorerHostSettings = new ExplorerHostSettings(settings.ServiceName, settings.ServiceDisplayName, settings.ServiceDescription, hostUrl, defaultLink, globalisationProvider);
            var explorerHost = new BWF.Explorer.StartUp.Concrete.ExplorerHost(explorerHostSettings);

            explorerHost.Start();
        }
Ejemplo n.º 4
0
        static void Main(string[] args)
        {
            var availableCultures = new Cultures();
            var settings          = new Settings();

            XmlConfigurator.Configure();

            var hostUrl = settings.ExplorerHostUrl;

            IResourceQuerier resourceQuerier = new ResourceQuerier(typeof(BWF.Globalisation.Resources).Assembly);
            var globalisationProvider        = new GlobalisationProvider(resourceQuerier, availableCultures.LanguageCultures, availableCultures.FormattingCultures);
            var currentDirectory             = AppDomain.CurrentDomain.BaseDirectory;
            var menuFile     = "Brady.Trade.DataService.TestHost.Menu.Menu.json";
            var menuProvider = new JsonMenuProvider(menuFile, Assembly.GetExecutingAssembly());

            IExplorerHostSettings explorerHostSettings = new ExplorerHostSettings("Brady.Trade.DataService.TestHost", "Brady Trade Data Service Host", "Host for the Brady Trade Data Service", hostUrl, menuProvider, globalisationProvider);
            var explorerHost = new BWF.Explorer.StartUp.Concrete.ExplorerHost(explorerHostSettings);

            explorerHost.Start();
        }