Exemple #1
0
 private void ReplaceDollarToUnderscoreInAllElements()
 {
     foreach (var me in MainAssembly.Descendants().Where(t => t.Name.Contains("$")))
     {
         me.Name = me.Name.Replace("$", "_");
     }
 }
Exemple #2
0
 private void RemoveCtorsWithLastPrmNamedOne()
 {
     foreach (var me in MainAssembly.Descendants().OfType <Method>().ToList())
     {
         if (me.Parameters.Where(t => !t.Type.IsNullOrVoid() && t.Type.Name != null && t.Type.Name.Contains(".1")).FirstOrDefault() != null)
         {
             me.Remove();
         }
     }
 }
Exemple #3
0
 private void AutoNameMethodParameters()
 {
     foreach (var me in MainAssembly.Descendants().OfType <Method>())
     {
         var index = 0;
         foreach (var prm in me.Parameters)
         {
             if (prm.Name.IsNullOrEmpty())
             {
                 index++;
                 prm.Name = "prm" + index;
             }
         }
     }
 }