internal ServiceMethodGroup(IGengoClient client) { if (client == null) throw new ArgumentNullException("client"); _client = client; }
internal JobMethodGroup(IGengoClient client) { if (client == null) { throw new ArgumentNullException("client"); } _client = client; }
internal static async Task <JsonT> GetJsonPropertyAsync <JsonT>( this IGengoClient client, string propName, String uriPart, bool authenticated ) where JsonT : JToken { var data = await client.GetJsonAsync <JObject>(uriPart, authenticated); if (data == null) { throw new Exception( "Remote service did not return object."); } var result = data[propName] as JsonT; if (result == null) { throw new Exception( "Object returned by remote service did not have property " + propName + " of type " + typeof(JsonT).Name); } return(result); }