本文整理汇总了C#中SectionViewModel类的典型用法代码示例。如果您正苦于以下问题:C# SectionViewModel类的具体用法?C# SectionViewModel怎么用?C# SectionViewModel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SectionViewModel类属于命名空间,在下文中一共展示了SectionViewModel类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Act
protected override void Act()
{
var section = new MockSectionWithSingleChild();
section.Children.Add(new TestHandlerDataWithChildren());
this.ViewModel = SectionViewModel.CreateSection(Container, "mock section", section);
}
示例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);
}
示例3: Act
protected override void Act()
{
var configSourceModel = Container.Resolve<ConfigurationSourceModel>();
configSourceModel.Load(source);
sectionViewModel = configSourceModel.Sections.OfType<SectionViewModelEx>().First();
}
示例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();
}
示例5: Arrange
protected override void Arrange()
{
base.Arrange();
SectionWithDifferentCommands section = new SectionWithDifferentCommands();
Viewmodel = SectionViewModel.CreateSection(Container, "SectionWithDifferentCommands", section);
}
示例6: Arrange
protected override void Arrange()
{
base.Arrange();
var section = new MockSectionWithSingleChild();
this.ViewModel = SectionViewModel.CreateSection(Container, "mock section", section);
}
示例7: NotifyPropertyChangedTests
public void NotifyPropertyChangedTests()
{
var vm = new SectionViewModel();
vm.Init(new DetailsViewModel());
TestsHelper.TestPublicPropertiesGetSet(vm);
TestsHelper.TestPropertyWithNotifyPropertyChanged(vm, () => vm.IsVisible);
}
示例8: Arrange
protected override void Arrange()
{
base.Arrange();
sectionViewModel = SectionViewModel.CreateSection(Container, ExceptionHandlingSettings.SectionName, base.Section);
this.Container.RegisterInstance(new Mock<IAssemblyDiscoveryService>().Object);
}
示例9: Arrange
protected override void Arrange()
{
base.Arrange();
sectionViewModel = SectionViewModel.CreateSection(Container, "mocksection", new MockSectionWithUnnamedCollection());
toggleSectionExpandedCommand = sectionViewModel.Commands.OfType<ToggleExpandedCommand>().First();
}
示例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();
}
}
示例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();
}
示例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));
}
示例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();
}
示例15: CanExecutePaperclipsCommandShowBeFalseIfPaperclipsIsNull
public void CanExecutePaperclipsCommandShowBeFalseIfPaperclipsIsNull()
{
var vm = new SectionViewModel();
vm.ArePaperclipsEnabled = true;
vm.CanEditPaperclips = true;
vm.Paperclips = null;
Assert.IsFalse(vm.PaperclipCommand.CanExecute(null));
}