本文整理汇总了C#中IAcSession类的典型用法代码示例。如果您正苦于以下问题:C# IAcSession类的具体用法?C# IAcSession怎么用?C# IAcSession使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IAcSession类属于命名空间,在下文中一共展示了IAcSession类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
示例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;
}
示例3: SaveHelpCommand
public SaveHelpCommand(IAcSession acSession, Guid functionId, string content, int? isEnabled)
{
this.AcSession = acSession;
this.FunctionId = functionId;
this.Content = content;
this.IsEnabled = isEnabled;
}
示例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 });
}
示例5: UiViewButtonUpdatedEvent
public UiViewButtonUpdatedEvent(IAcSession acSession, UiViewButtonBase source, IUiViewButtonUpdateIo input)
: base(acSession, source)
{
if (input == null)
{
throw new System.ArgumentNullException("input");
}
this.Input = input;
}
示例6: NodeElementCareAddedEvent
public NodeElementCareAddedEvent(IAcSession acSession, NodeElementCareBase source, INodeElementCareCreateIo output)
: base(acSession, source)
{
if (output == null)
{
throw new System.ArgumentNullException("output");
}
this.Output = output;
}
示例7: OntologyUpdatedEvent
public OntologyUpdatedEvent(IAcSession acSession, OntologyBase source, IOntologyUpdateIo output)
: base(acSession, source)
{
if (output == null)
{
throw new System.ArgumentNullException("output");
}
this.Output = output;
}
示例8: UpdateDbViewColumnCommand
public UpdateDbViewColumnCommand(IAcSession acSession, IDbViewColumnUpdateInput input)
{
if (input == null)
{
throw new ArgumentNullException("input");
}
this.AcSession = acSession;
this.Input = input;
}
示例9: InfoDicItemUpdatedEvent
public InfoDicItemUpdatedEvent(IAcSession acSession, InfoDicItemBase source, IInfoDicItemUpdateIo output)
: base(acSession, source)
{
if (output == null)
{
throw new System.ArgumentNullException("output");
}
this.Output = output;
}
示例10: MenuUpdatedEvent
public MenuUpdatedEvent(IAcSession acSession, MenuBase source, IMenuUpdateIo input)
: base(acSession, source)
{
if (input == null)
{
throw new System.ArgumentNullException("input");
}
this.Input = input;
}
示例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;
}
示例12: AppSystemAddedEvent
public AppSystemAddedEvent(IAcSession acSession, AppSystemBase source, IAppSystemCreateIo input)
: base(acSession, source)
{
if (input == null)
{
throw new ArgumentNullException("input");
}
this.Input = input;
}
示例13: RoleUpdatedEvent
public RoleUpdatedEvent(IAcSession acSession, RoleBase source, IRoleUpdateIo output)
: base(acSession, source)
{
if (output == null)
{
throw new ArgumentNullException("output");
}
this.Output = output;
}
示例14: AssignPasswordCommand
public AssignPasswordCommand(IAcSession acSession, IPasswordAssignIo input)
{
if (input == null)
{
throw new ArgumentNullException("input");
}
this.AcSession = acSession;
this.Input = input;
}
示例15: PrivilegeAddedEvent
public PrivilegeAddedEvent(IAcSession acSession, PrivilegeBase source, IPrivilegeCreateIo output)
: base(acSession, source)
{
if (output == null)
{
throw new System.ArgumentNullException("output");
}
this.Output = output;
}