• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# IAcSession类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中IAcSession的典型用法代码示例。如果您正苦于以下问题:C# IAcSession类的具体用法?C# IAcSession怎么用?C# IAcSession使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IAcSession类属于命名空间,在下文中一共展示了IAcSession类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: RemoveNodeOntologyCatalogCommand

 public RemoveNodeOntologyCatalogCommand(IAcSession acSession, Guid nodeId, Guid ontologyId, Guid catalogId)
 {
     this.AcSession = acSession;
     this.NodeId = nodeId;
     this.OntologyId = ontologyId;
     this.CatalogId = catalogId;
 }
开发者ID:mingkongbin,项目名称:anycmd,代码行数:7,代码来源:RemoveNodeOntologyCatalogCommand.cs


示例2: Permit

        public bool Permit(IAcSession user, FunctionState function, IManagedObject data)
        {
            if (function == null)
            {
                throw new ArgumentNullException("function");
            }
            // 如果非托管
            if (!function.IsManaged)
            {
                return true;
            }
            if (!user.Identity.IsAuthenticated)
            {
                return false;
            }
            if (user.IsDeveloper())
            {
                return true;
            }
            var functionIDs = user.AccountPrivilege.AuthorizedFunctionIDs;

            if (!functionIDs.Contains(function.Id))
            {
                return false;
            }
            if (data != null)
            {
                // TODO:验证实体级权限。anycmd 1.0版本暂不支持,后续版本支持
            }
            return true;
        }
开发者ID:mingkongbin,项目名称:anycmd,代码行数:31,代码来源:DefaultSecurityService.cs


示例3: SaveHelpCommand

 public SaveHelpCommand(IAcSession acSession, Guid functionId, string content, int? isEnabled)
 {
     this.AcSession = acSession;
     this.FunctionId = functionId;
     this.Content = content;
     this.IsEnabled = isEnabled;
 }
开发者ID:mingkongbin,项目名称:anycmd,代码行数:7,代码来源:SaveHelpCommand.cs


示例4: HandleSeparateGuidString

 protected ActionResult HandleSeparateGuidString(Action<IAcSession, Guid> action, IAcSession acSession, string id, params char[] separator)
 {
     if (action == null)
     {
         throw new ArgumentNullException("action");
     }
     if (id == null)
     {
         throw new ArgumentNullException("id");
     }
     string[] ids = id.Split(separator);
     var idArray = new Guid[ids.Length];
     for (int i = 0; i < ids.Length; i++)
     {
         Guid tmp;
         if (Guid.TryParse(ids[i], out tmp))
         {
             idArray[i] = tmp;
         }
         else
         {
             throw new ValidationException("意外的Guid格式" + ids[i]);
         }
     }
     foreach (var item in idArray)
     {
         action(acSession, item);
     }
     return this.JsonResult(new ResponseData { id = id, success = true });
 }
开发者ID:mingkongbin,项目名称:anycmd,代码行数:30,代码来源:AnycmdController.cs


示例5: UiViewButtonUpdatedEvent

 public UiViewButtonUpdatedEvent(IAcSession acSession, UiViewButtonBase source, IUiViewButtonUpdateIo input)
     : base(acSession, source)
 {
     if (input == null)
     {
         throw new System.ArgumentNullException("input");
     }
     this.Input = input;
 }
开发者ID:mingkongbin,项目名称:anycmd,代码行数:9,代码来源:UiViewButtonUpdatedEvent.cs


示例6: NodeElementCareAddedEvent

 public NodeElementCareAddedEvent(IAcSession acSession, NodeElementCareBase source, INodeElementCareCreateIo output)
     : base(acSession, source)
 {
     if (output == null)
     {
         throw new System.ArgumentNullException("output");
     }
     this.Output = output;
 }
开发者ID:mingkongbin,项目名称:anycmd,代码行数:9,代码来源:NodeElementCareAddedEvent.cs


示例7: OntologyUpdatedEvent

 public OntologyUpdatedEvent(IAcSession acSession, OntologyBase source, IOntologyUpdateIo output)
     : base(acSession, source)
 {
     if (output == null)
     {
         throw new System.ArgumentNullException("output");
     }
     this.Output = output;
 }
开发者ID:mingkongbin,项目名称:anycmd,代码行数:9,代码来源:OntologyUpdatedEvent.cs


示例8: UpdateDbViewColumnCommand

 public UpdateDbViewColumnCommand(IAcSession acSession, IDbViewColumnUpdateInput input)
 {
     if (input == null)
     {
         throw new ArgumentNullException("input");
     }
     this.AcSession = acSession;
     this.Input = input;
 }
开发者ID:mingkongbin,项目名称:anycmd,代码行数:9,代码来源:UpdateDbViewColumnCommand.cs


示例9: InfoDicItemUpdatedEvent

 public InfoDicItemUpdatedEvent(IAcSession acSession, InfoDicItemBase source, IInfoDicItemUpdateIo output)
     : base(acSession, source)
 {
     if (output == null)
     {
         throw new System.ArgumentNullException("output");
     }
     this.Output = output;
 }
开发者ID:mingkongbin,项目名称:anycmd,代码行数:9,代码来源:InfoDicItemUpdatedEvent.cs


示例10: MenuUpdatedEvent

 public MenuUpdatedEvent(IAcSession acSession, MenuBase source, IMenuUpdateIo input)
     : base(acSession, source)
 {
     if (input == null)
     {
         throw new System.ArgumentNullException("input");
     }
     this.Input = input;
 }
开发者ID:mingkongbin,项目名称:anycmd,代码行数:9,代码来源:MenuUpdatedEvent.cs


示例11: ArchiveUpdatedEvent

 public ArchiveUpdatedEvent(IAcSession acSession, ArchiveBase source)
     : base(acSession, source)
 {
     this.DataSource = source.DataSource;
     this.FilePath = source.FilePath;
     this.NumberId = source.NumberId;
     this.UserId = source.UserId;
     this.Password = source.Password;
 }
开发者ID:mingkongbin,项目名称:anycmd,代码行数:9,代码来源:ArchiveUpdatedEvent.cs


示例12: AppSystemAddedEvent

 public AppSystemAddedEvent(IAcSession acSession, AppSystemBase source, IAppSystemCreateIo input)
     : base(acSession, source)
 {
     if (input == null)
     {
         throw new ArgumentNullException("input");
     }
     this.Input = input;
 }
开发者ID:mingkongbin,项目名称:anycmd,代码行数:9,代码来源:AppSystemAddedEvent.cs


示例13: RoleUpdatedEvent

 public RoleUpdatedEvent(IAcSession acSession, RoleBase source, IRoleUpdateIo output)
     : base(acSession, source)
 {
     if (output == null)
     {
         throw new ArgumentNullException("output");
     }
     this.Output = output;
 }
开发者ID:mingkongbin,项目名称:anycmd,代码行数:9,代码来源:RoleUpdatedEvent.cs


示例14: AssignPasswordCommand

 public AssignPasswordCommand(IAcSession acSession, IPasswordAssignIo input)
 {
     if (input == null)
     {
         throw new ArgumentNullException("input");
     }
     this.AcSession = acSession;
     this.Input = input;
 }
开发者ID:mingkongbin,项目名称:anycmd,代码行数:9,代码来源:AssignPasswordCommand.cs


示例15: PrivilegeAddedEvent

 public PrivilegeAddedEvent(IAcSession acSession, PrivilegeBase source, IPrivilegeCreateIo output)
     : base(acSession, source)
 {
     if (output == null)
     {
         throw new System.ArgumentNullException("output");
     }
     this.Output = output;
 }
开发者ID:mingkongbin,项目名称:anycmd,代码行数:9,代码来源:PrivilegeAddedEvent.cs


示例16: NodeOntologyCatalogAddedEvent

 public NodeOntologyCatalogAddedEvent(IAcSession acSession, NodeOntologyCatalogBase source, INodeOntologyCatalogCreateIo output)
     : base(acSession, source)
 {
     if (output == null)
     {
         throw new System.ArgumentNullException("output");
     }
     this.Output = output;
 }
开发者ID:mingkongbin,项目名称:anycmd,代码行数:9,代码来源:NodeOntologyCatalogAddedEvent.cs


示例17: ActionUpdatedEvent

 /// <summary>
 /// 
 /// </summary>
 public ActionUpdatedEvent(IAcSession acSession, ActionBase source)
     : base(acSession, source)
 {
     this.Verb = source.Verb;
     this.Name = source.Name;
     this.IsAllowed = source.IsAllowed;
     this.IsAudit = source.IsAudit;
     this.IsPersist = source.IsPersist;
     this.SortCode = source.SortCode;
 }
开发者ID:mingkongbin,项目名称:anycmd,代码行数:13,代码来源:ActionUpdatedEvent.cs


示例18: AddActiveRole

 public void AddActiveRole(IAcSession subject, IAcSession targetSession, Guid roleId)
 {
     RoleState role;
     if (!_acDomain.RoleSet.TryGetRole(roleId, out role))
     {
         throw new ValidationException("给定标识的角色不存在" + roleId);
     }
     IAcSession session = targetSession;
     if (session == null)
     {
         throw new ValidationException("给定标识的会话不存在");
     }
     session.AccountPrivilege.AddActiveRole(role);
 }
开发者ID:mingkongbin,项目名称:anycmd,代码行数:14,代码来源:DefaultRbacService.cs


示例19: AddDescendant

 public void AddDescendant(IAcSession subject, Guid parentRoleId, IRoleCreateIo childRoleCreateInput)
 {
     _acDomain.Handle(new AddRoleCommand(subject, childRoleCreateInput));
     Debug.Assert(childRoleCreateInput.Id != null, "childRoleCreateInput.Id != null");
     _acDomain.Handle(new AddPrivilegeCommand(subject, new PrivilegeCreateIo
     {
         Id = Guid.NewGuid(),
         SubjectType = UserAcSubjectType.Role.ToName(),
         SubjectInstanceId = childRoleCreateInput.Id.Value,
         ObjectType = AcElementType.Role.ToName(),
         ObjectInstanceId = parentRoleId,
         AcContent = null,
         AcContentType = null
     }));
 }
开发者ID:mingkongbin,项目名称:anycmd,代码行数:15,代码来源:DefaultRbacService.cs


示例20: AppSystemRemovedEvent

 internal AppSystemRemovedEvent(IAcSession acSession, AppSystemBase source, bool isPrivate)
     : this(acSession, source)
 {
     this.IsPrivate = isPrivate;
 }
开发者ID:mingkongbin,项目名称:anycmd,代码行数:5,代码来源:AppSystemRemovedEvent.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IAcceptanceCriteria类代码示例发布时间:2022-05-24
下一篇:
C# IAbstractComponentType类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap