public void TestSearchReferences() { int id = Create(); Console.WriteLine("Reference: {0}", id); TransitReferenceQueryOptions options = new TransitReferenceQueryOptions(); options.SearchQuery = mReference.Word; int count = Blog.SearchReferencesCount(Ticket, options); Console.WriteLine("Count: {0}", count); Assert.IsTrue(count > 0, "Invalid count, no references returned."); TransitReference[] refs = Blog.SearchReferences(Ticket, options); Assert.IsNotNull(refs, "Invalid references returned."); Assert.AreEqual(refs.Length, count); Delete(); }
/// <remarks/> public void SearchReferencesCountAsync(string ticket, TransitReferenceQueryOptions options, object userState) { if ((this.SearchReferencesCountOperationCompleted == null)) { this.SearchReferencesCountOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSearchReferencesCountOperationCompleted); } this.InvokeAsync("SearchReferencesCount", new object[] { ticket, options}, this.SearchReferencesCountOperationCompleted, userState); }
public int SearchReferencesCount(string ticket, TransitReferenceQueryOptions options) { object[] results = this.Invoke("SearchReferencesCount", new object[] { ticket, options}); return ((int)(results[0])); }
/// <remarks/> public void SearchReferencesCountAsync(string ticket, TransitReferenceQueryOptions options) { this.SearchReferencesCountAsync(ticket, options, null); }
public TransitReference[] SearchReferences(string ticket, TransitReferenceQueryOptions options) { object[] results = this.Invoke("SearchReferences", new object[] { ticket, options}); return ((TransitReference[])(results[0])); }