internal InternalNestedStaticClassWithCodeAnalysis(TStaticClass @class) { node = new Node <TStaticClass, ClassDeclarationSyntax>(@class); attributes = new AttributeListWrapper <TStaticClass, ClassDeclarationSyntax>( node, syntax => syntax.AttributeLists, (parentSyntax, childSyntax) => parentSyntax.WithAttributeLists(childSyntax)); classes = new InternalNestedStaticClassNestedClassCollectionWithCodeAnalysis <TStaticClass>(this); delegates = new ClassMemberListWrapper <TStaticClass, NestedStaticClassNestedDelegateWithCodeAnalysis, DelegateDeclarationSyntax>( node, () => new NestedStaticClassNestedDelegateWithCodeAnalysis()); enums = new ClassMemberListWrapper <TStaticClass, NestedStaticClassNestedEnumWithCodeAnalysis, EnumDeclarationSyntax>( node, () => new NestedStaticClassNestedEnumWithCodeAnalysis()); events = new InternalNestedStaticClassEventCollectionWithCodeAnalysis <TStaticClass>(this); fields = new InternalNestedStaticClassFieldCollectionWithCodeAnalysis <TStaticClass>(this); genericParameters = new GenericParameterDeclarationNodeList <TStaticClass, ClassDeclarationSyntax>( node, syntax => syntax.TypeParameterList, (parentSyntax, childSyntax) => parentSyntax.WithTypeParameterList(childSyntax), syntax => syntax.ConstraintClauses, (parentSyntax, childSyntax) => parentSyntax.WithConstraintClauses(childSyntax)); interfaces = new ClassMemberListWrapper <TStaticClass, NestedStaticClassNestedInterfaceWithCodeAnalysis, InterfaceDeclarationSyntax>( node, () => new NestedStaticClassNestedInterfaceWithCodeAnalysis()); methods = new InternalNestedStaticClassMethodCollectionWithCodeAnalysis <TStaticClass>(this); properties = new InternalNestedStaticClassPropertyCollectionWithCodeAnalysis <TStaticClass>(this); staticConstructor = new ClassMemberListWrapper <TStaticClass, StaticConstructorWithCodeAnalysis, ConstructorDeclarationSyntax>( node, () => new StaticConstructorWithCodeAnalysis()); structs = new InternalNestedStaticClassNestedStructCollectionWithCodeAnalysis <TStaticClass>(this); members = new MemberList <TStaticClass, ClassDeclarationSyntax>( node, (parentSyntax, childSyntax) => parentSyntax.WithMembers(childSyntax)) { { nameof(fields.Constants), () => fields.Constants.Select(item => item.Syntax) }, { nameof(fields.Fields), () => fields.Fields.Select(item => item.Syntax) }, { nameof(Enums), () => enums.Select(item => item.Syntax) }, { nameof(Delegates), () => delegates.Select(item => item.Syntax) }, { nameof(events.Events), () => events.Events.Select(item => item.Syntax) }, { nameof(events.EventProperties), () => events.EventProperties.Select(item => item.Syntax) }, { nameof(Interfaces), () => interfaces.Select(item => item.Syntax) }, { nameof(Properties), () => Properties.Select(item => item.Syntax) }, { nameof(methods.Methods), () => methods.Methods.Select(item => item.Syntax) } }; }
internal NestedStaticPartialClassPropertyCollectionWithCodeAnalysis( NestedStaticClassPropertyCollectionWithCodeAnalysis propertyCollection) { this.propertyCollection = propertyCollection; autoProperties = new WrappedCollection <NestedStaticClassAutoPropertyWithCodeAnalysis, NestedStaticPartialClassAutoPropertyWithCodeAnalysis>( propertyCollection.AutoProperties, parent => new NestedStaticPartialClassAutoPropertyWithCodeAnalysis(parent), child => child.Property, value => propertyCollection.AutoProperties = value); lambdaProperties = new WrappedCollection <NestedStaticClassLambdaPropertyWithCodeAnalysis, NestedStaticPartialClassLambdaPropertyWithCodeAnalysis>( propertyCollection.LambdaProperties, parent => new NestedStaticPartialClassLambdaPropertyWithCodeAnalysis(parent), child => child.Property, value => propertyCollection.LambdaProperties = value); properties = new WrappedCollection <NestedStaticClassPropertyWithCodeAnalysis, NestedStaticPartialClassPropertyWithCodeAnalysis>( propertyCollection.Properties, parent => new NestedStaticPartialClassPropertyWithCodeAnalysis(parent), child => child.Property, value => propertyCollection.Properties = value); }