Example #1
0
 public ParameterModelState(CollectionsFactory factory)
     : base(factory)
 {
     this._constraints = factory.NewList <ConstraintModelMutable, ConstraintModelMutable, ConstraintModel>();
 }
Example #2
0
 /// <summary>
 /// Creates a new <see cref="SetProxy{TValue}"/> directly from method parameters. The underlying set will be <see cref="System.Collections.Generic.HashSet{TValue}"/>.
 /// </summary>
 /// <typeparam name="TValue">The type of set elements.</typeparam>
 /// <param name="factory">The <see cref="CollectionsFactory"/>.</param>
 /// <param name="values">The values for the returned set proxy to contain.</param>
 /// <returns>A new <see cref="SetProxy{TValue}"/> with given values.</returns>
 /// <exception cref="NullReferenceException">If <paramref name="factory"/> is <c>null</c>.</exception>
 public static SetProxy <TValue> NewSetProxyFromParams <TValue>(this CollectionsFactory factory, params TValue[] values)
 {
     return(factory.NewSetProxy <TValue>(new HashSet <TValue>(values ?? Empty <TValue> .Array)));
 }
Example #3
0
 /// <summary>
 /// Creates a new <see cref="ArrayProxy{TValue}"/> directly from method parameters.
 /// </summary>
 /// <typeparam name="TValue">The type of array elements.</typeparam>
 /// <param name="factory">The <see cref="CollectionsFactory"/>.</param>
 /// <param name="values">The values for the returned array proxy to contain.</param>
 /// <returns>A new <see cref="ArrayProxy{TValue}"/> with given values.</returns>
 /// <exception cref="NullReferenceException">If <paramref name="factory"/> is <c>null</c>.</exception>
 public static ArrayProxy <TValue> NewArrayProxyFromParams <TValue>(this CollectionsFactory factory, params TValue[] values)
 {
     return(factory.NewArrayProxy(values));
 }
Example #4
0
 internal LayeredCompositeAssemblerImpl(ModuleArchitecture moduleArchitecture, Func <Int32> newCompositeIDRequestor, DictionaryQuery <CompositeModelType, CompositeModelTypeAssemblyScopeSupport> modelSupport, UsesContainerMutable parentContainer, CollectionsFactory collectionsFactory)
     : base(moduleArchitecture.Layer.Architecture, newCompositeIDRequestor, modelSupport, parentContainer, collectionsFactory)
 {
     this._module = moduleArchitecture;
 }
Example #5
0
 public DomainSpecificAssemblerAggregatorImpl(CollectionsFactory factory)
 {
     this._assemblers = factory.NewListProxy <DomainSpecificAssembler <TAssemblingUnit> >();
 }
 public ServiceCompositeModelState(CollectionsFactory factory)
     : base(factory)
 {
 }
Example #7
0
 public EventModelState(CollectionsFactory collectionsFactory)
     : base(collectionsFactory)
 {
 }
 protected override Bootstrap.Assembling.AbstractCompositeAssemblyDeclaration DoCreateAssemblyDeclarationForNew(Bootstrap.Assembling.Assembler assembler, DictionaryWithRoles <Type, ListProxy <CompositeAssemblyInfo>, ListProxyQuery <CompositeAssemblyInfo>, ListQuery <CompositeAssemblyInfo> > compositeAssemblyInfos, CompositeAssemblyInfo assemblyInfo, CollectionsFactory collectionsFactory)
 {
     return(new LayeredServiceCompositeAssemblyDeclarationForNewImpl(assembler, compositeAssemblyInfos, (LayeredServiceCompositeAssemblyInfo)assemblyInfo, collectionsFactory));
 }
        public AbstractCompositeAssemblyDeclarationForNewImpl(Assembler assembler, DictionaryWithRoles <Type, ListProxy <CompositeAssemblyInfo>, ListProxyQuery <CompositeAssemblyInfo>, ListQuery <CompositeAssemblyInfo> > compositeAssemblyInfos, CompositeAssemblyInfo thisInfo, CollectionsFactory collectionsFactory)
        {
            ArgumentValidator.ValidateNotNull("Assembler", assembler);
            ArgumentValidator.ValidateNotNull("Assembly infos", compositeAssemblyInfos);
            ArgumentValidator.ValidateNotNull("This composite info", thisInfo);
            ArgumentValidator.ValidateNotNull("Collections factory", collectionsFactory);

            this._assembler          = assembler;
            this._composites         = compositeAssemblyInfos;
            this._info               = thisInfo;
            this._collectionsFactory = collectionsFactory;
        }
Example #10
0
 /// <summary>
 /// Get Author instance for test.
 /// </summary>
 /// <returns>author instance</returns>
 public Author GetTestAuthor()
 {
     return(CollectionsFactory.GetAuthorsCollection().First());
 }
Example #11
0
 /// <summary>
 /// Count the number of authors.
 /// </summary>
 /// <returns></returns>
 public int CountAuthorsInCollection()
 {
     return(CollectionsFactory.GetAuthorsCollection().Count());
 }
 internal LayeredPlainCompositeAssemblyDeclarationForNewImpl(Assembler assembler, DictionaryWithRoles <Type, ListProxy <CompositeAssemblyInfo>, ListProxyQuery <CompositeAssemblyInfo>, ListQuery <CompositeAssemblyInfo> > compositeAssemblyInfos, LayeredCompositeAssemblyInfo assemblyInfo, CollectionsFactory collectionsFactory)
     : base(assembler, compositeAssemblyInfos, assemblyInfo, collectionsFactory)
 {
 }
 public SpecialMethodModelState(CollectionsFactory factory)
     : base(factory)
 {
     this._parameters = factory.NewList <ParameterModelMutable, ParameterModelMutable, ParameterModel>();
 }
Example #14
0
 public PropertyModelState(CollectionsFactory factory)
     : base(factory)
 {
 }
 public ServiceCompositeAssemblyDeclarationForNewImpl(Assembler assembler, DictionaryWithRoles <Type, ListProxy <CompositeAssemblyInfo>, ListProxyQuery <CompositeAssemblyInfo>, ListQuery <CompositeAssemblyInfo> > compositeAssemblyInfos, CompositeAssemblyInfo info, CollectionsFactory collectionsFactory)
     : base(assembler, compositeAssemblyInfos, info, collectionsFactory)
 {
 }
Example #16
0
 /// <summary>
 /// Get Review instance for test.
 /// </summary>
 /// <returns>Review instance</returns>
 public Review GetTestReview()
 {
     return(CollectionsFactory.GetReviewsCollection().First());
 }
Example #17
0
 public AbstractValidationResultState(CollectionsFactory cf)
 {
     this._structureValidation = cf.NewListProxy <StructureValidationError>();
     this._injectionValidation = cf.NewListProxy <InjectionValidationError>();
     this._internalValidation  = cf.NewListProxy <InternalValidationError>();
 }
Example #18
0
 /// <summary>
 /// Count the number of reviews.
 /// </summary>
 /// <returns></returns>
 public int CountReviewsInCollection()
 {
     return(CollectionsFactory.GetReviewsCollection().Count());
 }
        protected DictionaryQuery <Type, InstancePoolInfo <TInvocation> > CreatePoolDictionary <TTypeGen, TInvocation>(Type[] gArgs, IEnumerable <TTypeGen> typeGenResults, CollectionsFactory collectionsFactory)
            where TTypeGen : TypeGenerationResult
        {
            DictionaryProxy <Type, InstancePoolInfo <TInvocation> > result = collectionsFactory.NewDictionaryProxy <Type, InstancePoolInfo <TInvocation> >();

            foreach (var genResult in typeGenResults)
            {
                var genType = genResult.GeneratedType;
                if (gArgs != null)
                {
                    genType = genType.MakeGenericType(gArgs);
                }
                else if (genType.ContainsGenericParameters())
                {
                    throw new InternalException("Could not find generic arguments for " + genResult.DeclaredType + ".");
                }
                result.Add(genType, new InstancePoolInfoImpl <TInvocation>(new InstancePool <TInvocation>(), genType, genResult));
            }
            return(result.CQ);
        }
Example #20
0
 protected override void CreateCompositeModelObjects(CompositeAssemblyInfo info, CollectionsFactory factory, out CompositeModelState state, out CompositeModelImmutable resultImmutable, out CompositeModelMutable result)
 {
     state           = new ServiceCompositeModelState(factory);
     resultImmutable = new ServiceCompositeModelImmutable((ServiceCompositeModelState)state);
     result          = new ServiceCompositeModelMutable((ServiceCompositeModelState)state, (ServiceCompositeModel)resultImmutable);
 }