• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# SectionViewModel类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中SectionViewModel的典型用法代码示例。如果您正苦于以下问题:C# SectionViewModel类的具体用法?C# SectionViewModel怎么用?C# SectionViewModel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



SectionViewModel类属于命名空间,在下文中一共展示了SectionViewModel类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Act

        protected override void Act()
        {
            var section = new MockSectionWithSingleChild();
            section.Children.Add(new TestHandlerDataWithChildren());

            this.ViewModel = SectionViewModel.CreateSection(Container, "mock section", section);
        }
开发者ID:HondaBey,项目名称:EnterpriseLibrary6,代码行数:7,代码来源:when_creating_view_models.cs


示例2: Arrange

        protected override void Arrange()
        {
            base.Arrange();
            var section = new ValidationSettings()
            {
                Types =
                  {
                      new ValidatedTypeReference(typeof (given_string_length_validator_with_lower_greater_than_upper))
                      {
                          Rulesets =
                          {
                              new ValidationRulesetData("ruleSet")
                              {
                                  Validators =
                                  {
                                      new AndCompositeValidatorData("AndComposite1")
                                      {
                                          Validators =
                                          {
                                              new StringLengthValidatorData() { LowerBound = 10, UpperBound = 0, LowerBoundType = Microsoft.Practices.EnterpriseLibrary.Validation.Validators.RangeBoundaryType.Inclusive}
                                          }
                                      }
                                  }
                              }
                          }
                      }
                  }

            };

            ValidationViewModel = SectionViewModel.CreateSection(Container, ValidationSettings.SectionName, section);
            Container.Resolve<ElementLookup>().AddSection(ValidationViewModel);
        }
开发者ID:jmeckley,项目名称:Enterprise-Library-5.0,代码行数:33,代码来源:given_range_bound_validator.cs


示例3: Act

        protected override void Act()
        {
            var configSourceModel = Container.Resolve<ConfigurationSourceModel>();
            configSourceModel.Load(source);

            sectionViewModel = configSourceModel.Sections.OfType<SectionViewModelEx>().First();
        }
开发者ID:HondaBey,项目名称:EnterpriseLibrary6,代码行数:7,代码来源:when_opening_section.cs


示例4: Arrange

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

            ConfigurationSourceBuilder sourceBuilder = new ConfigurationSourceBuilder();

            sourceBuilder
                .ConfigureLogging()
                .WithOptions
                .FilterCustom<MockLogFilter>("filter")
                .LogToCategoryNamed("General")
                .SendTo
                .SystemDiagnosticsListener("listener")
                .SendTo
                .Msmq("msmqlistener")
                .LogToCategoryNamed("Other")
                .SendTo
                .EventLog("eventlog"); ;

            DesignDictionaryConfigurationSource source = new DesignDictionaryConfigurationSource();
            sourceBuilder.UpdateConfigurationWithReplace(source);

            var sourceModel = Container.Resolve<ConfigurationSourceModel>();
            sourceModel.Load(source);

            LoggingSectionViewModel = sourceModel.Sections.Where(x => x.SectionName == LoggingSettings.SectionName).First();
        }
开发者ID:jmeckley,项目名称:Enterprise-Library-5.0,代码行数:27,代码来源:when_loading_logging_settings.cs


示例5: Arrange

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

            SectionWithDifferentCommands section = new SectionWithDifferentCommands();
            Viewmodel = SectionViewModel.CreateSection(Container, "SectionWithDifferentCommands", section);
        }
开发者ID:jmeckley,项目名称:Enterprise-Library-5.0,代码行数:7,代码来源:given_element_view_model_commands.cs


示例6: Arrange

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

            var section = new MockSectionWithSingleChild();
            this.ViewModel = SectionViewModel.CreateSection(Container, "mock section", section);
        }
开发者ID:HondaBey,项目名称:EnterpriseLibrary6,代码行数:7,代码来源:when_adding_unnamed_collection_elements.cs


示例7: NotifyPropertyChangedTests

 public void NotifyPropertyChangedTests()
 {
     var vm = new SectionViewModel();
     vm.Init(new DetailsViewModel());
     TestsHelper.TestPublicPropertiesGetSet(vm);
     TestsHelper.TestPropertyWithNotifyPropertyChanged(vm, () => vm.IsVisible);
 }
开发者ID:mparsin,项目名称:Elements,代码行数:7,代码来源:SearchSectionViewModelTests.cs


示例8: Arrange

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

            sectionViewModel = SectionViewModel.CreateSection(Container, ExceptionHandlingSettings.SectionName, base.Section);
            this.Container.RegisterInstance(new Mock<IAssemblyDiscoveryService>().Object);
        }
开发者ID:jmeckley,项目名称:Enterprise-Library-5.0,代码行数:7,代码来源:when_removing_element_from_element_lookup.cs


示例9: Arrange

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

            sectionViewModel = SectionViewModel.CreateSection(Container, "mocksection", new MockSectionWithUnnamedCollection());
            toggleSectionExpandedCommand = sectionViewModel.Commands.OfType<ToggleExpandedCommand>().First();
        }
开发者ID:jmeckley,项目名称:Enterprise-Library-5.0,代码行数:7,代码来源:given_toggle_section_expanded_command.cs


示例10: Edit

        public ActionResult Edit(SectionViewModel viewmodel)
        {
            IList<Section> list = new List<Section>();
            Section section = null;
            string[] arrSection = Request.Params["SectionName"].Split(',');
            string[] arrSectionId = Request.Params["SectionId"].Split(',');

            for (int i = 0; i < arrSection.Length; i++)
            {
                section = new Section();
                section.EzineId = viewmodel.EzineId;
                section.Id = viewmodel.SectionId;
                section.Id = int.Parse(arrSectionId[i]);
                section.Name = arrSection[i].ToString();

                list.Add(section);
            }

            var result = sectionRepository.EditSection(list);
            if (result)
            {
                return RedirectToAction("Index", "Ezine");
            }
            else
            {
                return View();
            }
        }
开发者ID:JSoon,项目名称:EzineMetroUI,代码行数:28,代码来源:SectionController.cs


示例11: Arrange

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

            var section = new ElementForValidation();

            sectionModel = SectionViewModel.CreateSection(Container, "mock section", section);
        }
开发者ID:jmeckley,项目名称:Enterprise-Library-5.0,代码行数:8,代码来源:when_providing_element_to_validation_error.cs


示例12: Arrange

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

            Viewmodel = SectionViewModel.CreateSection(Container, ExceptionHandlingSettings.SectionName, Section);
            Handler = (CollectionElementViewModel) Viewmodel.DescendentElements(x => typeof(ExceptionHandlerData).IsAssignableFrom(x.ConfigurationType)).First();
            
        }
开发者ID:HondaBey,项目名称:EnterpriseLibrary6,代码行数:8,代码来源:given_delete_element_command.cs


示例13: CanExecutePaperclipsCommandShowBeFalseIfCannotEditPaperclips

        public void CanExecutePaperclipsCommandShowBeFalseIfCannotEditPaperclips()
        {
            var vm = new SectionViewModel();

            vm.ArePaperclipsEnabled = true;
            vm.CanEditPaperclips = false;
            vm.Paperclips = new List<object>();
            Assert.IsFalse(vm.PaperclipCommand.CanExecute(null));
        }
开发者ID:mparsin,项目名称:Elements,代码行数:9,代码来源:DetailsSectionViewModelTests.cs


示例14: Act

        protected override void Act()
        {
            SectionWithExtendedViewModel section = new SectionWithExtendedViewModel();

            var configSourceModel = Container.Resolve<ConfigurationSourceModel>();
            configSourceModel.AddSection("section", section);

            sectionViewModel = configSourceModel.Sections.OfType<SectionViewModel>().First();
        }
开发者ID:HondaBey,项目名称:EnterpriseLibrary6,代码行数:9,代码来源:when_initializing_new_section.cs


示例15: CanExecutePaperclipsCommandShowBeFalseIfPaperclipsIsNull

        public void CanExecutePaperclipsCommandShowBeFalseIfPaperclipsIsNull()
        {
            var vm = new SectionViewModel();

            vm.ArePaperclipsEnabled = true;
            vm.CanEditPaperclips = true;
            vm.Paperclips = null;
            Assert.IsFalse(vm.PaperclipCommand.CanExecute(null));
        }
开发者ID:mparsin,项目名称:Elements,代码行数:9,代码来源:DetailsSectionViewModelTests.cs


示例16: Arrange

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

            var lookup = Container.Resolve<ElementLookup>();
            sectionViewModel = SectionViewModel.CreateSection(Container, LoggingSettings.SectionName, LoggingSection);
            sectionViewModel.Initialize(new InitializeContext());
            lookup.AddSection(sectionViewModel);
        }
开发者ID:HondaBey,项目名称:EnterpriseLibrary6,代码行数:9,代码来源:when_getting_related_elements_on_trace_listeners.cs


示例17: Arrange

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

            exceptionSettingsViewModel = SectionViewModel.CreateSection(Container, ExceptionHandlingSettings.SectionName, new ExceptionHandlingSettings());
            var exceptionPolicyContainer = exceptionSettingsViewModel.GetDescendentsOfType<NamedElementCollection<ExceptionPolicyData>>().First();
            
            addExceptionPolicyCommand = exceptionPolicyContainer.AddCommands.OfType<AddExceptionPolicyCommand>().First();
        }
开发者ID:jmeckley,项目名称:Enterprise-Library-5.0,代码行数:9,代码来源:when_adding_an_exception_policy.cs


示例18: Arrange

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

            var section = new ConfigurationSourceSection();
            section.Sources.Add(new SystemConfigurationSourceElement() { Name = "System Source" });

            var configSource = Container.Resolve<ConfigurationSourceModel>();
            configSourceSectionViewModel = configSource.AddSection(ConfigurationSourceSection.SectionName, section);
        }
开发者ID:HondaBey,项目名称:EnterpriseLibrary6,代码行数:10,代码来源:when_deleting_last_configuration_source.cs


示例19: Arrange

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

            AppSettings = new AppSettingsSection();
            AppSettings.Settings.Add(new KeyValueConfigurationElement("Setting1", "Value1"));
            AppSettings.Settings.Add(new KeyValueConfigurationElement("Setting2", "Value2"));

            AppSettingsView = SectionViewModel.CreateSection(Container, "appSettings", AppSettings);
        }
开发者ID:HondaBey,项目名称:EnterpriseLibrary6,代码行数:10,代码来源:when_creating_app_settings_view_model.cs


示例20: UserProfile

        public ActionResult UserProfile()
        {
            SectionViewModel model = new SectionViewModel();

            model = DecorateViewModel<SectionViewModel>(model);

            model.CourseFormat = CourseFormat.Live;
            model.TimeZones = TimeZones.getDictionary();

            return View(model);
        }
开发者ID:FullStackMichael,项目名称:Corbulo,代码行数:11,代码来源:profilecontroller.cs



注:本文中的SectionViewModel类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Sector类代码示例发布时间:2022-05-24
下一篇:
C# SectionKind类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap