public bool Is(out Provide provide) { var ret = this.which == Union.provide; provide = ret ? this.provide : default(Provide); return(ret); }
public ProvideIEF(Provide obj, my_db_for_db_2Entities _db) { InitializeComponent(); db = _db; addressBindingSource.DataSource = db.Address.ToList(); provideBindingSource.DataSource = db.Provide.ToList(); if (obj == null) { provideBindingSource.DataSource = new Provide(); db.Provide.Add(provideBindingSource.Current as Provide); } else { provideBindingSource.DataSource = obj; db.Provide.Attach(provideBindingSource.Current as Provide); } }
public async Task <ActionResult <HttpResponseMessage> > PostProvide(Share share) { var providedShare = new Provide() { ProviderId = Guid.NewGuid(), TraderId = share.TraderId, Stock = share.Stock, StockId = share.ShareId, StockValue = share.Value }; var client = _clientFactory.CreateClient("ProviderService"); var content = JsonConvert.SerializeObject(providedShare); var stringContent = new StringContent(content, Encoding.UTF8, "application/json"); var response = await client.PostAsync(client.BaseAddress + "Provider", stringContent); return(response); }
public StorageValueProvider(Action <StorageValueContainer> provider, Provide mode = Provide.WhenNull) { _provider = provider; Mode = mode; }
public StorageValueProvider(Action<StorageValueContainer> provider, Provide mode = Provide.WhenNull) { _provider = provider; Mode = mode; }