public static async Task <JsonObject> ChangesAsync(this SalesforceClient self, string type, ChangeTypes kind) { var request = new ChangesRequest { Resource = new SObject { Id = kind.ToString().ToLowerInvariant(), ResourceName = type }, }; return(await self.ChangesAsync(request)); }
public static ChangeLocation Create(Uri loc, DateTime lastmod, ChangeTypes change, ChangeFrequencies?changeFrequency = null, IDictionary <string, string> properties = null) { return(new ChangeLocation { Url = loc, LastModified = lastmod, Metadata = new ResourceSyncMetadata { Change = change.ToString(), Properties = properties?.ToDictionary(kvp => kvp.Key, kvp => kvp.Value) }, ChangeFrequency = changeFrequency, Priority = 1 }); }
public static JsonObject Changes(this SalesforceClient self, string type, ChangeTypes kind) { var request = new ChangesRequest { Resource = new SObject { Id = kind.ToString().ToLowerInvariant(), ResourceName = type } }; var result = self.ChangesAsync(request); if (!result.Wait(TimeSpan.FromSeconds(SalesforceClient.DefaultNetworkTimeout))) { return(null); // TODO : Error handling/reporting } return(result.Result); }
public static async Task<JsonObject> ChangesAsync (this SalesforceClient self, string type, ChangeTypes kind) { var request = new ChangesRequest { Resource = new SObject { Id = kind.ToString().ToLowerInvariant(), ResourceName = type}, }; return await self.ChangesAsync (request); }
public static JsonObject Changes (this SalesforceClient self, string type, ChangeTypes kind) { var request = new ChangesRequest { Resource = new SObject { Id = kind.ToString().ToLowerInvariant(), ResourceName = type} }; var result = self.ChangesAsync (request); if (!result.Wait (TimeSpan.FromSeconds (SalesforceClient.DefaultNetworkTimeout))) return null; // TODO : Error handling/reporting return result.Result; }