public override ICodeCompletionBinding CreateCompletionBinding(string expressionToComplete, ICodeContext context)
		{
			if (context == null)
				throw new ArgumentNullException("context");
			string content = GeneratePartialClassContextStub(context);
			const string caretPoint = "$__Caret_Point__$;";
			int caretOffset = content.IndexOf(caretPoint, StringComparison.Ordinal) + expressionToComplete.Length;
			SD.Log.DebugFormatted("context used for dot completion: {0}", content.Replace(caretPoint, "$" + expressionToComplete + "|$"));
			var doc = new ReadOnlyDocument(content.Replace(caretPoint, expressionToComplete));
			return new CSharpCompletionBinding(context, doc.GetLocation(caretOffset), doc.CreateSnapshot());
		}
        public override ICodeCompletionBinding CreateCompletionBinding(string expressionToComplete, ICodeContext context)
        {
            if (context == null)
            {
                throw new ArgumentNullException("context");
            }
            string       content     = GeneratePartialClassContextStub(context);
            const string caretPoint  = "$__Caret_Point__$;";
            int          caretOffset = content.IndexOf(caretPoint, StringComparison.Ordinal) + expressionToComplete.Length;

            SD.Log.DebugFormatted("context used for dot completion: {0}", content.Replace(caretPoint, "$" + expressionToComplete + "|$"));
            var doc = new ReadOnlyDocument(content.Replace(caretPoint, expressionToComplete));

            return(new AlCompletionBinding(context, doc.GetLocation(caretOffset), doc.CreateSnapshot()));
        }
        public static ICodeCompletionBinding PrepareDotCompletion(string expressionToComplete, DebuggerCompletionContext context)
        {
            var lang = SD.LanguageService.GetLanguageByFileName(context.FileName);

            if (lang == null)
            {
                return(null);
            }
            string       content     = GeneratePartialClassContextStub(context);
            const string caretPoint  = "$__Caret_Point__$;";
            int          caretOffset = content.IndexOf(caretPoint, StringComparison.Ordinal) + expressionToComplete.Length;

            SD.Log.DebugFormatted("context used for dot completion: {0}", content.Replace(caretPoint, "$" + expressionToComplete + "|$"));
            var doc = new ReadOnlyDocument(content.Replace(caretPoint, expressionToComplete));

            return(lang.CreateCompletionBinding(context.FileName, doc.GetLocation(caretOffset), doc.CreateSnapshot()));
        }