Exemplo n.º 1
0
 internal static void RemoveMembers(CodeClass2 classElement)
 {
     var methodToDelete = new List<CodeElement2>();
     foreach (CodeElement2 member in classElement.Members)
     {
         CodeFunction2 method = member as CodeFunction2;
         if (method == null)
             continue;
         var strs = method.Name.Split('.');
         if (strs.Length >= 2 && strs[strs.Length - 2].Trim() == "ISerializable")
         {
             if (strs[strs.Length - 1].Trim() == "Serialize" || strs[strs.Length - 1].Trim() == "Deserialize")
                 methodToDelete.Add(member);
         }
         else if (method.Name == "Serialize" || method.Name == "Deserialize")
             methodToDelete.Add(member);
     }
     foreach (CodeElement2 method in methodToDelete)
         classElement.RemoveMember(method);
 }
Exemplo n.º 2
0
 public void RemoveMember(object Element)
 {
     _codeClass.RemoveMember(Element);
 }