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();

            applicationModelMock = new Mock<IApplicationModel>();

            Container.RegisterInstance<IApplicationModel>(applicationModelMock.Object);

            var section = SectionViewModel.CreateSection(Container, "appSettings", new AppSettingsSection());
            addCommand = section.ChildElements.First().Commands.OfType<DefaultCollectionElementAddCommand>().First();

            applicationModelMock.Setup(x => x.SetDirty()).Verifiable();
        }
        protected override void Arrange()
        {
            base.Arrange();

            applicationModelMock = new Mock <IApplicationModel>();

            Container.RegisterInstance <IApplicationModel>(applicationModelMock.Object);

            var section = SectionViewModel.CreateSection(Container, "appSettings", new AppSettingsSection());

            addCommand = section.ChildElements.First().Commands.OfType <DefaultCollectionElementAddCommand>().First();

            applicationModelMock.Setup(x => x.SetDirty()).Verifiable();
        }
 public AddRegistrationMethodCommand(CommandAttribute commandAttribute, ElementCollectionViewModel collection, IApplicationModel applicationModel, DefaultCollectionElementAddCommand defaultAddMethodCommand, IUIServiceWpf uiService)
     : base(commandAttribute, collection, defaultAddMethodCommand, uiService)
 {
     this.applicationModel = applicationModel;
     this.collection       = collection as InjectionMemberCollectionViewModel;
 }