예제 #1
0
        public ActionResult Index()
        {
            var service = new ProviderService();
            var model   = service.GetProviders();

            return(View(model));
        }
예제 #2
0
        public IActionResult GetProviders()
        {
            var descriptors = ProviderService.GetProviders()
                              .Select(kv => MetadataService.GetMetadata(kv.Value))
                              .ToList();

            return(Ok(descriptors));
        }
예제 #3
0
        static void GetProviders(ProviderService serv)
        {
            ProviderService service = serv;

            foreach (var i in service.GetProviders())
            {
                Console.WriteLine("ID - {0}  ; Name - {1}  ; Adress -  {2} .", i.Id, i.Name, i.Adress);
            }
        }
        public void PresenterProviders()
        {
            ProviderListResponse providerList = providerService.GetProviders();

            if (providerList.Success)
            {
                _view.SuccessProvider(providerList.ListProvider);
            }
            else
            {
                _view.ErrorProvider(string.Format("{0}", providerList.Exception.Message));
            }
        }
예제 #5
0
        static SpyglassMongoContext()
        {
            var providers = ProviderService.GetProviders();

            foreach (var provider in providers)
            {
                var map = new BsonClassMap(provider.Value);
                map.AutoMap();
                map.SetDiscriminator(provider.Value.Name);

                if (!BsonClassMap.IsClassMapRegistered(provider.Value))
                {
                    BsonClassMap.RegisterClassMap(map);
                }
            }
        }