private IEnumerable <string> DocumentsFor(MethodDefinition methodDefinition)
        {
            CollectSourceDocumentsVisitor visitor = new CollectSourceDocumentsVisitor();

            methodDefinition.Accept(visitor);
            return(visitor.Documents);
        }
Example #2
0
 /// <summary>
 /// Write a method signature to the text buffer
 /// </summary>
 /// <param name="mdef">Method definition</param>
 protected override void WriteMethodSignature(MethodDefinition mdef)
 {
     if (IsUnsafe(mdef))
     {
         WriteComment("This method is 'unsafe' and cannot be used in VB.NET");
         Write(COMMENT);
     }
     mdef.Accept(this);
     if (mdef.ReturnType.FullName != typeof(void).FullName)
     {
         Write(EVisualBasicKeyword.As, ESpaceSurrounder.Both);
         VisitTypeReference(mdef.ReturnType);
     }
 }
Example #3
0
        /// <summary>
        /// Write a method signature to the text buffer
        /// </summary>
        /// <param name="mdef">Method definition</param>
        protected override void WriteMethodSignature(MethodDefinition mdef)
        {
            mdef.Accept(this);

            if (mdef.GenericParameters.Count <= 0)
            {
                return;
            }

            foreach (var genparam in mdef.GenericParameters.Where(genparam => genparam.Constraints.Count > 0))
            {
                Write(ECSharpKeyword.@where, ESpaceSurrounder.Both);
                genparam.Accept(this);
                VisitVisitableCollection(GenericConstraintListStart, String.Empty, BasicSeparator, false, genparam.Constraints);
            }
        }
Example #4
0
        /// <summary>
        /// Write a method signature to the text buffer
        /// </summary>
        /// <param name="mdef">Method definition</param>
        protected override void WriteMethodSignature(MethodDefinition mdef)
        {
            mdef.Accept(this);

            if (mdef.GenericParameters.Count > 0)
            {
                foreach (GenericParameter genparam in mdef.GenericParameters)
                {
                    if (genparam.Constraints.Count > 0)
                    {
                        Write(ECSharpKeyword.@where, ESpaceSurrounder.Both);
                        genparam.Accept(this);
                        VisitVisitableCollection(GENERIC_CONSTRAINT_LIST_START, String.Empty, BASIC_SEPARATOR, false, genparam.Constraints);
                    }
                }
            }
        }