コード例 #1
0
 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();
 }
コード例 #2
0
 internal SealedPartialClassPropertyCollectionWithCodeAnalysis(
     SealedClassPropertyCollectionWithCodeAnalysis propertyCollection)
 {
     this.propertyCollection = propertyCollection;
     autoProperties          = new WrappedCollection <SealedClassAutoPropertyWithCodeAnalysis, SealedPartialClassAutoPropertyWithCodeAnalysis>(
         propertyCollection.AutoProperties,
         parent => new SealedPartialClassAutoPropertyWithCodeAnalysis(parent),
         child => child.Property,
         value => propertyCollection.AutoProperties = value);
     lambdaProperties = new WrappedCollection <SealedClassLambdaPropertyWithCodeAnalysis, SealedPartialClassLambdaPropertyWithCodeAnalysis>(
         propertyCollection.LambdaProperties,
         parent => new SealedPartialClassLambdaPropertyWithCodeAnalysis(parent),
         child => child.Property,
         value => propertyCollection.LambdaProperties = value);
     properties = new WrappedCollection <SealedClassPropertyWithCodeAnalysis, SealedPartialClassPropertyWithCodeAnalysis>(
         propertyCollection.Properties,
         parent => new SealedPartialClassPropertyWithCodeAnalysis(parent),
         child => child.Property,
         value => propertyCollection.Properties = value);
 }