Ejemplo n.º 1
0
        protected static string GetValueOfAboutNode(INode node, Type type)
        {
            PropertyInfo _;
            var          about = RdfAboutAttribute.Get(type, out _);

            if (String.IsNullOrWhiteSpace(about?.IriFormatString))
            {
                return(null);
            }

            return(RdfAboutAttribute.Unformat(about.IriFormatString, node.ToString()));
        }
Ejemplo n.º 2
0
        protected static INode GetAboutNodeForValue <T>(T value, Type type)
        {
            PropertyInfo _;
            var          about = RdfAboutAttribute.Get(type, out _);

            if (String.IsNullOrWhiteSpace(about?.IriFormatString))
            {
                return(null);
            }

            return(new IriNode(String.Format(about.IriFormatString, value)));
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Gets the <see cref="RdfAboutAttribute" /> of the object.
 /// </summary>
 public RdfAboutAttribute GetAboutAttribute(out PropertyInfo property)
 => RdfAboutAttribute.Get(this.GetType(), out property);