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')")); }
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")); }
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); } }
private void tbSingleResourceKind_TextChanged(object sender, EventArgs e) { _sdataSingleResourceRequest.ResourceKind = tbSingleResourceKind.Text; tbSingleURL.Text = _sdataSingleResourceRequest.ToString(); }