private static string DetermineMemberName(Declaration declaration) { var type = declaration.DeclarationType; switch (type) { case DeclarationType.PropertyGet: return declaration.IdentifierName + " (Get)"; case DeclarationType.PropertyLet: return declaration.IdentifierName + " (Let)"; case DeclarationType.PropertySet: return declaration.IdentifierName + " (Set)"; case DeclarationType.Variable: if (declaration.IsArray()) { return declaration.IdentifierName + "()"; } return declaration.IdentifierName; case DeclarationType.Constant: var valuedDeclaration = (ValuedDeclaration)declaration; return valuedDeclaration.IdentifierName + " = " + valuedDeclaration.Value; default: return declaration.IdentifierName; } }