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);
        }
        internal static IPropertySymbol CreatePropertySymbol(INamedTypeSymbol containingType, IList <AttributeData> attributes, Accessibility accessibility, SymbolModifiers modifiers, ITypeSymbol type, IPropertySymbol explicitInterfaceSymbol, string name, IList <IParameterSymbol> parameters, IMethodSymbol getMethod, IMethodSymbol setMethod, bool isIndexer = false)
        {
            var result = new CodeGenerationPropertySymbol(containingType, attributes, accessibility, modifiers, type, explicitInterfaceSymbol, name, isIndexer, parameters, getMethod, setMethod);

            CodeGenerationPropertyInfo.Attach(result, modifiers.IsNew, modifiers.IsUnsafe);
            return(result);
        }
        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);
        }
 public static void Attach(
     IPropertySymbol property,
     bool isNew,
     bool isUnsafe)
 {
     var info = new CodeGenerationPropertyInfo(isNew, isUnsafe);
     propertyToInfoMap.Add(property, info);
 }
 public static void Attach(
     IPropertySymbol property,
     bool isNew,
     bool isUnsafe,
     SyntaxNode initializer)
 {
     var info = new CodeGenerationPropertyInfo(isNew, isUnsafe, initializer);
     s_propertyToInfoMap.Add(property, info);
 }
        public static void Attach(
            IPropertySymbol property,
            bool isNew,
            bool isUnsafe)
        {
            var info = new CodeGenerationPropertyInfo(isNew, isUnsafe);

            propertyToInfoMap.Add(property, info);
        }
Example #7
0
        public static void Attach(
            IPropertySymbol property,
            bool isNew,
            bool isUnsafe,
            SyntaxNode initializer)
        {
            var info = new CodeGenerationPropertyInfo(isNew, isUnsafe, initializer);

            s_propertyToInfoMap.Add(property, info);
        }
 private static bool GetIsUnsafe(CodeGenerationPropertyInfo info)
 {
     return(info != null && info.isUnsafe);
 }
 private static bool GetIsNew(CodeGenerationPropertyInfo info)
 {
     return(info != null && info.isNew);
 }
 public static SyntaxNode GetInitializer(CodeGenerationPropertyInfo info)
 {
     return(info == null ? null : info.initializer);
 }
 private static bool GetIsUnsafe(CodeGenerationPropertyInfo info)
 {
     return info != null && info.isUnsafe;
 }
 private static bool GetIsNew(CodeGenerationPropertyInfo info)
 {
     return info != null && info.isNew;
 }
 public static SyntaxNode GetInitializer(CodeGenerationPropertyInfo info)
 {
     return info == null ? null : info.initializer;
 }
 public static SyntaxNode GetInitializer(CodeGenerationPropertyInfo info)
 => info?._initializer;
Example #15
0
 private static bool GetIsUnsafe(CodeGenerationPropertyInfo info)
 => info != null && info._isUnsafe;
Example #16
0
 private static bool GetIsNew(CodeGenerationPropertyInfo info)
 => info != null && info._isNew;