コード例 #1
0
 public XmlCommentCollection(CodeObject parent) : base(parent)
 {
 }
コード例 #2
0
        public void Write(IndentedTextWriter writer, CodeObject codeObject)
        {
            if (writer == null)
            {
                throw new ArgumentNullException(nameof(writer));
            }
            if (codeObject == null)
            {
                throw new ArgumentNullException(nameof(codeObject));
            }

            switch (codeObject)
            {
            case CompilationUnit o:
                Write(writer, o);
                break;

            case NamespaceDeclaration o:
                Write(writer, o);
                break;

            case TypeDeclaration o:
                Write(writer, o);
                break;

            case Expression o:
                Write(writer, o);
                break;

            case Statement o:
                Write(writer, o);
                break;

            case Directive o:
                Write(writer, o);
                break;

            case MemberDeclaration o:
                Write(writer, o);
                break;

            case MethodArgumentDeclaration o:
                Write(writer, o);
                break;

            case CustomAttribute o:
                Write(writer, o);
                break;

            case CustomAttributeArgument o:
                Write(writer, o);
                break;

            case CatchClauseCollection o:
                Write(writer, o);
                break;

            case CatchClause o:
                Write(writer, o);
                break;

            case ConstructorInitializer o:
                Write(writer, o);
                break;

            case TypeParameterConstraint o:
                Write(writer, o);
                break;

            case Comment o:
                Write(writer, o);
                break;

            case XmlComment o:
                Write(writer, o);
                break;

            default:
                throw new NotSupportedException();
            }
        }
コード例 #3
0
 public CodeObjectCollection(CodeObject parent)
 {
     Parent = parent ?? throw new ArgumentNullException(nameof(parent));
 }