예제 #1
0
        // POST api/values
        public IEnumerable <int> Post([FromBody] CacheRequestMessage value)
        {
            //int[] a = store.Search(x => x.Contains("abc"));

            //////createDynamic();

            //////if (_client.State == WebSocketState.Open)
            //////{
            //////    string msg = Guid.NewGuid().ToString();
            //////    ArraySegment<byte> bytesToSend = new ArraySegment<byte>(System.Text.Encoding.UTF8.GetBytes(msg));
            //////    _client.SendAsync(bytesToSend, WebSocketMessageType.Text, true, CancellationToken.None).Wait();
            //////}

            HelloReply response = _client.SayHello(HelloRequest.CreateBuilder().SetName(Guid.NewGuid().ToString()).Build());

            Debug.WriteLine("OK: " + response.Message);

            return(new int[] { 3, 4, 5, 6 });
        }
예제 #2
0
 // POST api/values
 public IEnumerable <int> Post([FromBody] CacheRequestMessage value)
 {
     int[] a = store.SearchDynamic(value.Condition);
     return(a);
 }
 // POST api/values
 public IEnumerable <int> Post([FromBody] CacheRequestMessage value)
 {
     int[] a = store.Search(x => x.Contains("abc"));
     return(a);
 }