コード例 #1
0
        /// <summary>
        /// Creates a destructor symbol that can be used to describe a destructor declaration.
        /// </summary>
        public static IMethodSymbol CreateDestructorSymbol(
            ImmutableArray <AttributeData> attributes, string typeName,
            ImmutableArray <SyntaxNode> statements = default)
        {
            var result = new CodeGenerationDestructorSymbol(null, attributes);

            CodeGenerationDestructorInfo.Attach(result, typeName, statements);
            return(result);
        }
コード例 #2
0
        protected override CodeGenerationSymbol Clone()
        {
            var result = new CodeGenerationDestructorSymbol(this.ContainingType, this.GetAttributes());

            CodeGenerationDestructorInfo.Attach(result,
                                                CodeGenerationDestructorInfo.GetTypeName(this),
                                                CodeGenerationDestructorInfo.GetStatements(this));

            return(result);
        }