internal static IRestriction CreateRestriction(this IResource resource, IProperty onProperty, uint maxCardinality) { var typeConstrain = resource.Context.Create <IRestriction>(resource.CreateBlankId()); typeConstrain.OnProperty = onProperty; typeConstrain.MaxCardinality = maxCardinality; return(typeConstrain); }
internal static IRestriction CreateRestriction(this IResource resource, Uri onProperty, IEntity allValuesFrom) { var typeConstrain = resource.Context.Create <IRestriction>(resource.CreateBlankId()); typeConstrain.OnProperty = resource.Context.Create <IProperty>(new EntityId(onProperty)); typeConstrain.AllValuesFrom = allValuesFrom; return(typeConstrain); }