Пример #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));
                }
            }
Пример #2
0
Файл: Xmp.cs Проект: 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));
 }