本文整理汇总了C#中SectionViewModel.Initialize方法的典型用法代码示例。如果您正苦于以下问题:C# SectionViewModel.Initialize方法的具体用法?C# SectionViewModel.Initialize怎么用?C# SectionViewModel.Initialize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SectionViewModel
的用法示例。
在下文中一共展示了SectionViewModel.Initialize方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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
示例2: Act
protected override void Act()
{
connectionStringsModel = SectionViewModel.CreateSection(Container, "connectionStrings", section);
connectionStringsModel.Initialize(new InitializeContext(null));
}
示例3: InitializeSection
public static void InitializeSection(SectionViewModel section, InitializeContext context)
{
//first init section
section.Initialize(context);
// then initialize elements
var elements = section.DescendentElements().OfType<ElementViewModel>();
foreach (var element in elements)
{
element.Initialize(context);
}
//then init properties
var sectionPropertiesThatNeedInitialization = section.Properties;
var propertiesOfContainedElementsThatNeedInitialization =
section.DescendentElements().SelectMany(x => x.Properties);
foreach (var propertyThatNeedsInitialization in
sectionPropertiesThatNeedInitialization.Concat(
propertiesOfContainedElementsThatNeedInitialization))
{
propertyThatNeedsInitialization.Initialize(context);
}
}