本文整理汇总了C#中IIdentifier类的典型用法代码示例。如果您正苦于以下问题:C# IIdentifier类的具体用法?C# IIdentifier怎么用?C# IIdentifier使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IIdentifier类属于命名空间,在下文中一共展示了IIdentifier类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: EnterpriseDataService
public EnterpriseDataService(IIdentifier identifier, IEnterpriseDataRepository repository, IPersonsUploader uploader)
{
_identifier = identifier;
_enterpriseRepository = repository;
_uploader = uploader;
_enterpriseId = _identifier.EnterpriseId(System.Threading.Thread.CurrentPrincipal.Identity.Name);
}
示例2: AuthorizationHideForSessionFacet
public AuthorizationHideForSessionFacet(IIdentifier identifier,
IAuthorizationManager authorizationManager,
ISpecification holder)
: base(holder) {
this.identifier = identifier;
this.authorizationManager = authorizationManager;
}
示例3: SecurityHideForSessionFacet
public SecurityHideForSessionFacet(IIdentifier identifier,
SecurityFacetDecorator decorator,
IFacetHolder holder)
: base(holder) {
this.identifier = identifier;
this.decorator = decorator;
}
示例4: DescribedAsFacetDynamicWrapI18n
public DescribedAsFacetDynamicWrapI18n(II18nManager manager, IFacetHolder holder, IIdentifier identifier, IDescribedAsFacet describedAsFacet, int index = -1)
: base(Type, holder) {
this.manager = manager;
this.identifier = identifier;
this.describedAsFacet = describedAsFacet;
this.index = index;
}
示例5: NamedFacetDynamicWrapI18n
public NamedFacetDynamicWrapI18n(II18nManager manager, IFacetHolder holder, IIdentifier identifier, INamedFacet namedFacet, int index = -1)
: base(Type, holder) {
this.manager = manager;
this.identifier = identifier;
this.namedFacet = namedFacet;
this.index = index;
}
示例6: AssignmentStatement
/// <summary>
/// Initializes a new instance of the <see cref="AssignmentStatement"/> class.
/// </summary>
/// <param name="id">The identifier.</param>
/// <param name="expression">The expression.</param>
public AssignmentStatement(IIdentifier id, IExpression expression)
{
if (id == null) throw new ArgumentNullException("id");
if (expression == null) throw new ArgumentNullException("expression");
this.ID = id;
this.ID.Type = expression.Type;
this.Expression = expression;
}
示例7: WithScope
public WithScope(WithScope parent, IIdentifier identifier)
{
if (identifier == null)
throw new ArgumentNullException("identifier");
Parent = parent;
Identifier = identifier;
}
示例8: VariableDeclaration
public VariableDeclaration(IIdentifier identifier, ExpressionSyntax expression, bool global)
{
if (identifier == null)
throw new ArgumentNullException("identifier");
Identifier = identifier;
Expression = expression;
Global = global;
}
示例9: FunctionCallExpression
/// <summary>
/// Initializes a new instance of the <see cref="FunctionCallExpression"/> class.
/// </summary>
/// <param name="identifier">The identifier.</param>
/// <param name="argumentList">The argument list.</param>
/// <exception cref="System.ArgumentNullException">argumentList or identifier</exception>
public FunctionCallExpression(IIdentifier identifier, IArgumentList argumentList)
{
if (argumentList == null)
throw new ArgumentNullException("argumentList");
if (identifier == null)
throw new ArgumentNullException("identifier");
this.ArgumentList = argumentList;
this.Identifier = identifier;
}
示例10: CatchClause
public CatchClause(IIdentifier identifier, SyntaxNode statement)
{
if (identifier == null)
throw new ArgumentNullException("identifier");
if (statement == null)
throw new ArgumentNullException("statement");
Identifier = identifier;
Body = statement;
}
示例11: IsVisible
public bool IsVisible(ISession session, INakedObject target, IIdentifier member) {
var checkViewType = member.IsField ? CheckType.ViewField : CheckType.Action;
var checkEditType = member.IsField ? CheckType.EditField : CheckType.Action;
var contextView = new AuthorizationContext((ClaimsPrincipal)session.Principal, member.ToIdentityString(IdentifierDepth.ClassName), ((int)checkViewType).ToString());
var contextEdit = new AuthorizationContext((ClaimsPrincipal)session.Principal, member.ToIdentityString(IdentifierDepth.ClassName), ((int)checkEditType).ToString());
// being editable implies visibility
return manager.CheckAccess(contextView) || manager.CheckAccess(contextEdit);
}
示例12: IsEditable
public bool IsEditable(ISession session, ILifecycleManager lifecycleManager, INakedObjectAdapter target, IIdentifier identifier) {
object authorizer = GetAuthorizer(target, lifecycleManager);
Type authType = authorizer.GetType();
if ((typeof(INamespaceAuthorizer)).IsAssignableFrom(authType)) {
var nameAuth = (INamespaceAuthorizer) authorizer;
return nameAuth.IsEditable(session.Principal, target.Object, identifier.MemberName);
}
return isEditableDelegates[authType](authorizer, session.Principal, target.GetDomainObject(), identifier.MemberName);
}
示例13: Invoke
public void Invoke(INakedObject nakedObject, INakedObject[] parameters, bool queryOnly, IIdentifier identifier) {
Init();
IAuditor auditor = GetNamespaceAuthorizerFor(nakedObject) ?? defaultAuditor;
if (nakedObject.Specification.IsService) {
string serviceName = nakedObject.Specification.GetTitle(nakedObject);
auditor.ActionInvoked(NakedObjectsContext.Session.Principal, identifier.MemberName, serviceName, queryOnly, parameters.Select(no => no.GetDomainObject()).ToArray());
}
else {
auditor.ActionInvoked(NakedObjectsContext.Session.Principal, identifier.MemberName, nakedObject.GetDomainObject(), queryOnly, parameters.Select(no => no.GetDomainObject()).ToArray());
}
}
示例14: Invoke
public void Invoke(INakedObjectAdapter nakedObjectAdapter, INakedObjectAdapter[] parameters, bool queryOnly, IIdentifier identifier, ISession session, ILifecycleManager lifecycleManager) {
IAuditor auditor = GetAuditor(nakedObjectAdapter, lifecycleManager);
IPrincipal byPrincipal = session.Principal;
string memberName = identifier.MemberName;
if (nakedObjectAdapter.Spec is IServiceSpec) {
string serviceName = nakedObjectAdapter.Spec.GetTitle(nakedObjectAdapter);
auditor.ActionInvoked(byPrincipal, memberName, serviceName, queryOnly, parameters.Select(no => no.GetDomainObject()).ToArray());
}
else {
auditor.ActionInvoked(byPrincipal, memberName, nakedObjectAdapter.GetDomainObject(), queryOnly, parameters.Select(no => no.GetDomainObject()).ToArray());
}
}
示例15: IsSpecialCase
/// <summary>
/// Returns true when the name comparison is a special case and should not
/// be used to determine name conflicts.
/// </summary>
/// <param name="whoIsAsking">the identifier that is checking to see if there is a conflict</param>
/// <param name="reservedName">the identifier that would normally be reserved.</param>
/// <returns></returns>
public override bool IsSpecialCase(IIdentifier whoIsAsking, IIdentifier reservedName)
{
if (whoIsAsking is Property && reservedName is CompositeType)
{
var parent = (whoIsAsking as IChild)?.Parent as IIdentifier;
if (ReferenceEquals(parent, reservedName))
{
return false;
}
// special case: properties can have the same name as a compositetype
// unless it is the same name as a parent.
return true;
}
return false;
}