/// <summary> /// Lists all of the available Microsoft.Features REST API operations. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='nextPageLink'> /// The NextLink from the previous successful call to List operation. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <Operation> > ListOperationsNextAsync(this IFeatureClient operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListOperationsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Interprets the object and reports the findings to the client. /// </summary> /// <param name="client"></param> /// <param name="geo"></param> public void Interpret(IFeatureClient client, OsmGeo geo) { // call the onbefore function client.OnBeforeInterpretation(geo); // interpret the object. bool succes = _root_feature.Interpret(geo,client); // call the onafter function client.OnAfterInterpretation(succes,geo); }
/// <summary> /// Lists all of the available Microsoft.Features REST API operations. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='nextPageLink'> /// The NextLink from the previous successful call to List operation. /// </param> public static IPage <Operation> ListOperationsNext(this IFeatureClient operations, string nextPageLink) { return(operations.ListOperationsNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// Lists all of the available Microsoft.Features REST API operations. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> public static IPage <Operation> ListOperations(this IFeatureClient operations) { return(operations.ListOperationsAsync().GetAwaiter().GetResult()); }
/// <summary> /// Interprets a feature and reports to the client if the feature matches the filter. /// </summary> /// <param name="obj"></param> /// <param name="client"></param> /// <returns></returns> public bool Interpret( OsmGeo obj, IFeatureClient client) { if (_filter.Evaluate(obj)) { // add the meta tags. Dictionary<string,string> meta = new Dictionary<string,string>(); foreach(string value in _meta.Keys) { meta.Add(value,string.Empty); // check all the tags in the list. foreach(string tag in _meta[value]) { if(obj.Tags.ContainsKey(value)) { string tag_value = obj.Tags["tag"]; if(tag_value != null && tag_value.Length > 0) { meta[value] = tag_value; } } } } // report the interpretation succes. client.InterpretationSucces(_path, obj, meta); return true; } return false; }