コード例 #1
0
        public void SingleResource_Verify_ToStringWithResourceKind()
        {
            var request = new SDataSingleResourceRequest(_service)
            {
                ResourceKind     = "employees",
                ResourceSelector = "id eq '1234'"
            };

            var url = request.ToString();

            Expect(url, Is.EqualTo("http://localhost:59213/sdata/aw/dynamic/-/employees(id eq '1234')"));
        }
コード例 #2
0
        public void SingleResource_Verify_ToStringWithResourceKindAndInclude()
        {
            var request = new SDataSingleResourceRequest(_service)
            {
                ResourceKind     = "employees",
                ResourceSelector = "1",
                Include          = "contact"
            };

            var url = request.ToString();

            Expect(url, Is.EqualTo("http://localhost:59213/sdata/aw/dynamic/-/employees(1)?include=contact"));
        }
コード例 #3
0
 public override void Refresh()
 {
     try
     {
         _sdataSingleResourceRequest = new SDataSingleResourceRequest(Service)
         {
             ResourceKind     = tbSingleResourceKind.Text,
             ResourceSelector = tbSingleResourceSelector.Text
         };
         tbSingleURL.Text = _sdataSingleResourceRequest.ToString();
     }
     catch (SDataClientException ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
コード例 #4
0
 private void tbSingleResourceKind_TextChanged(object sender, EventArgs e)
 {
     _sdataSingleResourceRequest.ResourceKind = tbSingleResourceKind.Text;
     tbSingleURL.Text = _sdataSingleResourceRequest.ToString();
 }