コード例 #1
0
        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
0
        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);
        }