private void ReplaceDollarToUnderscoreInAllElements() { foreach (var me in MainAssembly.Descendants().Where(t => t.Name.Contains("$"))) { me.Name = me.Name.Replace("$", "_"); } }
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(); } } }
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; } } } }