/// <summary>
 /// Return a list of all template names missing from group that are defined
 /// in this interface. Return null if all is well.
 /// </summary>
 /// <param name="group">Group to check</param>
 /// <returns>List of templates missing from specified group or null</returns>
 public IList GetMissingTemplates(StringTemplateGroup group)
 {
     ArrayList missing = null;
     foreach (string name in templates.Keys)
     {
         TemplateDefinition tdef = (TemplateDefinition) templates[name];
         if ( !tdef.optional && !group.IsDefined(tdef.name) )
         {
             if (missing == null)
             {
                 missing = new ArrayList();
             }
             missing.Add(tdef.name);
         }
     }
     return missing;
 }
 /// <summary>
 /// Return a list of all template sigs that are present in the group, but
 /// that have wrong formal argument lists.  Return null if all is well.
 /// </summary>
 /// <param name="group">Group to check</param>
 /// <returns>
 /// List of templates with mismatched signatures from specified group or null
 /// </returns>
 public IList GetMismatchedTemplates(StringTemplateGroup group)
 {
     ArrayList mismatched = null;
     foreach (string name in templates.Keys)
     {
         TemplateDefinition tdef = (TemplateDefinition) templates[name];
         if ( group.IsDefined(tdef.name) )
         {
             StringTemplate defST = group.GetTemplateDefinition(tdef.name);
             IDictionary formalArgs = defST.FormalArguments;
             bool ack = false;
             if ( (tdef.formalArgs!=null && formalArgs==null) ||
                 (tdef.formalArgs==null && formalArgs!=null) ||
                 (tdef.formalArgs.Count != formalArgs.Count) )
             {
                 ack = true;
             }
             if ( !ack )
             {
                 foreach (string argName in formalArgs.Keys)
                 {
                     if ( tdef.formalArgs[argName] == null )
                     {
                         ack=true;
                         break;
                     }
                 }
             }
             if ( ack )
             {
                 // Console.Out.WriteLine(CollectionUtils.DictionaryToString(tdef.formalArgs)
                 //	+ "!=" + CollectionUtils.DictionaryToString(formalArgs));
                 if (mismatched == null)
                 {
                     mismatched = new ArrayList();
                 }
                 mismatched.Add(GetTemplateSignature(tdef));
             }
         }
     }
     return mismatched;
 }