Example #1
0
 protected override void Assemble(Qi4CS.Core.Bootstrap.Assembling.Assembler assembler)
 {
     assembler
     .NewPlainComposite().OfTypes(typeof(TestComposite))
     .WithMixins(typeof(TestMixin)).Done()
     .WithConcerns(typeof(TestConcern)).ApplyWith(typeof(TestAppliesToAttribute));
 }
 protected override void Assemble(Qi4CS.Core.Bootstrap.Assembling.Assembler assembler)
 {
     _injectionValidationCalled = false;
     assembler
     .NewPlainComposite().OfTypes(typeof(TestComposite <>))
     .WithMixins(typeof(TestCompositeMixin <>));
 }
Example #3
0
 public static void SetupTest(Qi4CS.Core.Bootstrap.Assembling.Assembler assembler)
 {
     assembler.NewPlainComposite().OfTypes(typeof(AnyComposite));
     // TODO implementing value composite model type should be done via extension
     //assembler.NewValue().OfTypes( typeof( AnyValue ) );
     assembler.NewPlainComposite().OfTypes(typeof(AnyObject));
 }
 protected override void Assemble(Qi4CS.Core.Bootstrap.Assembling.Assembler assembler)
 {
     assembler
     .NewPlainComposite()
     .OfTypes(typeof(PublicComposite))
     .WithMixins(typeof(PublicCompositeMixin), typeof(PrivateCompositeMixin));
 }
Example #5
0
 protected override void Assemble(Qi4CS.Core.Bootstrap.Assembling.Assembler assembler)
 {
     assembler
     .NewPlainComposite().OfTypes(typeof(TestComposite))
     .WithMixins(typeof(TestCompositeMixin)).Done()
     .WithConcerns(typeof(AbstractTestConcern), typeof(TestConcern));
 }
 protected override void Assemble(Qi4CS.Core.Bootstrap.Assembling.Assembler assembler)
 {
     assembler
     .NewPlainComposite().OfTypes(typeof(TestComposite))
     .WithMixins(typeof(BaseTypeFirstMixin), typeof(BaseTypeSecondMixin), typeof(CounterImpl)).Done()
     .WithSideEffects(typeof(CountCallsSideEffect)).ApplyWith(typeof(TestAppliesToAttribute));
 }
Example #7
0
 protected override void Assemble(Qi4CS.Core.Bootstrap.Assembling.Assembler assembler)
 {
     assembler.NewPlainComposite().OfTypes(
         typeof(Composite1)
         ).WithMixins(
         typeof(Composite1Mixin)
         );
     assembler.NewPlainComposite().OfTypes(
         typeof(Composite2)
         ).WithMixins(
         typeof(BaseMixin <String>)
         );
     assembler.NewPlainComposite().OfTypes(
         typeof(Composite3)
         ).WithMixins(
         typeof(Composite3Mixin)
         );
     assembler.NewPlainComposite().OfTypes(
         typeof(Composite4)
         ).WithMixins(
         typeof(BaseMixin <String>), typeof(BaseMixin <Int32>)
         );
     assembler.NewPlainComposite().OfTypes(
         typeof(Composite5 <>)
         ).WithMixins(
         typeof(Composite5Mixin <>)
         );
     assembler.NewPlainComposite().OfTypes(
         typeof(Composite6 <>)
         ).WithMixins(
         typeof(BaseMixin <>)
         );
 }
Example #8
0
 protected override void Assemble(Qi4CS.Core.Bootstrap.Assembling.Assembler assembler)
 {
     assembler
     .NewPlainComposite().OfTypes(typeof(TestComposite))
     .WithMixins(typeof(TestCompositeMixin)).Done()
     .WithSideEffects(typeof(TestGenericSideEffect1), typeof(TestGenericSideEffect2));
 }
 protected override void Assemble(Qi4CS.Core.Bootstrap.Assembling.Assembler assembler)
 {
     assembler
     .NewPlainComposite().OfTypes(typeof(TestComposite3))
     .WithMixins(typeof(TestComposite3Mixin)).Done()
     .WithConstraints(typeof(TestConstraintImpl));
 }
 protected override void Assemble(Qi4CS.Core.Bootstrap.Assembling.Assembler assembler)
 {
     assembler
     .NewService().OfTypes(typeof(ServiceComposite));
     assembler
     .NewPlainComposite().OfTypes(typeof(ServiceUser))
     .WithMixins(typeof(ServiceUserMixin));
 }
Example #11
0
 protected override void Assemble(Qi4CS.Core.Bootstrap.Assembling.Assembler assembler)
 {
     assembler
     .NewService().OfTypes(typeof(SuccessDataService))
     .WithMixins(typeof(SuccessDataServiceMixin));
     assembler
     .NewService().OfTypes(typeof(FailingDataService))
     .WithMixins(typeof(FailingDataServiceMixin));
 }
 protected override void Assemble(Qi4CS.Core.Bootstrap.Assembling.Assembler assembler)
 {
     assembler
     .NewPlainComposite().OfTypes(typeof(TestTransient))
     .WithMixins(typeof(TestTransientMixin));
     assembler
     .NewPlainComposite().OfTypes(typeof(TestTransientWithPrivateComposite))
     .WithMixins(typeof(TestTransientWithPrivateCompositeMixin), typeof(TestPrivateCompositeMixin));
 }
Example #13
0
 protected override void Assemble(Qi4CS.Core.Bootstrap.Assembling.Assembler assembler)
 {
     assembler
     .NewService().OfTypes(typeof(TestServiceWithUsesGiven))
     .WithMixins(typeof(TestServiceMixin)).Done()
     .Use(USES);
     assembler
     .NewService().OfTypes(typeof(TestServiceWithNoUsesGiven))
     .WithMixins(typeof(TestServiceMixinWithSpecialMethod));
 }
 protected override void Assemble(Qi4CS.Core.Bootstrap.Assembling.Assembler assembler)
 {
     assembler
     .NewPlainComposite().OfTypes(typeof(GenericComposite <>))
     .WithMixins(typeof(GenericCompositeMixin <>)).Done()
     .WithConcerns(typeof(GenericCompositeGenericConcern), typeof(GenericCompositeConcern <>));
     assembler
     .NewPlainComposite().OfTypes(typeof(ComplexGenericComposite <>))
     .WithMixins(typeof(GenericCompositeMixin <>), typeof(ComplexGenericCompositeMixin <>)).Done()
     .WithConcerns(typeof(GenericCompositeGenericConcern), typeof(GenericCompositeConcern <>));
 }
Example #15
0
 protected override void Assemble(Qi4CS.Core.Bootstrap.Assembling.Assembler assembler)
 {
     assembler
     .NewPlainComposite().OfTypes(typeof(TestComposite))
     .WithMixins(typeof(TestCompositeMixin));
     assembler
     .NewPlainComposite().OfTypes(typeof(TestComposite2))
     .WithMixins(typeof(TestCompositeMixinSub));
     assembler
     .NewPlainComposite().OfTypes(typeof(TestComposite3))
     .WithMixins(typeof(TestCompositeMixinSubSub));
 }
Example #16
0
        protected override void Assemble(Qi4CS.Core.Bootstrap.Assembling.Assembler assembler)
        {
            assembler.NewService().AsFunctionAggregator <Type, TestFunction>()
            .WithFunctionType(
                FunctionAssemblerUtils.TypeBasedFunctionLookUp(0)
                )
            .WithDefaultFunctions(
                Tuple.Create <Type[], Func <StructureServiceProvider, TestFunction> >(new Type[] { typeof(MyData) }, ssp => ssp.NewPlainCompositeBuilder <MyFunction>().Instantiate())
                ).Done()
            .OfTypes(typeof(TestService));

            assembler.NewPlainComposite().OfTypes(typeof(MyData));
            assembler.NewPlainComposite().OfTypes(typeof(MyFunction));
        }
Example #17
0
 protected override void Assemble(Qi4CS.Core.Bootstrap.Assembling.Assembler assembler)
 {
     assembler
     .NewService().OfTypes(typeof(TestServiceWithTwoFilterAttributes))
     .WithMixins(typeof(TestServiceMixinWithTwoFilterAttributes)).Done()
     .WithConcerns(typeof(TestConcern)).ApplyWith(typeof(FirstAttribute), typeof(SecondAttribute));
     assembler
     .NewService().OfTypes(typeof(TestServiceWithFirstFilterAttribute))
     .WithMixins(typeof(TestServiceMixinWithFirstFilterAttribute)).Done()
     .WithConcerns(typeof(TestConcern)).ApplyWith(typeof(FirstAttribute), typeof(SecondAttribute));
     assembler
     .NewService().OfTypes(typeof(TestServiceWithSecondFilterAttribute))
     .WithMixins(typeof(TestServiceMixinWithSecondFilterAttribute)).Done()
     .WithConcerns(typeof(TestConcern)).ApplyWith(typeof(FirstAttribute), typeof(SecondAttribute));
 }
Example #18
0
 protected override void Assemble(Qi4CS.Core.Bootstrap.Assembling.Assembler assembler)
 {
     assembler
     .NewPlainComposite().OfTypes(typeof(TestComposite));
     assembler
     .NewPlainComposite()
     .OfTypes(typeof(TestCompositeWithConstraints))
     .WithConstraints(typeof(TestConstraintImpl));
     assembler
     .NewPlainComposite()
     .OfTypes(typeof(TestCompositeWithBooleanProperty));
     assembler
     .NewPlainComposite()
     .OfTypes(typeof(TestComposite64));     // This composite is only for checking that code generation emits appropriate read methods and check in compostei constructor.
 }
Example #19
0
 protected override void Assemble(Qi4CS.Core.Bootstrap.Assembling.Assembler assembler)
 {
     assembler
     .NewPlainComposite().OfTypes(typeof(CollectionWithRoles <,>))
     .WithMixins(typeof(CollectionWithRolesMixin <,>), typeof(CollectionMutableQueryMixin <,>), typeof(CollectionImmutableQueryMixin <,>));
     assembler
     .NewPlainComposite().OfTypes(typeof(ListWithRoles <,>))
     .WithMixins(typeof(ListWithRolesMixin <,>), typeof(ListMutableQueryMixin <,>), typeof(ListImmutableQueryMixin <,>), typeof(CollectionImmutableQueryMixin <,>), typeof(CollectionMutableQueryMixin <,>), typeof(CollectionWithRolesMixin <,>));
     assembler
     .NewService().OfTypes(typeof(CollectionsFactory))
     .WithMixins(typeof(CollectionsFactoryMixin));
     assembler
     .NewPlainComposite().OfTypes(typeof(Int32Object))
     .WithMixins(typeof(Int32ObjectMixin), typeof(Int32ObjectIQMixin));
     assembler
     .NewService().OfTypes(typeof(ObjectsFactory))
     .WithMixins(typeof(ObjectsFactoryMixin));
 }
        protected override void Assemble(Qi4CS.Core.Bootstrap.Assembling.Assembler assembler)
        {
            assembler
            .NewService().OfTypes(typeof(ServiceComposite1))
            .WithMixins(typeof(ServiceComposite1Mixin));

            assembler
            .NewService()
            .SetActivateWithApplication(true)
            .OfTypes(typeof(ServiceComposite2))
            .WithMixins(typeof(ServiceComposite2Mixin));

            assembler
            .NewService().OfTypes(typeof(ServiceComposite3))
            .WithMixins(typeof(ServiceComposite3Mixin), typeof(ServiceComposite3Lifecycle));


            _isActive1 = false;
            _isActive2 = false;
        }
Example #21
0
 protected override void Assemble(Qi4CS.Core.Bootstrap.Assembling.Assembler assembler)
 {
     assembler.NewPlainComposite().OfTypes(typeof(TestComposite1));
     assembler.NewPlainComposite().OfTypes(typeof(TestComposite2));
 }
Example #22
0
 protected override void Assemble(Qi4CS.Core.Bootstrap.Assembling.Assembler assembler)
 {
     assembler
     .NewPlainComposite().OfTypes(typeof(SpecifiedComposite))
     .WithMixins(typeof(BaseGenericCompositeMixin <>));
 }
 protected override void Assemble(Qi4CS.Core.Bootstrap.Assembling.Assembler assembler)
 {
     assembler.NewPlainComposite().OfTypes(typeof(First.TheTestComposite)).WithMixins(typeof(First.TheTestMixin));
     assembler.NewPlainComposite().OfTypes(typeof(Second.TheTestComposite)).WithMixins(typeof(Second.TheTestMixin));
 }
 protected override void Assemble(Qi4CS.Core.Bootstrap.Assembling.Assembler assembler)
 {
     assembler.NewService().OfTypes(typeof(TestService1));
     assembler.NewService().OfTypes(typeof(TestService2));
 }
Example #25
0
 protected override void Assemble(Qi4CS.Core.Bootstrap.Assembling.Assembler assembler)
 {
     assembler
     .NewPlainComposite().OfTypes(typeof(CompositeType), typeof(RoleType))
     .WithMixins(typeof(RoleMixin));
 }
Example #26
0
 protected override void Assemble(Qi4CS.Core.Bootstrap.Assembling.Assembler assembler)
 {
     assembler.NewService().SetActivateWithApplication(true).OfTypes(typeof(TestService));
 }
Example #27
0
 protected override void Assemble(Qi4CS.Core.Bootstrap.Assembling.Assembler assembler)
 {
     assembler.NewPlainComposite().OfTypes(typeof(TestObject));
     assembler.NewPlainComposite().OfTypes(typeof(TestObjectWithConcern)).WithConcerns(typeof(TestObjectConcern));
     assembler.NewPlainComposite().OfTypes(typeof(TestObjectWithSideEffect)).WithSideEffects(typeof(TestObjectSideEffect));
 }
 protected override void Assemble(Qi4CS.Core.Bootstrap.Assembling.Assembler assembler)
 {
     SetupTest(assembler);
 }
 public static void SetupTest(Qi4CS.Core.Bootstrap.Assembling.Assembler assembler)
 {
     assembler.NewPlainComposite().OfTypes(typeof(TestComposite));
     assembler.NewPlainComposite().OfTypes(typeof(TestWithTypedConcernComposite));
     assembler.NewPlainComposite().OfTypes(typeof(TestWithGenericConcernComposite));
 }
 protected override void Assemble(Qi4CS.Core.Bootstrap.Assembling.Assembler assembler)
 {
     assembler
     .NewPlainComposite().OfTypes(typeof(RealObjectComposite))
     .WithMixins(typeof(IFaceImpl), typeof(IFaceImpl2));
 }