internal InternalNestedStaticPartialClassWithCodeAnalysis(InternalNestedStaticClassWithCodeAnalysis <TClass> classType) { this.classType = classType; members = classType.Members; classes = new NestedStaticPartialClassNestedClassCollectionWithCodeAnalysis(classType.Classes); delegates = new WrappedCollection <NestedStaticClassNestedDelegateWithCodeAnalysis, NestedStaticPartialClassNestedDelegateWithCodeAnalysis>( classType.Delegates, parent => new NestedStaticPartialClassNestedDelegateWithCodeAnalysis(parent), child => child.InternalDelegate, value => classType.Delegates = value); enums = new WrappedCollection <NestedStaticClassNestedEnumWithCodeAnalysis, NestedStaticPartialClassNestedEnumWithCodeAnalysis>( classType.Enums, parent => new NestedStaticPartialClassNestedEnumWithCodeAnalysis(parent), child => child.InternalEnum, value => classType.Enums = value); events = new NestedStaticPartialClassEventCollectionWithCodeAnalysis(classType.Events); fields = new NestedStaticPartialClassFieldCollectionWithCodeAnalysis(classType.Fields); interfaces = new WrappedCollection <NestedStaticClassNestedInterfaceWithCodeAnalysis, NestedStaticPartialClassNestedInterfaceWithCodeAnalysis>( classType.Interfaces, parent => new NestedStaticPartialClassNestedInterfaceWithCodeAnalysis(parent), child => child.Interface, value => classType.Interfaces = value); methods = new InternalNestedStaticPartialClassMethodCollectionWithCodeAnalysis <TClass>(this); properties = new NestedStaticPartialClassPropertyCollectionWithCodeAnalysis(classType.Properties); structs = new NestedStaticPartialClassNestedStructCollectionWithCodeAnalysis(classType.Structs); }
internal StaticPartialClassWithCodeAnalysis(DocumentWithCodeAnalysis document) { this.document = document; var type = new InternalStaticTypeWithCodeAnalysis <StaticPartialClassWithCodeAnalysis>(this); classType = new StaticClassWithCodeAnalysis(document, type); classes = new StaticPartialClassNestedClassCollectionWithCodeAnalysis(classType.Classes); delegates = new WrappedCollection <StaticClassNestedDelegateWithCodeAnalysis, StaticPartialClassNestedDelegateWithCodeAnalysis>( classType.Delegates, parent => new StaticPartialClassNestedDelegateWithCodeAnalysis(parent), child => child.Delegate, value => classType.Delegates = value); enums = new WrappedCollection <StaticClassNestedEnumWithCodeAnalysis, StaticPartialClassNestedEnumWithCodeAnalysis>( classType.Enums, parent => new StaticPartialClassNestedEnumWithCodeAnalysis(parent), child => child.Enum, value => classType.Enums = value); events = new StaticPartialClassEventCollectionWithCodeAnalysis(classType.Events); fields = new StaticPartialClassFieldCollectionWithCodeAnalysis(classType.Fields); interfaces = new WrappedCollection <StaticClassNestedInterfaceWithCodeAnalysis, StaticPartialClassNestedInterfaceWithCodeAnalysis>( classType.Interfaces, parent => new StaticPartialClassNestedInterfaceWithCodeAnalysis(parent), child => child.Interface, value => classType.Interfaces = value); methods = new StaticPartialClassMethodCollectionWithCodeAnalysis(type); properties = new StaticPartialClassPropertyCollectionWithCodeAnalysis(classType.Properties); structs = new StaticPartialClassNestedStructCollectionWithCodeAnalysis(classType.Structs); members = type.Members; }
internal PartialStructTypeWithCodeAnalysis(InternalStructTypeWithCodeAnalysis <TStruct> classType) { this.structType = classType; members = classType.Members; classes = new PartialStructNestedClassCollectionWithCodeAnalysis(classType.Classes); constructors = new WrappedCollection <StructConstructorWithCodeAnalysis, PartialStructConstructorWithCodeAnalysis>( classType.Constructors, constructor => new PartialStructConstructorWithCodeAnalysis(constructor), constructor => constructor.Constructor, value => classType.Constructors = value); delegates = new WrappedCollection <StructNestedDelegateWithCodeAnalysis, PartialStructNestedDelegateWithCodeAnalysis>( classType.Delegates, parent => new PartialStructNestedDelegateWithCodeAnalysis(parent), child => child.Delegate, value => classType.Delegates = value); enums = new WrappedCollection <StructNestedEnumWithCodeAnalysis, PartialStructNestedEnumWithCodeAnalysis>( classType.Enums, parent => new PartialStructNestedEnumWithCodeAnalysis(parent), child => child.Enum, value => classType.Enums = value); events = new PartialStructEventCollectionWithCodeAnalysis(classType.Events); fields = new PartialStructFieldCollectionWithCodeAnalysis(classType.Fields); indexers = new PartialStructIndexerCollectionWithCodeAnalysis(classType.Indexers); interfaces = new WrappedCollection <StructNestedInterfaceWithCodeAnalysis, PartialStructNestedInterfaceWithCodeAnalysis>( classType.Interfaces, parent => new PartialStructNestedInterfaceWithCodeAnalysis(parent), child => child.Interface, value => classType.Interfaces = value); methods = new InternalPartialStructMethodCollectionWithCodeAnalysis <TStruct>(classType); properties = new PartialStructPropertyCollectionWithCodeAnalysis(classType.Properties); structs = new PartialStructNestedStructCollectionWithCodeAnalysis(classType.Structs); }
internal static void Replace(this IMemberList members, NestedStaticPartialClassMethodCollectionWithCodeAnalysis value) { members.CombineList( new MemberListSyntax(nameof(value.Methods), value.Methods.Select(method => method.Syntax)), new MemberListSyntax(nameof(value.PartialMethodDefinitions), value.PartialMethodDefinitions.Select(method => method.Syntax)), new MemberListSyntax(nameof(value.PartialMethodImplementations), value.PartialMethodImplementations.Select(method => method.Syntax))); }
internal static void Replace(this IMemberList members, PartialStructMethodCollectionWithCodeAnalysis value) { members.CombineList( new MemberListSyntax(nameof(value.Methods), value.Methods.Select(method => method.Syntax)), new MemberListSyntax(nameof(value.ExplicitInterfaceMethods), value.ExplicitInterfaceMethods.Select(method => method.Syntax)), new MemberListSyntax(nameof(value.PartialMethodDefinitions), value.PartialMethodDefinitions.Select(method => method.Syntax)), new MemberListSyntax(nameof(value.PartialMethodImplementations), value.PartialMethodImplementations.Select(method => method.Syntax))); }
public ManageServiceController(IMemberList memberList, IProviderList providerList, IProviderDirectory providerDirectory, IServiceRecordList serviceRecordList) { this.memberList = memberList; this.providerList = providerList; this.providerDirectory = providerDirectory; this.serviceRecordList = serviceRecordList; }
public ManageAccountController(IAdminList adminList, IManagerList managerList, IMemberList memberList, IProviderList providerList) { this.adminList = adminList; this.managerList = managerList; this.memberList = memberList; this.providerList = providerList; }
private AbstractPartialClassNestedPartialClassCollectionWithCodeAnalysis( IMemberList members, ICollection <AbstractPartialClassNestedAbstractPartialClassWithCodeAnalysis> abstractClasses, ICollection <AbstractPartialClassNestedPartialClassWithCodeAnalysis> classes, ICollection <AbstractPartialClassNestedSealedPartialClassWithCodeAnalysis> sealedClasses, ICollection <AbstractPartialClassNestedStaticPartialClassWithCodeAnalysis> staticClasses) : base(members, abstractClasses, classes, sealedClasses, staticClasses) { }
public ManageReportController(IMemberList ml, IProviderList providerList, IProviderDirectory providerDirectory, IScheduleList scheduleList, IServiceRecordList serviceRecordList) { this.ml = ml; this.providerList = providerList; this.providerDirectory = providerDirectory; this.scheduleList = scheduleList; this.serviceRecordList = serviceRecordList; }
internal StructCollectionWithCodeAnalysis(LoadedDocumentWithCodeAnalysis document) { members = document.Members; structs = new LoadedDocumentMemberListWrapper <StructWithCodeAnalysis, StructDeclarationSyntax>( document.Node, () => new StructWithCodeAnalysis(document.Document), syntax => !syntax.IsPartial()); partialStructs = new LoadedDocumentMemberListWrapper <PartialStructWithCodeAnalysis, StructDeclarationSyntax>( document.Node, () => new PartialStructWithCodeAnalysis(document.Document), StructDeclarationSyntaxExtensions.IsPartial); }
internal StructCollectionWithCodeAnalysis(NamespaceWithCodeAnalysis @namespace) { members = @namespace.Members; structs = new NamespaceMemberListWrapper <StructWithCodeAnalysis, StructDeclarationSyntax>( @namespace.Node, () => new StructWithCodeAnalysis(@namespace.Document), syntax => !syntax.IsPartial()); partialStructs = new NamespaceMemberListWrapper <PartialStructWithCodeAnalysis, StructDeclarationSyntax>( @namespace.Node, () => new PartialStructWithCodeAnalysis(@namespace.Document), StructDeclarationSyntaxExtensions.IsPartial); }
internal GenericPartialClassCollectionWithCodeAnalysis( IMemberList members, ICollection <TAbstractClass> abstractClasses, ICollection <TClass> classes, ICollection <TSealedClass> sealedClasses, ICollection <TStaticClass> staticClasses) { this.members = members; this.abstractClasses = abstractClasses; this.classes = classes; this.sealedClasses = sealedClasses; this.staticClasses = staticClasses; }
internal InternalSealedTypeWithCodeAnalysis(TClass @class) { classType = new InternalClassTypeWithCodeAnalysis <TClass>(@class); members = classType.Members; classes = new SealedClassNestedClassCollectionWithCodeAnalysis(classType.Classes); constructors = new WrappedCollection <ClassConstructorWithCodeAnalysis, SealedClassConstructorWithCodeAnalysis>( classType.Constructors, constructor => new SealedClassConstructorWithCodeAnalysis(constructor), constructor => constructor.Constructor, value => classType.Constructors = value); conversionOperators = new WrappedCollection <ClassConversionOperatorWithCodeAnalysis, SealedClassConversionOperatorWithCodeAnalysis>( classType.ConversionOperators, parent => new SealedClassConversionOperatorWithCodeAnalysis(parent), child => child.ConversionOperator, value => classType.ConversionOperators = value); delegates = new WrappedCollection <ClassNestedDelegateWithCodeAnalysis, SealedClassNestedDelegateWithCodeAnalysis>( classType.Delegates, parent => new SealedClassNestedDelegateWithCodeAnalysis(parent), child => child.Delegate, value => classType.Delegates = value); enums = new WrappedCollection <ClassNestedEnumWithCodeAnalysis, SealedClassNestedEnumWithCodeAnalysis>( classType.Enums, parent => new SealedClassNestedEnumWithCodeAnalysis(parent), child => child.Enum, value => classType.Enums = value); events = new InternalSealedClassEventCollectionWithCodeAnalysis <TClass>(classType); fields = new SealedClassFieldCollectionWithCodeAnalysis(classType.Fields); indexers = new InternalSealedClassIndexerCollectionWithCodeAnalysis <TClass>(classType); interfaces = new WrappedCollection <ClassNestedInterfaceWithCodeAnalysis, SealedClassNestedInterfaceWithCodeAnalysis>( classType.Interfaces, parent => new SealedClassNestedInterfaceWithCodeAnalysis(parent), child => child.Interface, value => classType.Interfaces = value); methods = new InternalSealedClassMethodCollectionWithCodeAnalysis <TClass>(classType); operatorOverloads = new WrappedCollection <ClassOperatorOverloadWithCodeAnalysis, SealedClassOperatorOverloadWithCodeAnalysis>( classType.OperatorOverloads, parent => new SealedClassOperatorOverloadWithCodeAnalysis(parent), child => child.OperatorOverload, value => classType.OperatorOverloads = value); properties = new InternalSealedClassPropertyCollectionWithCodeAnalysis <TClass>(classType); structs = new SealedClassNestedStructCollectionWithCodeAnalysis(classType.Structs); InitializeMembers(); }
internal static void AddClassPartialMethods <TPartialMethods>( this IMemberList members, TPartialMethods methods, string insertPartialMethodsAfter = "Methods") where TPartialMethods : IReadOnlyCollection <ClassMethodWithCodeAnalysis>, IHasPartialMethodDefinitions <PartialMethodDefinitionWithCodeAnalysis>, IHasPartialMethodImplementations <PartialMethodImplementationWithCodeAnalysis> { members.Replace("Methods", () => methods.Select(item => item.Syntax)); members.InsertAfter( insertPartialMethodsAfter, nameof(methods.PartialMethodDefinitions), () => methods.PartialMethodDefinitions.Select(item => item.Syntax)); members.InsertAfter( insertPartialMethodsAfter, nameof(methods.PartialMethodImplementations), () => methods.PartialMethodImplementations.Select(item => item.Syntax)); }
internal AbstractPartialTypeWithCodeAnalysis(InternalAbstractTypeWithCodeAnalysis <TClass> classType) { this.classType = classType; members = classType.Members; classes = new AbstractPartialClassNestedClassCollectionWithCodeAnalysis(classType.Classes); constructors = new WrappedCollection <AbstractClassConstructorWithCodeAnalysis, AbstractPartialClassConstructorWithCodeAnalysis>( classType.Constructors, constructor => new AbstractPartialClassConstructorWithCodeAnalysis(constructor), constructor => constructor.Constructor, value => classType.Constructors = value); conversionOperators = new WrappedCollection <AbstractClassConversionOperatorWithCodeAnalysis, AbstractPartialClassConversionOperatorWithCodeAnalysis>( classType.ConversionOperators, parent => new AbstractPartialClassConversionOperatorWithCodeAnalysis(parent), child => child.ConversionOperator, value => classType.ConversionOperators = value); delegates = new WrappedCollection <AbstractClassNestedDelegateWithCodeAnalysis, AbstractPartialClassNestedDelegateWithCodeAnalysis>( classType.Delegates, parent => new AbstractPartialClassNestedDelegateWithCodeAnalysis(parent), child => child.Delegate, value => classType.Delegates = value); enums = new WrappedCollection <AbstractClassNestedEnumWithCodeAnalysis, AbstractPartialClassNestedEnumWithCodeAnalysis>( classType.Enums, parent => new AbstractPartialClassNestedEnumWithCodeAnalysis(parent), child => child.Enum, value => classType.Enums = value); events = new AbstractPartialClassEventCollectionWithCodeAnalysis(classType.Events); fields = new AbstractPartialClassFieldCollectionWithCodeAnalysis(classType.Fields); indexers = new AbstractPartialClassIndexerCollectionWithCodeAnalysis(classType.Indexers); interfaces = new WrappedCollection <AbstractClassNestedInterfaceWithCodeAnalysis, AbstractPartialClassNestedInterfaceWithCodeAnalysis>( classType.Interfaces, parent => new AbstractPartialClassNestedInterfaceWithCodeAnalysis(parent), child => child.Interface, value => classType.Interfaces = value); methods = new InternalAbstractPartialClassMethodCollectionWithCodeAnalysis <TClass>(classType.Type); operatorOverloads = new WrappedCollection <AbstractClassOperatorOverloadWithCodeAnalysis, AbstractPartialClassOperatorOverloadWithCodeAnalysis>( classType.OperatorOverloads, parent => new AbstractPartialClassOperatorOverloadWithCodeAnalysis(parent), child => child.OperatorOverload, value => classType.OperatorOverloads = value); properties = new AbstractPartialClassPropertyCollectionWithCodeAnalysis(classType.Properties); structs = new AbstractPartialClassNestedStructCollectionWithCodeAnalysis(classType.Structs); }
internal ClassCollectionWithCodeAnalysis(NamespaceWithCodeAnalysis @namespace) { members = @namespace.Members; abstractClasses = new NamespaceMemberListWrapper<AbstractClassWithCodeAnalysis, ClassDeclarationSyntax>( @namespace.Node, () => new AbstractClassWithCodeAnalysis(@namespace.Document), ClassDeclarationSyntaxExtensions.IsAbstractClass); classes = new NamespaceMemberListWrapper<ClassWithCodeAnalysis, ClassDeclarationSyntax>( @namespace.Node, () => new ClassWithCodeAnalysis(@namespace.Document), ClassDeclarationSyntaxExtensions.IsClass); sealedClasses = new NamespaceMemberListWrapper<SealedClassWithCodeAnalysis, ClassDeclarationSyntax>( @namespace.Node, () => new SealedClassWithCodeAnalysis(@namespace.Document), ClassDeclarationSyntaxExtensions.IsSealedClass); staticClasses = new NamespaceMemberListWrapper<StaticClassWithCodeAnalysis, ClassDeclarationSyntax>( @namespace.Node, () => new StaticClassWithCodeAnalysis(@namespace.Document), ClassDeclarationSyntaxExtensions.IsStaticClass); partialClasses = PartialClassCollectionWithCodeAnalysis.Create(@namespace); }
internal ClassCollectionWithCodeAnalysis(LoadedDocumentWithCodeAnalysis document) { members = document.Members; abstractClasses = new LoadedDocumentMemberListWrapper<AbstractClassWithCodeAnalysis, ClassDeclarationSyntax>( document.Node, () => new AbstractClassWithCodeAnalysis(document.Document), ClassDeclarationSyntaxExtensions.IsAbstractClass); classes = new LoadedDocumentMemberListWrapper<ClassWithCodeAnalysis, ClassDeclarationSyntax>( document.Node, () => new ClassWithCodeAnalysis(document.Document), ClassDeclarationSyntaxExtensions.IsClass); sealedClasses = new LoadedDocumentMemberListWrapper<SealedClassWithCodeAnalysis, ClassDeclarationSyntax>( document.Node, () => new SealedClassWithCodeAnalysis(document.Document), ClassDeclarationSyntaxExtensions.IsSealedClass); staticClasses = new LoadedDocumentMemberListWrapper<StaticClassWithCodeAnalysis, ClassDeclarationSyntax>( document.Node, () => new StaticClassWithCodeAnalysis(document.Document), ClassDeclarationSyntaxExtensions.IsStaticClass); partialClasses = PartialClassCollectionWithCodeAnalysis.Create(document); }
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) } }; }