internal static void Replace(this IMemberList members, AbstractPartialClassMethodCollectionWithCodeAnalysis value) { members.CombineList( new MemberListSyntax(nameof(value.AbstractMethods), value.AbstractMethods.Select(method => method.Syntax)), 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))); }
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); }