Esempio n. 1
0
 internal static void Replace(this IMemberList members, SealedPartialClassMethodCollectionWithCodeAnalysis 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)));
 }
Esempio n. 2
0
 internal SealedPartialTypeWithCodeAnalysis(InternalSealedTypeWithCodeAnalysis <TClass> classType)
 {
     this.classType = classType;
     members        = classType.Type.Members;
     classes        = new SealedPartialClassNestedClassCollectionWithCodeAnalysis(classType.Classes);
     constructors   = new WrappedCollection <SealedClassConstructorWithCodeAnalysis, SealedPartialClassConstructorWithCodeAnalysis>(
         classType.Constructors,
         constructor => new SealedPartialClassConstructorWithCodeAnalysis(constructor),
         constructor => constructor.Constructor,
         value => classType.Constructors = value);
     conversionOperators = new WrappedCollection <SealedClassConversionOperatorWithCodeAnalysis, SealedPartialClassConversionOperatorWithCodeAnalysis>(
         classType.ConversionOperators,
         parent => new SealedPartialClassConversionOperatorWithCodeAnalysis(parent),
         child => child.ConversionOperator,
         value => classType.ConversionOperators = value);
     delegates = new WrappedCollection <SealedClassNestedDelegateWithCodeAnalysis, SealedPartialClassNestedDelegateWithCodeAnalysis>(
         classType.Delegates,
         parent => new SealedPartialClassNestedDelegateWithCodeAnalysis(parent),
         child => child.Delegate,
         value => classType.Delegates = value);
     enums = new WrappedCollection <SealedClassNestedEnumWithCodeAnalysis, SealedPartialClassNestedEnumWithCodeAnalysis>(
         classType.Enums,
         parent => new SealedPartialClassNestedEnumWithCodeAnalysis(parent),
         child => child.Enum,
         value => classType.Enums = value);
     events     = new SealedPartialClassEventCollectionWithCodeAnalysis(classType.Events);
     fields     = new SealedPartialClassFieldCollectionWithCodeAnalysis(classType.Fields);
     indexers   = new SealedPartialClassIndexerCollectionWithCodeAnalysis(classType.Indexers);
     interfaces = new WrappedCollection <SealedClassNestedInterfaceWithCodeAnalysis, SealedPartialClassNestedInterfaceWithCodeAnalysis>(
         classType.Interfaces,
         parent => new SealedPartialClassNestedInterfaceWithCodeAnalysis(parent),
         child => child.Interface,
         value => classType.Interfaces = value);
     methods           = new InternalSealedPartialClassMethodCollectionWithCodeAnalysis <TClass>(classType.Type);
     operatorOverloads = new WrappedCollection <SealedClassOperatorOverloadWithCodeAnalysis, SealedPartialClassOperatorOverloadWithCodeAnalysis>(
         classType.OperatorOverloads,
         parent => new SealedPartialClassOperatorOverloadWithCodeAnalysis(parent),
         child => child.OperatorOverload,
         value => classType.OperatorOverloads = value);
     properties = new SealedPartialClassPropertyCollectionWithCodeAnalysis(classType.Properties);
     structs    = new SealedPartialClassNestedStructCollectionWithCodeAnalysis(classType.Structs);
 }