Exemplo n.º 1
0
 private void Generate(DeclarationMember m)
 {
     GenerateLineComment(m.Comment);
     if (m is PropertyMember)
     {
         Generate((PropertyMember)m);
     }
     else if (m is FunctionMemberBase)
     {
         Generate((FunctionMemberBase)m);
     }
     else if (m is RawDeclarationMember)
     {
         Generate((RawDeclarationMember)m);
     }
     else
     {
         throw new ArgumentOutOfRangeException();
     }
 }
Exemplo n.º 2
0
 public static bool IsSame(this DeclarationMember m1, DeclarationMember m2)
 {
     if (m1 == null || m2 == null)
     {
         return(m1 == m2);
     }
     if (m1.GetType() != m2.GetType())
     {
         return(false);
     }
     if (m1 is PropertyMember)
     {
         return(IsSame((PropertyMember)m1, (PropertyMember)m2));
     }
     if (m1 is FunctionMemberBase)
     {
         return(IsSame((FunctionMemberBase)m1, (FunctionMemberBase)m2));
     }
     if (m1 is RawDeclarationMember)
     {
         return(IsSame((RawDeclarationMember)m1, (RawDeclarationMember)m2));
     }
     throw new NotImplementedException();
 }