示例#1
0
    public User findUserByTemplate()
    {
        User user = new User();

        user.Name = "John Dow";
        return(proxy.Read <User>(user));
    }
示例#2
0
    public void partialUpdate()
    {
        service.partialUpdate();

        User user = new User();

        user.Id = 1L;

        User u = proxy.Read(user);

        Assert.AreEqual(EAccountStatus.BLOCKED, u.Status);
    }
示例#3
0
        public void postPayment()
        {
            // Create a payment
            Payment payment = new Payment();

            payment.CreatedDate   = new DateTime();
            payment.MerchantId    = 1L;
            payment.PaymentAmount = 120.70;
            payment.Status        = ETransactionStatus.NEW;


            Console.WriteLine(payment.Status);

            // write the payment into the space
            proxy.Write(payment);

            Thread.Sleep(10000);

            SqlQuery <Payment> query = new SqlQuery <Payment>("MerchantId=1");

            payment = proxy.Read <Payment>(query);

            Assert.AreEqual(payment.Status, ETransactionStatus.PROCESSED);

            Console.WriteLine(payment.Status);
        }
示例#4
0
        private TickInfo.TickInfo ReadTick(String symbol)
        {
            // reading the TickInfo from the Space

            TickInfo.TickInfo template = new TickInfo.TickInfo();
            template.Symbol = symbol;

            TickInfo.TickInfo tick = _proxy.Read <TickInfo.TickInfo>(template);
            return(tick);
        }