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())); }
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))); }
/// <summary> /// Gets the <see cref="RdfAboutAttribute" /> of the object. /// </summary> public RdfAboutAttribute GetAboutAttribute(out PropertyInfo property) => RdfAboutAttribute.Get(this.GetType(), out property);