Beispiel #1
0
 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);
 }
Beispiel #2
0
 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)));
 }