コード例 #1
0
        public CatalogueElementName(string reference)
        {
            const string method = ".ctor";

            // Use a capturing regex to extract the name, namespace and version.

            Match match = CapturingElementReferenceRegex.Match(reference);

            if (!match.Success)
            {
                throw new InvalidParameterFormatException(typeof(CatalogueElementName), method, "reference", reference, Constants.Validation.CompleteElementReferencePattern);
            }

            m_catalogueName = CatalogueName.CreateUnchecked(match.Groups["CatalogueName"].Value);
            m_element       = match.Groups["Element"].Value;
            m_name          = match.Groups["Name"].Value;
        }