Пример #1
0
 protected CatalogSubject(SystemUri Uri, INodeCatalogSubject Parent = null)
     : this(new SystemResourceScheme(Uri.Scheme), Uri.Host, Uri.Path, Parent)
 {
 }
Пример #2
0
 protected CatalogSubject(SystemResourceScheme Scheme, string host, string Name, INodeCatalogSubject Parent = null)
 {
     this.Parent           = Parent;
     this.Scheme           = Scheme;
     this.IsRoot           = Parent == null;
     this.SymbolicHost     = host;
     this.Name             = IsRoot ? $"/{host}/{Name}" : Name;
     this.Lineage          = DeriveLineage().ToList();
     this.RelativeLocation = IsRoot ? this.Name : DeriveRelativeLocation();
     this.Urn             = DeriveUrn();
     this.LineageSegments = Urn.NonSchemeComponents.Zip(RelativeLocation.Split('/'), (x, y) => (x, y)).ToList();
     this.Segment         = (Urn.ToString(), RelativeLocation.ToString());
 }