本文整理汇总了C#中IFactory.GetOrCreateDomPath方法的典型用法代码示例。如果您正苦于以下问题:C# IFactory.GetOrCreateDomPath方法的具体用法?C# IFactory.GetOrCreateDomPath怎么用?C# IFactory.GetOrCreateDomPath使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IFactory
的用法示例。
在下文中一共展示了IFactory.GetOrCreateDomPath方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetDomPath
public DomPath GetDomPath(IFactory factory)
{
var split = DomPath.Split(new[] { ':' }, StringSplitOptions.RemoveEmptyEntries);
var fullPath = split[0];
var typeNameDepth = int.Parse(split[1]);
var domPath = factory.GetOrCreateDomPath(fullPath, typeNameDepth);
return domPath;
}
示例2: ToProperty
public Property ToProperty(IRepository repository, IFactory factory)
{
var split = DomPath.Split(new[] { ':' }, StringSplitOptions.RemoveEmptyEntries);
var domPath = factory.GetOrCreateDomPath(split[0], int.Parse(split[1]));
var property = factory.CreateProperty(domPath, HasHadNonEmptyValue);
property.CustomName = CustomName;
property.InitializeDefaultPropertyDefinitionSet(
propertyDefinitions =>
propertyDefinitions.Append(DefaultPropertyDefinitionSet.PropertyDefinitions.Select(x => x.ToPropertyDefinition(repository, factory))));
foreach (var proxySet in ExtraPropertyDefinitionSets)
{
var set = proxySet.ToPropertyDefinitionSet(repository, factory);
property.AddOrUpdateExtraPropertyDefinitionSet(set);
}
return property;
}