internal static IPropertySymbol CreatePropertySymbol(
            INamedTypeSymbol containingType,
            ImmutableArray <AttributeData> attributes,
            Accessibility accessibility,
            DeclarationModifiers modifiers,
            ITypeSymbol type,
            RefKind refKind,
            ImmutableArray <IPropertySymbol> explicitInterfaceImplementations,
            string name,
            ImmutableArray <IParameterSymbol> parameters,
            IMethodSymbol getMethod,
            IMethodSymbol setMethod,
            bool isIndexer         = false,
            SyntaxNode initializer = null)
        {
            var result = new CodeGenerationPropertySymbol(
                containingType,
                attributes,
                accessibility,
                modifiers,
                type,
                refKind,
                explicitInterfaceImplementations,
                name,
                isIndexer,
                parameters,
                getMethod,
                setMethod);

            CodeGenerationPropertyInfo.Attach(result, modifiers.IsNew, modifiers.IsUnsafe, initializer);
            return(result);
        }
Пример #2
0
        protected override CodeGenerationSymbol Clone()
        {
            var result = new CodeGenerationPropertySymbol(
                this.ContainingType, this.GetAttributes(), this.DeclaredAccessibility,
                this.Modifiers, this.Type, this.RefKind, this.ExplicitInterfaceImplementations,
                this.Name, this.IsIndexer, this.Parameters,
                this.GetMethod, this.SetMethod);

            CodeGenerationPropertyInfo.Attach(result,
                                              CodeGenerationPropertyInfo.GetIsNew(this),
                                              CodeGenerationPropertyInfo.GetIsUnsafe(this),
                                              CodeGenerationPropertyInfo.GetInitializer(this));

            return(result);
        }