Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }