コード例 #1
0
        /// <summary>
        /// Triggers removal of local location from the content tracker.
        /// </summary>
        public async Task <StructResult <long> > RemoveFromTrackerAsync(Context context)
        {
            RemoveFromTrackerResponse response = await RunClientActionAndThrowIfFailedAsync(context, async() => await _client.RemoveFromTrackerAsync(new RemoveFromTrackerRequest {
                TraceId = context.Id.ToString()
            }));

            if (response.Header.Succeeded)
            {
                return(new StructResult <long>(response.FilesEvicted));
            }
            else
            {
                return(new StructResult <long>(response.Header.ErrorMessage, response.Header.Diagnostics));
            }
        }
コード例 #2
0
        /// <summary>
        /// Triggers removal of local location from the content tracker.
        /// </summary>
        public async Task <BoolResult> RemoveFromTrackerAsync(Context context)
        {
            RemoveFromTrackerResponse response = await RunClientActionAndThrowIfFailedAsync(context, async() => await _client.RemoveFromTrackerAsync(new RemoveFromTrackerRequest {
                TraceId = context.TraceId
            }));

            if (response.Header.Succeeded)
            {
                return(BoolResult.Success);
            }
            else
            {
                return(new BoolResult(response.Header.ErrorMessage, response.Header.Diagnostics));
            }
        }