Beispiel #1
0
 public void RemoveUsing(string reference)
 {
     Cauldron.Add($"Removing Using: {reference} from {Name}.cs");
     if (Usings.Contains(reference))
     {
         Usings.RemoveAt(Usings.IndexOf(reference));
     }
 }
 /// <summary>
 /// The index of the using directive in the list.
 /// </summary>
 /// <param name="usingDirective"></param>
 /// <returns></returns>
 public int IndexOf(UsingDirectiveSyntax usingDirective)
 {
     return(Usings.IndexOf(usingDirective));
 }
 /// <summary>
 /// Searches for an using directive that matches the predicate and returns returns zero-based index of the first occurrence in the list.
 /// </summary>
 /// <param name="predicate"></param>
 /// <returns></returns>
 public int IndexOf(Func <UsingDirectiveSyntax, bool> predicate)
 {
     return(Usings.IndexOf(predicate));
 }