示例#1
0
        public void Execute(IEntityGraphBuilder builder, EntityRegexMatchInfo info)
        {
            List <IEntity>[] match = info.GetMatch();

            builder.Add(new ConditionalRuleRelationship(
                            EntitiesUtils.PrepareToHandle(match[Arguments[0]][0]) as IClassEntity,
                            EntitiesUtils.PrepareToHandle(match[Arguments[1]][0]) as IPropertyEntity,
                            EntitiesUtils.PrepareToHandle(match[Arguments[2]][0]) as IPropertyEntity));
        }
示例#2
0
        public void Execute(IEntityGraphBuilder builder, EntityRegexMatchInfo info)
        {
            List <IEntity>[] match          = info.GetMatch();
            PropertyEntity   propertyEntity = new PropertyEntity(EntitiesUtils.PrepareToHandle(match[Arguments[0]][0]).Value);

            propertyEntity.Range = new CustomRange(ArgumentsDescription[2]);
            builder.Add(propertyEntity);

            ClassEntity classEntity = match[Arguments[1]][0] as ClassEntity;

            PropertyRelationship propertyRelation = new PropertyRelationship(propertyEntity, classEntity);

            builder.Add(propertyRelation);
        }