コード例 #1
0
        public async Task FindLiteralReferencesAsync(object value)
        {
            var solution = await GetSolutionAsync().ConfigureAwait(false);

            var progressCallback = new FindLiteralReferencesProgressCallback(this);
            await SymbolFinder.FindLiteralReferencesInCurrentProcessAsync(
                value, solution, progressCallback, CancellationToken).ConfigureAwait(false);
        }
コード例 #2
0
        public async Task FindLiteralReferencesAsync(object value, TypeCode typeCode)
        {
            var convertedType = System.Convert.ChangeType(value, typeCode);
            var solution      = await GetSolutionAsync().ConfigureAwait(false);

            var progressCallback = new FindLiteralReferencesProgressCallback(this);
            await SymbolFinder.FindLiteralReferencesInCurrentProcessAsync(
                convertedType, solution, progressCallback, CancellationToken).ConfigureAwait(false);
        }
コード例 #3
0
        public Task FindLiteralReferencesAsync(object value, TypeCode typeCode, CancellationToken cancellationToken)
        {
            return(RunServiceAsync(async token =>
            {
                using (UserOperationBooster.Boost())
                {
                    var convertedType = System.Convert.ChangeType(value, typeCode);
                    var solution = await GetSolutionAsync(token).ConfigureAwait(false);

                    var progressCallback = new FindLiteralReferencesProgressCallback(this);
                    await SymbolFinder.FindLiteralReferencesInCurrentProcessAsync(
                        convertedType, solution, progressCallback, token).ConfigureAwait(false);
                }
            }, cancellationToken));
        }