Fork me on GitHubEpicdominant domains
APIEpic.OrganizationWorkingSessionBaseAchieve<(Of <<'(TRole>)>>)(TRole%)

Achieve<(Of <(<'TRole>)>)> Method (role)
Achieve the specified role.

Assembly: Epic.Core

Declaration Syntax
C#
public void Achieve<TRole>(
	out TRole role
)
where TRole : class
Generic Template Parameters
TRole
The type of the role to achieve.
Parameters
role (TRole%)
User's role, entry point to a specific context boundary in the domain.
Remarks

This method call a the IsAllowed<(Of <<'(TRole>)>>)()()()() protected method. It will throw InvalidOperationException as far as the method returns falseFalsefalse.

If TRole is allowed to the working session's owner, GetRoleBuilder<(Of <<'(TRole>)>>)()()()() will provide the RoleBuilder<(Of <(<'TRole>)>)> that will build the role for the owner.

Once a role is achieved, all subsequent calls to this method will return the previous instance without any futher call to either IsAllowed<(Of <<'(TRole>)>>)()()()() or GetRoleBuilder<(Of <<'(TRole>)>>)()()()().

Exceptions
ExceptionCondition
InvalidOperationExceptionThe Owner can not achieve the required TRole.
blog comments powered by Disqus