IEnumerable <IMemberDef> CalculateDefsToRemove() { var m = GetInitializeComponent(); if (m != null) { yield return(m); foreach (var f in DotNetUtils.GetFields(m)) { yield return(f); } } m = GetDispose(); if (m != null) { yield return(m); foreach (var f in DotNetUtils.GetFields(m)) { yield return(f); } } }
IEnumerable <IMemberDef> GetDefsToRemove() { var ep = type.Module.EntryPoint; if (ep != null && ep.DeclaringType == type) { yield return(ep); } var d = FindInitializeComponent(); if (d != null) { yield return(d); foreach (var f in DotNetUtils.GetFields(d)) { if (f.FieldType.RemovePinnedAndModifiers().GetElementType() == ElementType.Boolean) { yield return(f); } } } var connMeth = FindConnectMethod(); if (connMeth != null) { yield return(connMeth); foreach (var f in DotNetUtils.GetFields(connMeth)) { yield return(f); } } var delMeth = FindCreateDelegateMethod(); if (delMeth != null) { yield return(delMeth); } }