当前位置: 首页>>代码示例>>C#>>正文


C# IIdentifier类代码示例

本文整理汇总了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);
 }
开发者ID:asdlvs,项目名称:MinStat,代码行数:7,代码来源:EnterpriseDataService.cs

示例2: AuthorizationHideForSessionFacet

 public AuthorizationHideForSessionFacet(IIdentifier identifier,
                                         IAuthorizationManager authorizationManager,
                                         ISpecification holder)
     : base(holder) {
     this.identifier = identifier;
     this.authorizationManager = authorizationManager;
 }
开发者ID:Robin--,项目名称:NakedObjectsFramework,代码行数:7,代码来源:AuthorizationHideForSessionFacet.cs

示例3: SecurityHideForSessionFacet

 public SecurityHideForSessionFacet(IIdentifier identifier,
                                    SecurityFacetDecorator decorator,
                                    IFacetHolder holder)
     : base(holder) {
     this.identifier = identifier;
     this.decorator = decorator;
 }
开发者ID:radi4music,项目名称:NakedObjectsFramework,代码行数:7,代码来源:SecurityFacetDecorator.cs

示例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;
 }
开发者ID:radi4music,项目名称:NakedObjectsFramework,代码行数:7,代码来源:DescribedAsFacetDynamicWrapI18n.cs

示例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;
        }
开发者ID:radi4music,项目名称:NakedObjectsFramework,代码行数:8,代码来源:NamedFacetDynamicWrapI18n.cs

示例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;
 }
开发者ID:JaCraig,项目名称:PNZR,代码行数:13,代码来源:AssignmentStatement.cs

示例7: WithScope

        public WithScope(WithScope parent, IIdentifier identifier)
        {
            if (identifier == null)
                throw new ArgumentNullException("identifier");

            Parent = parent;
            Identifier = identifier;
        }
开发者ID:pvginkel,项目名称:Jint2,代码行数:8,代码来源:WithScope.cs

示例8: VariableDeclaration

        public VariableDeclaration(IIdentifier identifier, ExpressionSyntax expression, bool global)
        {
            if (identifier == null)
                throw new ArgumentNullException("identifier");

            Identifier = identifier;
            Expression = expression;
            Global = global;
        }
开发者ID:pvginkel,项目名称:Jint2,代码行数:9,代码来源:VariableDeclaration.cs

示例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;
 }
开发者ID:JaCraig,项目名称:PNZR,代码行数:15,代码来源:FunctionCallExpression.cs

示例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;
        }
开发者ID:pvginkel,项目名称:Jint2,代码行数:10,代码来源:CatchClause.cs

示例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);
        }
开发者ID:radi4music,项目名称:NakedObjectsFramework,代码行数:10,代码来源:WifAuthorizer.cs

示例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);
        }
开发者ID:Robin--,项目名称:NakedObjectsFramework,代码行数:10,代码来源:AuthorizationManager.cs

示例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());
            }
        }
开发者ID:radi4music,项目名称:NakedObjectsFramework,代码行数:12,代码来源:AuditManager.cs

示例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());
            }
        }
开发者ID:Robin--,项目名称:NakedObjectsFramework,代码行数:13,代码来源:AuditManager.cs

示例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;
 }
开发者ID:devigned,项目名称:autorest,代码行数:22,代码来源:CodeNamerCs.cs


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