Beispiel #1
0
 public RoleLike(ExtentFiltered extent, IRoleType role, string like)
 {
     extent.CheckRole(role);
     CompositePredicateAssertions.ValidateRoleLikeFilter(role, like);
     this.role = role;
     this.like = like;
 }
Beispiel #2
0
 public RoleGreaterThanRole(ExtentFiltered extent, IRoleType role, IRoleType greaterThanRole)
 {
     extent.CheckRole(role);
     CompositePredicateAssertions.ValidateRoleGreaterThan(role, greaterThanRole);
     this.role            = role;
     this.greaterThanRole = greaterThanRole;
 }
Beispiel #3
0
 public RoleContainedInExtent(ExtentFiltered extent, IRoleType role, Allors.Extent inExtent)
 {
     extent.CheckRole(role);
     CompositePredicateAssertions.ValidateRoleContainedIn(role, inExtent);
     this.role     = role;
     this.inExtent = ((Extent)inExtent).ContainedInExtent;
 }
Beispiel #4
0
 public RoleEqualsRole(ExtentFiltered extent, IRoleType role, IRoleType equalsRole)
 {
     extent.CheckRole(role);
     CompositePredicateAssertions.ValidateRoleEquals(role, equalsRole);
     this.role       = role;
     this.equalsRole = equalsRole;
 }
 public RoleContainedInEnumerable(ExtentFiltered extent, IRoleType role, IEnumerable <IObject> enumerable)
 {
     extent.CheckRole(role);
     CompositePredicateAssertions.ValidateRoleContainedIn(role, this.enumerable);
     this.role       = role;
     this.enumerable = enumerable;
 }
Beispiel #6
0
 public RoleInstanceof(ExtentFiltered extent, IRoleType role, IObjectType instanceType, IObjectType[] instanceClasses)
 {
     extent.CheckRole(role);
     CompositePredicateAssertions.ValidateRoleInstanceOf(role, instanceType);
     this.role            = role;
     this.instanceClasses = instanceClasses;
 }
Beispiel #7
0
 public RoleContains(ExtentFiltered extent, IRoleType role, IObject allorsObject)
 {
     extent.CheckRole(role);
     CompositePredicateAssertions.ValidateRoleContains(role, allorsObject);
     this.role         = role;
     this.allorsObject = allorsObject;
 }
Beispiel #8
0
 public RoleGreaterThanValue(ExtentFiltered extent, IRoleType roleType, object obj)
 {
     extent.CheckRole(roleType);
     CompositePredicateAssertions.ValidateRoleGreaterThan(roleType, obj);
     this.roleType = roleType;
     this.obj      = roleType.Normalize(obj);
 }
Beispiel #9
0
 public RoleLessThanRole(ExtentFiltered extent, IRoleType role, IRoleType lessThanRole)
 {
     extent.CheckRole(role);
     CompositePredicateAssertions.ValidateRoleLessThan(role, lessThanRole);
     this.role         = role;
     this.lessThanRole = lessThanRole;
 }
Beispiel #10
0
 public RoleBetweenRole(ExtentFiltered extent, IRoleType role, IRoleType first, IRoleType second)
 {
     extent.CheckRole(role);
     CompositePredicateAssertions.ValidateRoleBetween(role, first, second);
     this.role   = role;
     this.first  = first;
     this.second = second;
 }
Beispiel #11
0
 public RoleBetweenValue(ExtentFiltered extent, IRoleType roleType, object first, object second)
 {
     extent.CheckRole(roleType);
     CompositePredicateAssertions.ValidateRoleBetween(roleType, first, second);
     this.roleType = roleType;
     this.first    = roleType.Normalize(first);
     this.second   = roleType.Normalize(second);
 }
Beispiel #12
0
 public RoleEqualsValue(ExtentFiltered extent, IRoleType roleType, object obj)
 {
     extent.CheckRole(roleType);
     CompositePredicateAssertions.ValidateRoleEquals(roleType, obj);
     this.roleType = roleType;
     if (obj is Enum)
     {
         var unitType = roleType.ObjectType as IUnit;
         if (unitType != null && unitType.IsInteger)
         {
             this.obj = (int)obj;
         }
         else
         {
             throw new Exception("Role Object Type " + roleType.ObjectType.SingularName + " doesn't support enumerations.");
         }
     }
     else
     {
         this.obj = roleType.ObjectType is IUnit?roleType.Normalize(obj) : obj;
     }
 }
Beispiel #13
0
 public RoleExists(ExtentFiltered extent, IRoleType role)
 {
     extent.CheckRole(role);
     CompositePredicateAssertions.ValidateRoleExists(role);
     this.role = role;
 }