/// <summary>
        /// Creates a field symbol that can be used to describe a field declaration.
        /// </summary>
        public static IFieldSymbol CreateFieldSymbol(
            ImmutableArray <AttributeData> attributes,
            Accessibility accessibility,
            DeclarationModifiers modifiers,
            ITypeSymbol type, string name,
            bool hasConstantValue  = false,
            object constantValue   = null,
            SyntaxNode initializer = null)
        {
            var result = new CodeGenerationFieldSymbol(null, attributes, accessibility, modifiers, type, name, hasConstantValue, constantValue);

            CodeGenerationFieldInfo.Attach(result, modifiers.IsUnsafe, modifiers.IsWithEvents, initializer);
            return(result);
        }
Ejemplo n.º 2
0
 private static bool GetIsWithEvents(CodeGenerationFieldInfo info)
 {
     return(info != null && info._isWithEvents);
 }
Ejemplo n.º 3
0
 private static SyntaxNode GetInitializer(CodeGenerationFieldInfo info)
 {
     return(info == null ? null : info._initializer);
 }
Ejemplo n.º 4
0
 private static bool GetIsUnsafe(CodeGenerationFieldInfo info)
 {
     return(info != null && info._isUnsafe);
 }