protected override void Arrange()
        {
            base.Arrange();

            configurationModel = Container.Resolve <ConfigurationSourceModel>();
            AddApplicationBlockCommandAttribute attribute = new AddApplicationBlockCommandAttribute("appSettings", typeof(AppSettingsSection));

            addBlockCommand = Container.Resolve <AddApplicationBlockCommand>(
                new DependencyOverride <ConfigurationSourceModel>(configurationModel),
                new DependencyOverride <AddApplicationBlockCommandAttribute>(attribute));

            executeChagnedListener = new CanExecuteChangedListener();
            executeChagnedListener.Add(addBlockCommand);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AddTransientFaultHandlingBlockCommand"/> class.
 /// </summary>
 /// <param name="configurationSourceModel">The ConfigurationSourceModel.</param>
 /// <param name="attribute">The AddApplicationBlockCommandAttribute.</param>
 /// <param name="uiService">The IUIServiceWpf.</param>
 public AddTransientFaultHandlingBlockCommand(ConfigurationSourceModel configurationSourceModel, AddApplicationBlockCommandAttribute attribute, IUIServiceWpf uiService)
     : base(configurationSourceModel, attribute, uiService)
 {
 }
Ejemplo n.º 3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="AddApplicationBlockCommand"/> class.
        /// </summary>
        /// <param name="configurationModel">The <see cref="ConfigurationSourceModel"/> instance that represents the configuration source that is currently edited.</param>
        /// <param name="commandAttribute">The <see cref="AddApplicationBlockCommandAttribute"/> that specifes metadata for this <see cref="AddApplicationBlockCommand"/> to be initialized with.</param>
        /// <param name="uiService"></param>
        public AddApplicationBlockCommand(ConfigurationSourceModel configurationModel, AddApplicationBlockCommandAttribute commandAttribute, IUIServiceWpf uiService)
            : base(commandAttribute, uiService)
        {
            this.configurationModel = configurationModel;
            INotifyCollectionChanged collectionChanged = configurationModel.Sections;

            collectionChanged.CollectionChanged += Sections_CollectionChanged;
            this.sectionName = commandAttribute.SectionName;
            this.configurationSectionType = commandAttribute.ConfigurationSectionType;
        }
Ejemplo n.º 4
0
 public AddConfigurationSourcesBlockCommand(ConfigurationSourceModel configurationSourceModel, AddApplicationBlockCommandAttribute attribute, IUIServiceWpf uiService)
     : base(configurationSourceModel, attribute, uiService)
 {
 }
Ejemplo n.º 5
0
 public AddInstrumentationBlockCommand(ConfigurationSourceModel configurationModel, AddApplicationBlockCommandAttribute commandAttribute, IUIServiceWpf uiService)
     : base(configurationModel, commandAttribute, uiService)
 {
 }