本文整理汇总了C#中BoxSocial.Internals.ItemKey.Equals方法的典型用法代码示例。如果您正苦于以下问题:C# ItemKey.Equals方法的具体用法?C# ItemKey.Equals怎么用?C# ItemKey.Equals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BoxSocial.Internals.ItemKey
的用法示例。
在下文中一共展示了ItemKey.Equals方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Can
//.........这里部分代码省略.........
{
if (grant.PrimitiveKey.TypeId == ItemType.GetTypeId(core, typeof(User)) && viewer.Id > 0 && grant.PrimitiveKey.Id == viewer.Id)
{
switch (grant.Allow)
{
case AccessControlGrants.Allow:
//HttpContext.Current.Response.Write(" allow User");
allow = true;
break;
case AccessControlGrants.Deny:
//HttpContext.Current.Response.Write(" deny User");
deny = true;
break;
case AccessControlGrants.Inherit:
break;
}
}
if (owner.GetIsMemberOfPrimitive(viewer, grant.PrimitiveKey))
{
switch (grant.Allow)
{
case AccessControlGrants.Allow:
//HttpContext.Current.Response.Write(" allow GetIsMemberOfPrimitive");
allow = true;
break;
case AccessControlGrants.Deny:
//HttpContext.Current.Response.Write(" deny GetIsMemberOfPrimitive");
deny = true;
break;
case AccessControlGrants.Inherit:
break;
}
}
if (grant.PrimitiveKey.Equals(User.GetCreatorKey(core)) && viewer != null && owner.ItemKey.Equals(viewer))
{
switch (grant.Allow)
{
case AccessControlGrants.Allow:
//HttpContext.Current.Response.Write(" allow Creator");
allow = true;
break;
case AccessControlGrants.Deny:
//HttpContext.Current.Response.Write(" deny Creator");
deny = true;
break;
case AccessControlGrants.Inherit:
break;
}
}
}
if (Item.IsItemGroupMember(viewer, grant.PrimitiveKey))
{
switch (grant.Allow)
{
case AccessControlGrants.Allow:
//HttpContext.Current.Response.Write(" allow IsItemGroupMember");
allow = true;
break;
case AccessControlGrants.Deny:
//HttpContext.Current.Response.Write(" deny IsItemGroupMember");
deny = true;
break;
case AccessControlGrants.Inherit:
break;
}
}