Exemple #1
0
        private ScopeInfo GetScopeInfo()
        {
            string oldText = _evaluatable.Text;

            _evaluatable.Text = String.Empty;
            try
            {
                ScopeInfoBuilder builder = new ScopeInfoBuilder();

                ICodeAssistanceContextProvider codeAssistanceContextProvider = _evaluatable.GetCodeAssistanceContextProvider();
                IMemberCompletionContext       context = codeAssistanceContextProvider.ProvideMemberCompletionContext(SourceLocation.Empty);
                context.Enumerate(builder);

                return(builder.GetScopeInfo());
            }
            finally
            {
                _evaluatable.Text = oldText;
            }
        }
Exemple #2
0
		private ScopeInfo GetScopeInfo()
		{
			string oldText = _evaluatable.Text;
			_evaluatable.Text = String.Empty;
			try
			{
				ScopeInfoBuilder builder = new ScopeInfoBuilder();

				ICodeAssistanceContextProvider codeAssistanceContextProvider = _evaluatable.GetCodeAssistanceContextProvider();
				IMemberCompletionContext context = codeAssistanceContextProvider.ProvideMemberCompletionContext(SourceLocation.Empty);
				context.Enumerate(builder);

				return builder.GetScopeInfo();
			}
			finally
			{
				_evaluatable.Text = oldText;
			}
		}