ConstructAsync() статический приватный Метод

Asynchronously constructs a line map from a snapshot and code.
static private ConstructAsync ( ITextSnapshot snapshot, string code, CancellationToken cancelToken ) : Task
snapshot ITextSnapshot The current text snapshot.
code string The code to derive a line map from.
cancelToken System.Threading.CancellationToken Cancellation token.
Результат Task
Пример #1
0
        private async Task AdornCode(ITextSnapshot snapshot, string code, IDictionary <int, MethodCall> methods, CancellationToken cancelToken = default(CancellationToken))
        {
            try
            {
                if (this.context.LineMap == null)
                {
                    if ((this.context.LineMap = await LineMap.ConstructAsync(snapshot, code, cancelToken)) == null)
                    {
                        return;
                    }
                }

                // TODO: Threads
                MethodCall container = methods.Values.First();
                AdornOperationContainer(container, snapshot, this.context.LineMap, cancelToken);

                foreach (ViewCache viewCache in this.views.Values)
                {
                    InstantView[] cleared = viewCache.ClearViews();
                    for (int i = 0; i < cleared.Length; i++)
                    {
                        this.layer.RemoveAdornment(cleared[i]);
                    }
                }
            }
            catch (OperationCanceledException)
            {
            }
        }