コード例 #1
0
 private static bool HasServicingAttribute(Mono.Collections.Generic.Collection<CustomAttribute> asmAttrs)
 {
     var servicingAttributes = asmAttrs.Where(asmAttr => IsValidServicingAttribute(asmAttr));
     return servicingAttributes.Count() == 1;
 }
コード例 #2
0
        /// <summary>
        /// Write methods stubs to the text buffer
        /// </summary>
        /// <param name="mdef">Method definition to exclude</param>
        /// <param name="methods">Methods definitions</param>
        /// <param name="rskw">Region start keyword</param>
        /// <param name="rekw">Region end keyword</param>
        protected void WriteMethodsStubs(MethodDefinition mdef, Mono.Collections.Generic.Collection<MethodDefinition> methods, string rskw, string rekw)
        {
            Write(rskw);
            WriteLine("\" Methods stubs \"");
            WriteComment("Do not add or update any method. If compilation fails because of a method declaration, comment it");
            foreach (var smdef in methods.Where(smdef => mdef != smdef))
            {
	            WriteMethodSignature(smdef);
	            WriteMethodBody(smdef);
	            WriteLine();
            }
            WriteLine(rekw);
        }