public void SetUp()
 {
     snippetGenerator = new SnippetGenerator(true);
     var loader = new CecilLoader();
     loader.IncludeInternalMembers = true;
     myLib = loader.LoadAssemblyFile(typeof(SnippetGenerationTests).Assembly.Location);
     mscorlib = loader.LoadAssemblyFile(typeof(object).Assembly.Location);
     compilation = new SimpleCompilation(myLib, mscorlib);
 }
        private void AddMethodHeader(CompletionData completionData, IMethod method)
        {
            var methodDefinition = method.MemberDefinition;

            if (_wantMethodHeader)
            {
                var snippetGenerator = new SnippetGenerator(false);
                completionData.MethodHeader = snippetGenerator.Generate(methodDefinition);
            }

            if (_wantSnippet)
            {
                var snippetGenerator = new SnippetGenerator(true);
                completionData.Snippet = snippetGenerator.Generate(methodDefinition);
            }

            if (_wantReturnType)
            {
                completionData.ReturnType = _returnTypeAmbience.ConvertSymbol(method);
            }
        }
        private void AddMethodHeader(CompletionData completionData, IMethod method)
        {
            var methodDefinition = method.MemberDefinition;

            if (_wantMethodHeader)
            {
                var snippetGenerator = new SnippetGenerator(false);
                completionData.MethodHeader = snippetGenerator.Generate(methodDefinition);
            }

            if (_wantSnippet)
            {
                var snippetGenerator = new SnippetGenerator(true);
                completionData.Snippet = snippetGenerator.Generate(methodDefinition);
            }

            if (_wantReturnType)
            {

                var returnTypeAmbience = new CSharpAmbience { ConversionFlags = ConversionFlags.ShowReturnType };
                completionData.ReturnType = returnTypeAmbience.ConvertSymbol(method).Split(' ').First();
            }
        }
        private void AddMethodHeader(CompletionData completionData, IMethod method)
        {
            var methodDefinition = method.MemberDefinition;

            if (_wantMethodHeader)
            {
                var snippetGenerator = new SnippetGenerator(false);
                completionData.MethodHeader = snippetGenerator.Generate(methodDefinition);
            }

            if (_wantSnippet)
            {
                var snippetGenerator = new SnippetGenerator(true);
                completionData.Snippet = snippetGenerator.Generate(methodDefinition);
            }

            if (_wantReturnType)
            {
                completionData.ReturnType = _returnTypeAmbience.ConvertSymbol(method);
            }
        }