protected ApplicationModelSkeletonImmutable( ApplicationArchitecture <ApplicationModel <ApplicationSPI> > architecture, Type genericCompositePropertyMixin, Type genericCompositeEventMixin, Type genericFragmentBaseType, DictionaryQuery <CompositeModelType, CompositeModelTypeAssemblyScopeSupport> modelTypeAssemblyScopeSupport, out DictionaryQuery <CompositeModelType, CompositeModelTypeModelScopeSupport> compositeModelTypeSupport, out DictionaryProxy <Int32, CompositeModel> models ) { ArgumentValidator.ValidateNotNull("Application architecture", architecture); ArgumentValidator.ValidateNotNull("Generic composite property mixin", genericCompositePropertyMixin); ArgumentValidator.ValidateNotNull("Generic composite event mixin", genericCompositeEventMixin); ArgumentValidator.ValidateNotNull("Generic fragment base type", genericFragmentBaseType); this._injectionService = new InjectionServiceImpl(); this._genericCompositePropertyMixin = genericCompositePropertyMixin; this._genericCompositeEventMixin = genericCompositeEventMixin; this._genericFragmentBaseType = genericFragmentBaseType; this._collectionsFactory = architecture.CollectionsFactory; this._compositeModelTypeSupport = this._collectionsFactory.NewDictionaryProxy <CompositeModelType, CompositeModelTypeModelScopeSupport>(modelTypeAssemblyScopeSupport.ToDictionary(kvp => kvp.Key, kvp => kvp.Value.CreateModelScopeSupport())).CQ; this._models = this._collectionsFactory.NewDictionaryProxy <Int32, CompositeModel>(); this._validationResult = new Lazy <ApplicationValidationResultIQ>(this.DoValidate, System.Threading.LazyThreadSafetyMode.ExecutionAndPublication); compositeModelTypeSupport = this._compositeModelTypeSupport; models = this._models; this._typeModelDic = new Lazy <DictionaryQuery <CompositeModel, CompositeTypeModel> >(() => this._collectionsFactory.NewDictionaryProxy(this.CompositeModels.Values .Select(cModel => Tuple.Create(cModel, ((CompositeValidationResultImmutable)this._validationResult.Value.CompositeValidationResults[cModel]).TypeModel)) .ToDictionary(tuple => tuple.Item1, tuple => tuple.Item2, ReferenceEqualityComparer <CompositeModel> .ReferenceBasedComparer)).CQ , System.Threading.LazyThreadSafetyMode.ExecutionAndPublication); this._affectedAssemblies = new Lazy <SetQuery <Assembly> >(() => this._collectionsFactory.NewSetProxy(new HashSet <Assembly>( this._typeModelDic.Value .SelectMany(tModel => tModel.Key.PublicTypes .Concat(tModel.Value.PrivateCompositeTypeInfos.Keys) .Concat(tModel.Value.FragmentTypeInfos.Keys) .Concat(tModel.Value.ConcernInvocationTypeInfos.Keys) .Concat(tModel.Value.SideEffectInvocationTypeInfos.Keys)) .Select(type => type.GetAssembly()) )).CQ , System.Threading.LazyThreadSafetyMode.ExecutionAndPublication); }