/// <summary>
        /// This helper method accepts a resource URI and a value from the DataSpace enum
        /// and determines whether the resource identifies an artifact of that DataSpace.
        /// </summary>
        /// <param name="resource">A URI to an artifact resource</param>
        /// <param name="dataSpace">A DataSpace enum value</param>
        /// <returns>true if the resource identifies an artifact of the specified DataSpace</returns>
        protected static bool IsArtifactOfDataSpace(string resource, DataSpace dataSpace)
        {
            if (dataSpace == DataSpace.CSpace)
            {
                return(MetadataArtifactLoader.IsCSpaceArtifact(resource));
            }

            if (dataSpace == DataSpace.SSpace)
            {
                return(MetadataArtifactLoader.IsSSpaceArtifact(resource));
            }

            if (dataSpace == DataSpace.CSSpace)
            {
                return(MetadataArtifactLoader.IsCSSpaceArtifact(resource));
            }

            Debug.Assert(false, "Invalid DataSpace specified.");
            return(false);
        }