internal CompositeTypeWeaverBuilder(Type compositeType, INCopRegistry registry) { var mixinsMap = new MixinsMap(compositeType); var aspectMappedMembers = new AspectMemberMapper(compositeType, mixinsMap); var aspectsMap = new AspectsMap(compositeType, aspectMappedMembers); var typeDefinitionWeaver = new MixinsTypeDefinitionWeaver(compositeType, mixinsMap); var compositeMappedMembers = new CompositeMemberMapper(aspectsMap, aspectMappedMembers); var typeDefinition = typeDefinitionWeaver.Weave(); builder = new MixinsTypeWeaverBuilder(compositeType, typeDefinition, registry); mixinsMap.ForEach(map => { builder.Add(map); }); compositeMappedMembers.Methods.ForEach(compositeMethodMap => { var methodBuilder = new CompositeMethodWeaverBuilder(compositeMethodMap, typeDefinition); builder.Add(methodBuilder); }); compositeMappedMembers.Properties.ForEach(compositePropertyMap => { var propertyBuilder = new CompositePropertyWeaverBuilder(compositePropertyMap, typeDefinition); builder.Add(propertyBuilder); }); }
public CompositeContainer(CompositeRuntimeSettings runtimeSettings = null) { INCopRegistry registry = null; IRuntime compositeRuntime = null; runtimeSettings = runtimeSettings ?? CompositeRuntimeSettings.Empty; compositeAdapter = runtimeSettings.DependencyContainerAdapter ?? new CompositeContainerAdapter(); registry = new CompositeRegistryDecorator(compositeAdapter); compositeRuntime = new CompositeRuntime(runtimeSettings, registry); compositeRuntime.Run(); }
internal MixinsWeaverStrategy(ITypeDefinition typeDefinition, IEnumerable <IMethodWeaver> methodWeavers, INCopRegistry registry) { this.registry = registry; this.methodWeavers = methodWeavers; this.typeDefinition = typeDefinition; }
public MixinsTypeWeaverBuilder(Type type, ITypeDefinition typeDefinition, INCopRegistry registry) : base(type, typeDefinition) { this.registry = registry; mixinsMap = new HashSet <TypeMap>(); }
public NCopRegistryAdapter(INCopRegistry registry) { this.registry = registry; }
public CompositeRuntime(IRuntimeSettings settings, INCopRegistry registry) { this.registry = registry; this.settings = settings ?? new RuntimeSettings(); }
public CompositeRegistryDecorator(INCopRegistry regisrty) { this.regisrty = regisrty; }