/// <summary> /// Determines whether the the given <paramref name="property" /> should /// be included as hydra:SupportedClass. /// </summary> public bool ShouldIncludeProperty(PropertyInfo property) { var propertyName = property.GetJsonPropertyName(); return(JsonLdKeywords.IsKeyword(propertyName) == false && property.GetCustomAttributes <JsonIgnoreAttribute>().Any() == false && property.GetCustomAttributes <IgnoreDataMemberAttribute>().Any() == false); }
/// <summary> /// Initializes the mappings for properties unmapped in @context. /// </summary> internal void InitializeProperties(JObject context) { foreach (var property in typeof(T).GetProperties()) { var contextKey = property.GetJsonPropertyName(); if (JsonLdKeywords.IsKeyword(contextKey)) { continue; } if (context[contextKey] == null) { context.Add(contextKey, this.GetPropertyId(contextKey)); } } }