public InternalStaticTypeWithCodeAnalysis(TClass @class) { node = new Node <TClass, ClassDeclarationSyntax>(@class); attributes = new AttributeListWrapper <TClass, ClassDeclarationSyntax>( node, syntax => syntax.AttributeLists, (parentSyntax, childSyntax) => parentSyntax.WithAttributeLists(childSyntax)); classes = new InternalStaticClassNestedClassCollectionWithCodeAnalysis <TClass>(this); delegates = new ClassMemberListWrapper <TClass, StaticClassNestedDelegateWithCodeAnalysis, DelegateDeclarationSyntax>( node, () => new StaticClassNestedDelegateWithCodeAnalysis()); enums = new ClassMemberListWrapper <TClass, StaticClassNestedEnumWithCodeAnalysis, EnumDeclarationSyntax>( node, () => new StaticClassNestedEnumWithCodeAnalysis()); events = new InternalStaticClassEventCollectionWithCodeAnalysis <TClass>(this); fields = new InternalStaticClassFieldCollectionWithCodeAnalysis <TClass>(this); genericParameters = new GenericParameterDeclarationNodeList <TClass, ClassDeclarationSyntax>( node, syntax => syntax.TypeParameterList, (parentSyntax, childSyntax) => parentSyntax.WithTypeParameterList(childSyntax), syntax => syntax.ConstraintClauses, (parentSyntax, childSyntax) => parentSyntax.WithConstraintClauses(childSyntax)); interfaces = new ClassMemberListWrapper <TClass, StaticClassNestedInterfaceWithCodeAnalysis, InterfaceDeclarationSyntax>( node, () => new StaticClassNestedInterfaceWithCodeAnalysis()); methods = new InternalStaticClassMethodCollectionWithCodeAnalysis <TClass>(this); properties = new InternalStaticClassPropertyCollectionWithCodeAnalysis <TClass>(this); staticConstructor = new ClassMemberListWrapper <TClass, StaticConstructorWithCodeAnalysis, ConstructorDeclarationSyntax>( node, () => new StaticConstructorWithCodeAnalysis()); structs = new InternalStaticClassNestedStructCollectionWithCodeAnalysis <TClass>(this); members = new MemberList <TClass, 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.ExtensionMethods), () => methods.ExtensionMethods.Select(item => item.Syntax) }, { nameof(methods.Methods), () => methods.Methods.Select(item => item.Syntax) } }; }
internal StaticPartialClassPropertyCollectionWithCodeAnalysis( StaticClassPropertyCollectionWithCodeAnalysis propertyCollection) { this.propertyCollection = propertyCollection; autoProperties = new WrappedCollection <StaticClassAutoPropertyWithCodeAnalysis, StaticPartialClassAutoPropertyWithCodeAnalysis>( propertyCollection.AutoProperties, parent => new StaticPartialClassAutoPropertyWithCodeAnalysis(parent), child => child.Property, value => propertyCollection.AutoProperties = value); lambdaProperties = new WrappedCollection <StaticClassLambdaPropertyWithCodeAnalysis, StaticPartialClassLambdaPropertyWithCodeAnalysis>( propertyCollection.LambdaProperties, parent => new StaticPartialClassLambdaPropertyWithCodeAnalysis(parent), child => child.Property, value => propertyCollection.LambdaProperties = value); properties = new WrappedCollection <StaticClassPropertyWithCodeAnalysis, StaticPartialClassPropertyWithCodeAnalysis>( propertyCollection.Properties, parent => new StaticPartialClassPropertyWithCodeAnalysis(parent), child => child.Property, value => propertyCollection.Properties = value); }