public AddRegistrationPropertyCommand(CommandAttribute commandAttribute, ElementCollectionViewModel collection, IApplicationModel applicationModel, DefaultCollectionElementAddCommand defaultAddPropertyCommand, IUIServiceWpf uiService)
            : base(commandAttribute, collection, defaultAddPropertyCommand, uiService)
        {
            this.collection = collection as InjectionMemberCollectionViewModel;

            this.applicationModel = applicationModel;
        }
        public AddRegistrationPropertyCommand(CommandAttribute commandAttribute, ElementCollectionViewModel collection, IApplicationModel applicationModel, DefaultCollectionElementAddCommand defaultAddPropertyCommand, IUIServiceWpf uiService)
            : base(commandAttribute, collection, defaultAddPropertyCommand, uiService)
        {
            this.collection = collection as InjectionMemberCollectionViewModel;

            this.applicationModel = applicationModel;
        }
        protected TemplatedInjectionMemberCommandContainerBase(CommandAttribute commandAttribute, ElementCollectionViewModel collection, DefaultCollectionElementAddCommand defaultAddCommand, IUIServiceWpf uiService)
            : base(commandAttribute, uiService)
        {
            this.collection      = collection as InjectionMemberCollectionViewModel;
            this.registerElement = collection.ParentElement as RegisterElementViewModel;

            this.defaultAddCommand = defaultAddCommand;

            this.registerElementRegistrationTypeChangedHandler = new EventHandler <EventArgs>(registerElement_RegistrationTypeChanged);
            this.registerElement.RegistrationTypeChanged      += registerElementRegistrationTypeChangedHandler;
        }
        protected TemplatedInjectionMemberCommandContainerBase(CommandAttribute commandAttribute, ElementCollectionViewModel collection, DefaultCollectionElementAddCommand defaultAddCommand, IUIServiceWpf uiService)
            : base(commandAttribute, uiService)
        {
            this.collection = collection as InjectionMemberCollectionViewModel;
            this.registerElement = collection.ParentElement as RegisterElementViewModel;

            this.defaultAddCommand = defaultAddCommand;

            this.registerElementRegistrationTypeChangedHandler = new EventHandler<EventArgs>(registerElement_RegistrationTypeChanged);
            this.registerElement.RegistrationTypeChanged += registerElementRegistrationTypeChangedHandler;
        }
        protected override void Arrange()
        {
            base.Arrange();

            InjectionMembersCollection = (InjectionMemberCollectionViewModel)base.RegistrationElement.ChildElement("InjectionMembers");
            var property = typeof(ClassWithProperty).GetProperties().First();

            AddTemplatedPropertyCommand = new AddTemplatedInjectionPropertyCommand(
                InjectionMembersCollection,
                property,
                UIServiceMock.Object);

            AddTemplatedPropertyCommand.DefaultCollectionElementAddCommandInitialization(Container.Resolve <IApplicationModel>());
        }
        protected override void Arrange()
        {
            base.Arrange();

            InjectionMembersCollection = (InjectionMemberCollectionViewModel)base.RegistrationElement.ChildElement("InjectionMembers");
            var method = typeof(ClassWithIntAndStringMethod).GetMethods().First();

            AddTemplatedMethodCommand = new AddTemplatedRegistrationMethodCommand(
                InjectionMembersCollection,
                method,
                UIServiceMock.Object);

            AddTemplatedMethodCommand.DefaultCollectionElementAddCommandInitialization(Container.Resolve <IApplicationModel>());
        }
        protected override void Arrange()
        {
            base.Arrange();

            InjectionMembersCollection = (InjectionMemberCollectionViewModel)base.RegistrationElement.ChildElement("InjectionMembers");
            var constructor = typeof(ClassWithIntAndStringConstructor).GetConstructors().First();

            AddTemplatedContructorCommand = new AddTemplatedRegistrationConstructorCommand(
                                                    InjectionMembersCollection,
                                                    constructor,
                                                    UIServiceMock.Object);

            AddTemplatedContructorCommand.DefaultCollectionElementAddCommandInitialization(Container.Resolve<IApplicationModel>());
        }
        protected override void Arrange()
        {
            base.Arrange();

            InjectionMembersCollection = (InjectionMemberCollectionViewModel)base.RegistrationElement.ChildElement("InjectionMembers");
            var property = typeof(ClassWithProperty).GetProperties().First();

            AddTemplatedPropertyCommand = new AddTemplatedInjectionPropertyCommand(
                                                    InjectionMembersCollection,
                                                    property,
                                                    UIServiceMock.Object);

            AddTemplatedPropertyCommand.DefaultCollectionElementAddCommandInitialization(Container.Resolve<IApplicationModel>());
        }
 public AddTemplatedRegistrationMethodCommand(InjectionMemberCollectionViewModel collection, MethodInfo method, IUIServiceWpf uiService)
     : base(new ConfigurationElementType(typeof(MethodElement)), collection, uiService)
 {
     this.collection = collection;
     this.method = method;
 }
Example #10
0
 public AddTemplatedRegistrationMethodCommand(InjectionMemberCollectionViewModel collection, MethodInfo method, IUIServiceWpf uiService)
     : base(new ConfigurationElementType(typeof(MethodElement)), collection, uiService)
 {
     this.collection = collection;
     this.method     = method;
 }
 public DefaultCollectionElementAddConstructorCommand(ElementCollectionViewModel collection, IUIServiceWpf uiService)
     : base(new ConfigurationElementType(typeof(ConstructorElement)), collection, uiService)
 {
     this.collection = collection as InjectionMemberCollectionViewModel;
 }
Example #12
0
 public static bool InjectionMembersContainsConstructorElement(InjectionMemberCollectionViewModel membersCollection)
 {
     return(membersCollection.ChildElements.Where(x => typeof(ConstructorElement).IsAssignableFrom(x.ConfigurationType)).Any());
 }
 public DefaultCollectionElementAddConstructorCommand(ElementCollectionViewModel collection, IUIServiceWpf uiService)
     : base(new ConfigurationElementType(typeof(ConstructorElement)), collection, uiService)
 {
     this.collection = collection as InjectionMemberCollectionViewModel;
 }
 public static bool InjectionMembersContainsConstructorElement(InjectionMemberCollectionViewModel membersCollection)
 {
     return membersCollection.ChildElements.Where(x => typeof(ConstructorElement).IsAssignableFrom(x.ConfigurationType)).Any();
 }
 public AddTemplatedRegistrationConstructorCommand(InjectionMemberCollectionViewModel collection, ConstructorInfo constructor, IUIServiceWpf uiService)
     : base(new ConfigurationElementType(typeof(ConstructorElement)), collection, uiService)
 {
     this.collection  = collection;
     this.constructor = constructor;
 }
 public AddTemplatedRegistrationConstructorCommand(InjectionMemberCollectionViewModel collection, ConstructorInfo constructor, IUIServiceWpf uiService)
     : base(new ConfigurationElementType(typeof(ConstructorElement)), collection, uiService)
 {
     this.collection = collection;
     this.constructor = constructor;
 }