当前位置: 首页>>代码示例>>C#>>正文


C# IRoleType.Normalize方法代码示例

本文整理汇总了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);
 }
开发者ID:whesius,项目名称:allors,代码行数:8,代码来源:RoleBetweenValue.cs

示例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;
 }
开发者ID:whesius,项目名称:allors,代码行数:8,代码来源:RoleBetweenValue.cs

示例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);
 }
开发者ID:whesius,项目名称:allors,代码行数:7,代码来源:RoleLessThanValue.cs

示例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;
 }
开发者ID:whesius,项目名称:allors,代码行数:7,代码来源:RoleGreaterThanValue.cs

示例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;
     }
 }
开发者ID:whesius,项目名称:allors,代码行数:21,代码来源:RoleEqualsValue.cs

示例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;
     }
 }
开发者ID:whesius,项目名称:allors,代码行数:22,代码来源:RoleUnitEqualsValue.cs

示例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);
        }
开发者ID:whesius,项目名称:allors,代码行数:14,代码来源:Strategy.cs


注:本文中的IRoleType.Normalize方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。