internal InternalNestedStaticClassMethodCollectionWithCodeAnalysis( InternalNestedStaticClassWithCodeAnalysis <TStaticClass> type) { this.type = type; methods = new ClassMemberListWrapper <TStaticClass, NestedStaticClassMethodWithCodeAnalysis, MethodDeclarationSyntax>( type.InternalNode, () => new NestedStaticClassMethodWithCodeAnalysis()); }
internal InternalStaticClassEventCollectionWithCodeAnalysis(InternalStaticTypeWithCodeAnalysis <TClass> type) { this.type = type; events = new ClassMemberListWrapper <TClass, StaticClassEventWithCodeAnalysis, EventFieldDeclarationSyntax>( type.InternalNode, () => new StaticClassEventWithCodeAnalysis()); eventProperties = new ClassMemberListWrapper <TClass, StaticClassEventPropertyWithCodeAnalysis, EventDeclarationSyntax>( type.InternalNode, () => new StaticClassEventPropertyWithCodeAnalysis()); }
internal InternalStaticClassNestedStructCollectionWithCodeAnalysis( InternalStaticTypeWithCodeAnalysis <TClass> type) { this.type = type; structs = new ClassMemberListWrapper <TClass, StaticClassNestedStructWithCodeAnalysis, StructDeclarationSyntax>( type.InternalNode, () => new StaticClassNestedStructWithCodeAnalysis()); partialStructs = new ClassMemberListWrapper <TClass, StaticClassNestedPartialStructWithCodeAnalysis, StructDeclarationSyntax>( type.InternalNode, () => new StaticClassNestedPartialStructWithCodeAnalysis()); }
internal InternalClassFieldCollectionWithCodeAnalysis(InternalClassTypeWithCodeAnalysis <TClass> classType) { this.classType = classType; constants = new ClassMemberListWrapper <TClass, ClassConstantWithCodeAnalysis, FieldDeclarationSyntax>( classType.InternalNode, () => new ClassConstantWithCodeAnalysis(), syntax => syntax.IsConstant()); fields = new ClassMemberListWrapper <TClass, ClassFieldWithCodeAnalysis, FieldDeclarationSyntax>( classType.InternalNode, () => new ClassFieldWithCodeAnalysis(), syntax => !syntax.IsConstant()); }
internal InternalStaticClassMethodCollectionWithCodeAnalysis(InternalStaticTypeWithCodeAnalysis <TClass> type) { this.type = type; methods = new ClassMemberListWrapper <TClass, StaticClassMethodWithCodeAnalysis, MethodDeclarationSyntax>( type.InternalNode, () => new StaticClassMethodWithCodeAnalysis(), syntax => !IsExtensionMethod(syntax)); extensionMethods = new ClassMemberListWrapper <TClass, ExtensionMethodWithCodeAnalysis, MethodDeclarationSyntax>( type.InternalNode, () => new ExtensionMethodWithCodeAnalysis(), IsExtensionMethod); }
internal InternalClassNestedStructCollectionWithCodeAnalysis(InternalClassTypeWithCodeAnalysis <TClass> classType) { this.classType = classType; structs = new ClassMemberListWrapper <TClass, ClassNestedStructWithCodeAnalysis, StructDeclarationSyntax>( classType.InternalNode, () => new ClassNestedStructWithCodeAnalysis(), syntax => !syntax.IsPartial()); partialStructs = new ClassMemberListWrapper <TClass, ClassNestedPartialStructWithCodeAnalysis, StructDeclarationSyntax>( classType.InternalNode, () => new ClassNestedPartialStructWithCodeAnalysis(), StructDeclarationSyntaxExtensions.IsPartial); }
internal InternalNestedStaticClassFieldCollectionWithCodeAnalysis( InternalNestedStaticClassWithCodeAnalysis <TStaticClass> type) { this.type = type; constants = new ClassMemberListWrapper <TStaticClass, NestedStaticClassConstantWithCodeAnalysis, FieldDeclarationSyntax>( type.InternalNode, () => new NestedStaticClassConstantWithCodeAnalysis(), syntax => syntax.IsConstant()); fields = new ClassMemberListWrapper <TStaticClass, NestedStaticClassFieldWithCodeAnalysis, FieldDeclarationSyntax>( type.InternalNode, () => new NestedStaticClassFieldWithCodeAnalysis(), syntax => !syntax.IsConstant()); }
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 InternalClassNestedClassCollectionWithCodeAnalysis(InternalClassTypeWithCodeAnalysis <TClass> classType) { this.classType = classType; classes = new ClassMemberListWrapper <TClass, ClassNestedClassWithCodeAnalysis, ClassDeclarationSyntax>( classType.InternalNode, () => new ClassNestedClassWithCodeAnalysis(), ClassDeclarationSyntaxExtensions.IsClass); abstractClasses = new ClassMemberListWrapper <TClass, ClassNestedAbstractClassWithCodeAnalysis, ClassDeclarationSyntax>( classType.InternalNode, () => new ClassNestedAbstractClassWithCodeAnalysis(), ClassDeclarationSyntaxExtensions.IsAbstractClass); sealedClasses = new ClassMemberListWrapper <TClass, ClassNestedSealedClassWithCodeAnalysis, ClassDeclarationSyntax>( classType.InternalNode, () => new ClassNestedSealedClassWithCodeAnalysis(), ClassDeclarationSyntaxExtensions.IsSealedClass); staticClasses = new ClassMemberListWrapper <TClass, ClassNestedStaticClassWithCodeAnalysis, ClassDeclarationSyntax>( classType.InternalNode, () => new ClassNestedStaticClassWithCodeAnalysis(), ClassDeclarationSyntaxExtensions.IsStaticClass); partialClasses = ClassNestedPartialClassCollectionWithCodeAnalysis.Create(classType); }
internal InternalClassTypeWithCodeAnalysis(TClass @class) { node = new Node <TClass, ClassDeclarationSyntax>(@class); baseTypes = new BaseTypeNodeList <TClass, ClassDeclarationSyntax>( node, (parentSyntax, childSyntax) => parentSyntax.WithBaseList(childSyntax)); attributes = new AttributeListWrapper <TClass, ClassDeclarationSyntax>( node, syntax => syntax.AttributeLists, (parentSyntax, childSyntax) => parentSyntax.WithAttributeLists(childSyntax)); baseClass = new WrappedList <InterfaceReferenceWithCodeAnalysis, ClassReferenceWithCodeAnalysis>( baseTypes, @interface => new ClassReferenceWithCodeAnalysis(@interface.TypeReference), newClass => new InterfaceReferenceWithCodeAnalysis(newClass.TypeReference), classToFilter => !Regex.IsMatch(classToFilter.Name, "^I[A-Z]")); classes = new InternalClassNestedClassCollectionWithCodeAnalysis <TClass>(this); constructors = new ClassMemberListWrapper <TClass, ClassConstructorWithCodeAnalysis, ConstructorDeclarationSyntax>( node, () => new ClassConstructorWithCodeAnalysis(), syntax => !syntax.IsStatic()); conversionOperators = new ClassMemberListWrapper <TClass, ClassConversionOperatorWithCodeAnalysis, ConversionOperatorDeclarationSyntax>( node, () => new ClassConversionOperatorWithCodeAnalysis()); destructor = new ClassMemberListWrapper <TClass, ClassDestructorWithCodeAnalysis, DestructorDeclarationSyntax>( node, () => new ClassDestructorWithCodeAnalysis()); delegates = new ClassMemberListWrapper <TClass, ClassNestedDelegateWithCodeAnalysis, DelegateDeclarationSyntax>( node, () => new ClassNestedDelegateWithCodeAnalysis()); enums = new ClassMemberListWrapper <TClass, ClassNestedEnumWithCodeAnalysis, EnumDeclarationSyntax>( node, () => new ClassNestedEnumWithCodeAnalysis()); events = new InternalClassEventCollectionWithCodeAnalysis <TClass>(this); fields = new InternalClassFieldCollectionWithCodeAnalysis <TClass>(this); genericParameters = new GenericParameterDeclarationNodeList <TClass, ClassDeclarationSyntax>( node, syntax => syntax.TypeParameterList, (parentSyntax, childSyntax) => parentSyntax.WithTypeParameterList(childSyntax), syntax => syntax.ConstraintClauses, (parentSyntax, childSyntax) => parentSyntax.WithConstraintClauses(childSyntax)); implementedInterfaces = new FilteredList <InterfaceReferenceWithCodeAnalysis>( baseTypes, @interface => Regex.IsMatch(@interface.Name, "^I[A-Z]")); indexers = new InternalClassIndexerCollectionWithCodeAnalysis <TClass>(this); interfaces = new ClassMemberListWrapper <TClass, ClassNestedInterfaceWithCodeAnalysis, InterfaceDeclarationSyntax>( node, () => new ClassNestedInterfaceWithCodeAnalysis()); methods = new InternalClassMethodCollectionWithCodeAnalysis <TClass>(this); operatorOverloads = new ClassMemberListWrapper <TClass, ClassOperatorOverloadWithCodeAnalysis, OperatorDeclarationSyntax>( node, () => new ClassOperatorOverloadWithCodeAnalysis()); properties = new InternalClassPropertyCollectionWithCodeAnalysis <TClass>(this); staticConstructor = new ClassMemberListWrapper <TClass, ClassStaticConstructorWithCodeAnalysis, ConstructorDeclarationSyntax>( node, () => new ClassStaticConstructorWithCodeAnalysis(), syntax => syntax.IsStatic()); structs = new InternalClassNestedStructCollectionWithCodeAnalysis <TClass>(this); members = new ClassMemberList <TClass>(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(events.ExplicitInterfaceEvents), () => events.ExplicitInterfaceEvents.Select(item => item.Syntax) }, { nameof(StaticConstructor), () => staticConstructor.Select(item => item.Syntax) }, { nameof(Constructors), () => constructors.Select(item => item.Syntax) }, { nameof(properties.Properties), () => properties.Properties.Select(item => item.Syntax) }, { nameof(properties.ExplicitInterfaceProperties), () => properties.ExplicitInterfaceProperties.Select(item => item.Syntax) }, { nameof(indexers.Indexers), () => indexers.Indexers.Select(item => item.Syntax) }, { nameof(indexers.ExplicitInterfaceIndexers), () => indexers.ExplicitInterfaceIndexers.Select(item => item.Syntax) }, { nameof(methods.Methods), () => methods.Methods.Select(item => item.Syntax) }, { nameof(methods.ExplicitInterfaceMethods), () => methods.ExplicitInterfaceMethods.Select(item => item.Syntax) }, { nameof(OperatorOverloads), () => operatorOverloads.Select(item => item.Syntax) }, { nameof(ConversionOperators), () => conversionOperators.Select(item => item.Syntax) }, { nameof(classes.Classes), () => classes.Classes.Select(item => item.Syntax) }, { nameof(classes.AbstractClasses), () => classes.AbstractClasses.Select(item => item.Syntax) }, { nameof(classes.SealedClasses), () => classes.SealedClasses.Select(item => item.Syntax) }, { nameof(classes.StaticClasses), () => classes.StaticClasses.Select(item => item.Syntax) }, { nameof(Interfaces), () => interfaces.Select(item => item.Syntax) } }; }