Esempio n. 1
0
            public XmpSearchEntry(Xmp parent, bool isMandatory, string targetMetadata, string xmpPath)
            {
                _parent          = parent;
                this.IsMandatory = isMandatory;
                this.MetadataKey = targetMetadata;
                this.XmpPath     = xmpPath;
                string alias = Regex.Replace(XmpPath, @"^(?<ns>[^:]+):(?<name>.+)$", "${ns}");

                if (!_parent._namespaceAlias.ContainsKey(alias))
                {
                    throw new ArgumentException($"Namespace alias {alias} unknown.", nameof(xmpPath));
                }
            }
Esempio n. 2
0
File: Xmp.cs Progetto: ibebbs/Wyam
 public XmpSearchEntry(Xmp parent, bool isMandatory, string targetMetadata, string xmpPath)
 {
     _parent = parent;
     this.IsMandatory = isMandatory;
     this.MetadataKey = targetMetadata;
     this.XmpPath = xmpPath;
     string alias = Regex.Replace(XmpPath, @"^(?<ns>[^:]+):(?<name>.+)$", "${ns}");
     if (!_parent._namespaceAlias.ContainsKey(alias))
         throw new ArgumentException($"Namespace alias {alias} unknown.", nameof(xmpPath));
 }