Exemplo n.º 1
0
        public RegisterViewModel(IThemeControl themeControl, IApiConsumer apiConsumer) : base(themeControl)
        {
            Model        = new SignUpModel();
            _apiConsumer = apiConsumer;

            SubmitCmd = BuildCommand(SubmitAsync);
        }
Exemplo n.º 2
0
 public SignUpFlowViewModel(IApiConsumer apiConsumer, IThemeControl themeControl)
 {
     Inputs = new ObservableCollection <SignUpInputContext> {
         BuildEmailContext()
     };
     _apiConsumer  = apiConsumer;
     _themeControl = themeControl;
 }
Exemplo n.º 3
0
        /// <inheritdoc />
        public void Add <TKey, TValue>([NotNull] IIngressApi api, [NotNull] IApiConsumer <TKey, TValue> consumer)
        {
            if (api == null)
            {
                throw new ArgumentNullException(nameof(api));
            }
            if (consumer == null)
            {
                throw new ArgumentNullException(nameof(consumer));
            }

            if (!_consumers.TryAdd(api, consumer))
            {
                throw new PoezdConfigurationException($"An ingress API with ID '{api.Id}' and its consumer already registered.");
            }
        }
Exemplo n.º 4
0
        static void Main(string[] args)
        {
            string       url          = ConfigurationManager.AppSettings["ApiURL"];
            string       consumerType = ConfigurationManager.AppSettings["ConsumerType"].ToLower();
            IApiConsumer consumer     = null;

            if (consumerType == "console")
            {
                consumer = new ConsoleConsumer();
            }
            else if (consumerType == "Database")
            {
                consumer = new DBConsumer();
            }

            ApiClient client = new ApiClient(url, consumer);

            client.CallApi();
        }
Exemplo n.º 5
0
 public ApiClient(string apiURL, IApiConsumer consumer)
 {
     _apiURL   = apiURL;
     _consumer = consumer;
 }
Exemplo n.º 6
0
 public ProjectsConsumer(IApiConsumer api)
 {
     this.api = api;
 }
Exemplo n.º 7
0
 public ProjectsConsumer(HttpClient http, IJSRuntime js)
 {
     api = new Consumer(http, js);
 }
Exemplo n.º 8
0
 public ResultController(IApiConsumer dopplerStore)
 {
     _dopplerStore = dopplerStore;
 }
Exemplo n.º 9
0
 public LocationRepo(IApiConsumer apiConsumer)
 {
     _apiConsumer = apiConsumer;
 }
Exemplo n.º 10
0
 public LocationController(IApiConsumer apiConsumer)
 {
     _apiConsumer = apiConsumer;
 }
Exemplo n.º 11
0
 public LocationRepoTests()
 {
     _apiConsumer  = new ApiConsumer(BaseUrl);
     _locationRepo = new LocationRepo(_apiConsumer);
 }
Exemplo n.º 12
0
 public JwtAuthorizeAttribute()
 {
     _apiConsumer = new ApiConsumer();
 }
Exemplo n.º 13
0
 public UsersConsumer(IApiConsumer api, NavigationManager navManager)
 {
     this.api        = api;
     this.navManager = navManager;
 }
Exemplo n.º 14
0
 public UsersConsumer(HttpClient http, IJSRuntime js, NavigationManager navManager)
 {
     api             = new Consumer(http, js);
     this.navManager = navManager;
 }