예제 #1
0
파일: rpc.g.cs 프로젝트: aemmett/capnpnet
        public bool Is(out Provide provide)
        {
            var ret = this.which == Union.provide;

            provide = ret ? this.provide : default(Provide);
            return(ret);
        }
예제 #2
0
 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);
     }
 }
예제 #3
0
        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);
        }
예제 #4
0
 public StorageValueProvider(Action <StorageValueContainer> provider, Provide mode = Provide.WhenNull)
 {
     _provider = provider;
     Mode      = mode;
 }
예제 #5
0
 public StorageValueProvider(Action<StorageValueContainer> provider, Provide mode = Provide.WhenNull)
 {
     _provider = provider;
     Mode = mode;
 }