예제 #1
0
        /// <inheritdoc />
        public string CreateName(IResource resource)
        {
            string result;

            if (Names.TryGetValue(resource, out result))
            {
                return(result);
            }

            if (resource.Is(resource.Context.Mappings.MappingFor <Web.Http.Description.Rdfs.IClass>().Classes.First().Uri))
            {
                CreateName(resource.AsEntity <IClass>());
            }

            ParseUri(resource);
            return(Names[resource]);
        }
예제 #2
0
        /// <inheritdoc />
        public string CreateName(IResource resource)
        {
            string result;
            if (Names.TryGetValue(resource, out result))
            {
                return result;
            }

            if (resource.Is(resource.Context.Mappings.MappingFor<Web.Http.Description.Rdfs.IClass>().Classes.First().Uri))
            {
                CreateName(resource.AsEntity<IClass>());
            }

            ParseUri(resource);
            return Names[resource];
        }