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

            CodeGenerationDestructorInfo.Attach(result, typeName, statements);
            return(result);
        }
コード例 #2
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(ImmutableArray <SyntaxNode>))
        {
            var result = new CodeGenerationDestructorSymbol(null, attributes);

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

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

            return(result);
        }