本文整理汇总了C#中IRoleType.Normalize方法的典型用法代码示例。如果您正苦于以下问题:C# IRoleType.Normalize方法的具体用法?C# IRoleType.Normalize怎么用?C# IRoleType.Normalize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IRoleType
的用法示例。
在下文中一共展示了IRoleType.Normalize方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RoleBetweenValue
internal RoleBetweenValue(ExtentFiltered extent, IRoleType roleType, object first, object second)
{
extent.CheckRole(roleType);
PredicateAssertions.ValidateRoleBetween(roleType, first, second);
this.roleType = roleType;
this.first = roleType.Normalize(first);
this.second = roleType.Normalize(second);
}
示例2: AllorsPredicateRoleBetweenValueSql
internal AllorsPredicateRoleBetweenValueSql(AllorsExtentFilteredSql extent, IRoleType roleType, Object first, Object second)
{
extent.CheckRole(roleType);
PredicateAssertions.ValidateRoleBetween(roleType, first, second);
this.roleType = roleType;
this.first = roleType.ObjectType is IUnit ? roleType.Normalize(first) : first;
this.second = roleType.ObjectType is IUnit ? roleType.Normalize(second) : second;
}
示例3: RoleLessThanValue
internal RoleLessThanValue(ExtentFiltered extent, IRoleType roleType, object obj)
{
extent.CheckRole(roleType);
PredicateAssertions.ValidateRoleLessThan(roleType, obj);
this.roleType = roleType;
this.obj = roleType.Normalize(obj);
}
示例4: AllorsPredicateRoleGreaterThanValueSql
internal AllorsPredicateRoleGreaterThanValueSql(AllorsExtentFilteredSql extent, IRoleType roleType, Object obj)
{
extent.CheckRole(roleType);
PredicateAssertions.ValidateRoleGreaterThan(roleType, obj);
this.roleType = roleType;
this.obj = roleType.ObjectType is IUnit ? roleType.Normalize(obj) : obj;
}
示例5: RoleEqualsValue
internal RoleEqualsValue(ExtentFiltered extent, IRoleType roleType, object obj)
{
extent.CheckRole(roleType);
PredicateAssertions.ValidateRoleEquals(roleType, obj);
this.roleType = roleType;
if (obj is Enum)
{
if (((IUnit)roleType.ObjectType).IsInteger)
{
this.obj = (int)obj;
}
else
{
throw new Exception("Role Object Type " + roleType.ObjectType.Name + " doesn't support enumerations.");
}
}
else
{
this.obj = roleType.ObjectType.IsUnit ? roleType.Normalize(obj) : obj;
}
}
示例6: AllorsPredicateRoleUnitEqualsValueSql
internal AllorsPredicateRoleUnitEqualsValueSql(AllorsExtentFilteredSql extent, IRoleType roleType, Object obj)
{
extent.CheckRole(roleType);
PredicateAssertions.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;
}
}
示例7: SetUnitRole
public void SetUnitRole(IRoleType roleType, object unit)
{
if (unit == null)
{
this.RemoveUnitRole(roleType);
return;
}
this.AssertNotDeleted();
RoleAssertions.UnitRoleChecks(this, roleType);
unit = roleType.Normalize(unit);
this.session.SetUnitRole(this.objectId, roleType, unit);
}