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

C# AccessType类代码示例

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

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



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

示例1: User

 public User(string name, string password, AccessType accessType, List<Directory> directories)
 {
     Name = name;
     Password = password;
     AccessType = accessType;
     Directories = directories;
 }
开发者ID:oleksandrkin,项目名称:data-security,代码行数:7,代码来源:User.cs


示例2: ProductDefectionsVM

        public ProductDefectionsVM(ProductVM product, AccessType access):base(access)
        {
            UnitOfWork = new SoheilEdmContext();
            CurrentProduct = product;
            ProductDataService = new ProductDataService(UnitOfWork);
            ProductDataService.DefectionAdded += OnDefectionAdded;
            ProductDataService.DefectionRemoved += OnDefectionRemoved;
            DefectionDataService = new DefectionDataService(UnitOfWork);
            ProductDefectionDataService = new ProductDefectionDataService(UnitOfWork);

            var selectedVms = new ObservableCollection<ProductDefectionVM>();
            foreach (var productDefection in ProductDataService.GetDefections(product.Id))
            {
                selectedVms.Add(new ProductDefectionVM(productDefection, Access, ProductDefectionDataService, RelationDirection.Straight));
            }
            SelectedItems = new ListCollectionView(selectedVms);

            var allVms = new ObservableCollection<DefectionVM>();
            foreach (var defection in DefectionDataService.GetActives(SoheilEntityType.Products, CurrentProduct.Id))
            {
                allVms.Add(new DefectionVM(defection, Access, DefectionDataService));
            }
            AllItems = new ListCollectionView(allVms);

            IncludeCommand = new Command(Include, CanInclude);
            ExcludeCommand = new Command(Exclude, CanExclude);
            IncludeRangeCommand = new Command(IncludeRange, CanIncludeRange);
            ExcludeRangeCommand = new Command(ExcludeRange, CanExcludeRange);
        }
开发者ID:T1Easyware,项目名称:Soheil,代码行数:29,代码来源:ProductDefectionsVM.cs


示例3: LockEvent

 internal LockEvent(LockEventType eventType, IEnumerable<ObjectName> references, LockingMode mode, AccessType accessType)
 {
     EventType = eventType;
     References = references;
     Mode = mode;
     AccessType = accessType;
 }
开发者ID:deveel,项目名称:deveeldb,代码行数:7,代码来源:LockEvent.cs


示例4: AccessRulePositionsVM

        public AccessRulePositionsVM(AccessRuleVM accessRule, AccessType access)
            : base(access)
        {
            UnitOfWork = new SoheilEdmContext();
            CurrentAccessRule = accessRule;
            AccessRuleDataService = new AccessRuleDataService(UnitOfWork);
            AccessRuleDataService.PositionAdded += OnPositionAdded;
            AccessRuleDataService.PositionRemoved += OnPositionRemoved;
            PositionDataService = new PositionDataService(UnitOfWork);

            var selectedVms = new ObservableCollection<PositionAccessRuleVM>();
            foreach (var accessRulePosition in AccessRuleDataService.GetPositions(accessRule.Id))
            {
                selectedVms.Add(new PositionAccessRuleVM(accessRulePosition, Access, RelationDirection.Reverse));
            }
            SelectedItems = new ListCollectionView(selectedVms);

            var allVms = new ObservableCollection<PositionVM>();
            foreach (var position in PositionDataService.GetActives())
            {
                allVms.Add(new PositionVM(position, Access,PositionDataService));
            }
            AllItems = new ListCollectionView(allVms);

            IncludeCommand = new Command(Include,CanInclude);
            ExcludeCommand = new Command(Exclude,CanExclude);
        }
开发者ID:T1Easyware,项目名称:Soheil,代码行数:27,代码来源:AccessRulePositionsVM.cs


示例5: ActivityOperatorsVM

        public ActivityOperatorsVM(ActivityVM activity, AccessType access)
            : base(access)
        {
            UnitOfWork = new SoheilEdmContext();
            CurrentActivity = activity;
            ActivityDataService = new ActivityDataService(UnitOfWork);
            ActivityDataService.OperatorAdded += OnOperatorAdded;
            ActivityDataService.OperatorRemoved += OnOperatorRemoved;
            OperatorDataService = new OperatorDataService(UnitOfWork);
            ActivityOperatorDataService = new ActivitySkillDataService(UnitOfWork);

            var selectedVms = new ObservableCollection<ActivityOperatorVM>();
            foreach (var activityOperator in ActivityDataService.GetOperators(activity.Id))
            {
                selectedVms.Add(new ActivityOperatorVM(activityOperator, Access, ActivityOperatorDataService, RelationDirection.Straight));
            }
            SelectedItems = new ListCollectionView(selectedVms);

            var allVms = new ObservableCollection<OperatorVM>();
            foreach (var opr in OperatorDataService.GetActives(SoheilEntityType.Activities, CurrentActivity.Id))
            {
                allVms.Add(new OperatorVM(opr, Access, OperatorDataService));
            }
            AllItems = new ListCollectionView(allVms);

            IncludeCommand = new Command(Include, CanInclude);
            ExcludeCommand = new Command(Exclude, CanExclude);
        }
开发者ID:T1Easyware,项目名称:Soheil,代码行数:28,代码来源:ActivityOperatorsVM.cs


示例6: Token

 private Token(string username, string profileImg, AccessType accessType, DateTimeOffset expiration)
 {
     UserName = username;
     ProfilePath = profileImg;
     AccessLevel = accessType;
     ExpireTime = expiration;
 }
开发者ID:meothailand,项目名称:Appster,代码行数:7,代码来源:Token.cs


示例7: GetAccessCost

 public float GetAccessCost(AccessType accessMethod)
 {
     AccessCost ac = AccessCosts.Find(p => FlagsHelper.IsSet(p.Type,accessMethod));
     if (ac != null)
         return ac.Cost;
     else return Mathf.Infinity;
 }
开发者ID:eimink,项目名称:KoboldAI,代码行数:7,代码来源:Tile.cs


示例8: Access

 public Access(Organization organization, Geography geography, AccessAspect aspect, AccessType type)
 {
     this.Organization = organization;
     this.Geography = geography;
     this.Aspect = aspect;
     this.Type = type;
 }
开发者ID:SwarmCorp,项目名称:Swarmops,代码行数:7,代码来源:Accesses.cs


示例9: PositionOrganizationChartsVM

        public PositionOrganizationChartsVM(PositionVM position, AccessType access)
            : base(access)
        {
            UnitOfWork = new SoheilEdmContext();
            CurrentPosition = position;
            PositionDataService = new PositionDataService(UnitOfWork);
            PositionDataService.OrganizationChartAdded += OnOrganizationChartAdded;
            PositionDataService.OrganizationChartRemoved += OnOrganizationChartRemoved;
            OrganizationChartDataService = new OrganizationChartDataService(UnitOfWork);
            OrganizationChartPositionDataService = new OrganizationChartPositionDataService(UnitOfWork);

            var selectedVms = new ObservableCollection<OrganizationChartPositionVM>();
            foreach (var positionOrganizationChart in PositionDataService.GetOrganizationCharts(position.Id))
            {
                selectedVms.Add(new OrganizationChartPositionVM(positionOrganizationChart, Access, OrganizationChartPositionDataService));
            }
            SelectedItems = new ListCollectionView(selectedVms);

            var allVms = new ObservableCollection<OrganizationChartVM>();
            foreach (var organizationChart in OrganizationChartDataService.GetActives())
            {
                allVms.Add(new OrganizationChartVM(organizationChart, Access, OrganizationChartDataService));
            }
            AllItems = new ListCollectionView(allVms);

            IncludeCommand = new Command(Include, CanInclude);
            ExcludeCommand = new Command(Exclude, CanExclude);
            
        }
开发者ID:T1Easyware,项目名称:Soheil,代码行数:29,代码来源:PositionOrganizationChartsVM.cs


示例10: AuthorizationException

 public AuthorizationException(string message, Type entityType, AccessType accessType, bool isRecordLevel, 
     UserRecordPermission grantedPermissions, SecureSession session = null)
     : base(message)
 {
     EntityType = entityType;
       AccessType = accessType;
       IsRecordLevel = isRecordLevel;
       GrantedPermissions = grantedPermissions;
       if (session != null) {
     RequireReadMode = session.DemandReadAccessLevel;
     CurrentDenyReadMode = session.DenyReadAction;
     var ctx = session.Context;
     UserName = ctx.User.UserName;
     UserContextValues = string.Join(string.Empty, ctx.Values.Select(kv => StringHelper.SafeFormat("      [{0}]={1}\r\n", kv.Key, kv.Value)));
     var user = ctx.User;
     if (user.Authority == null) {
       UserRoles = "(UserContext.Authority is not set)";
     } else {
       UserRoles = user.Authority.GetRoleNames();
       PermissionSummary = user.Authority.GetPermissionsSummary(EntityType);
       var enDynGrants = user.Authority.DynamicGrants.Where(g => g.IsEnabled(session.Context));
       EnabledDynamicGrants = string.Join(",", enDynGrants.Select(g => g.Activity.Name));
     }
       }
 }
开发者ID:yuanfei05,项目名称:vita,代码行数:25,代码来源:AuthorizationException.cs


示例11: DefectionProductsVM

        public DefectionProductsVM(DefectionVM defection, AccessType access)
            : base(access)
        {
            UnitOfWork = new SoheilEdmContext();
            CurrentDefection = defection;
            DefectionDataService = new DefectionDataService(UnitOfWork);
            DefectionDataService.ProductAdded += OnProductAdded;
            DefectionDataService.ProductRemoved += OnProductRemoved;
            ProductDataService = new ProductDataService(UnitOfWork);
            ProductGroupDataService = new ProductGroupDataService(UnitOfWork);
            ProductDefectionDataService = new ProductDefectionDataService(UnitOfWork);

            var selectedVms = new ObservableCollection<ProductDefectionVM>();
            foreach (var productDefection in DefectionDataService.GetProducts(defection.Id))
            {
                selectedVms.Add(new ProductDefectionVM(productDefection, Access, ProductDefectionDataService, RelationDirection.Reverse));
            }
            SelectedItems = new ListCollectionView(selectedVms);

            var allVms = new ObservableCollection<ProductVM>();
            foreach (var product in ProductDataService.GetActives(SoheilEntityType.Defections, CurrentDefection.Id))
            {
                allVms.Add(new ProductVM(product, Access, ProductDataService, ProductGroupDataService));
            }
            AllItems = new ListCollectionView(allVms);

            IncludeCommand = new Command(Include, CanInclude);
            ExcludeCommand = new Command(Exclude, CanExclude);
        }
开发者ID:T1Easyware,项目名称:Soheil,代码行数:29,代码来源:DefectionProductsVM.cs


示例12: WorkProfileVm

		/// <summary>
		/// Initializes a new instance of the <see cref="WorkProfileVm"/> class from the model.
		/// </summary>
		/// <param name="entity">The model.</param>
		/// <param name="access"></param>
		/// <param name="dataService"></param>
		public WorkProfileVm(WorkProfile entity, AccessType access)
			: base(access)
		{
			IsReadonly = (access < AccessType.Update);
			_model = entity;
			InitializeData();
		}
开发者ID:T1Easyware,项目名称:Soheil,代码行数:13,代码来源:WorkProfileVm.cs


示例13: AccessRuleUsersVM

        public AccessRuleUsersVM(AccessRuleVM accessRule, AccessType access)
            : base(access)
        {
            UnitOfWork = new SoheilEdmContext();
            CurrentAccessRule = accessRule;
            AccessRuleDataService = new AccessRuleDataService(UnitOfWork);
            AccessRuleDataService.UserAdded += OnUserAdded;
            AccessRuleDataService.UserRemoved += OnUserRemoved;
            UserDataService = new UserDataService(UnitOfWork);

            var selectedVms = new ObservableCollection<UserAccessRuleVM>();
            foreach (var accessRuleUser in AccessRuleDataService.GetUsers(accessRule.Id))
            {
                selectedVms.Add(new UserAccessRuleVM(accessRuleUser, Access, RelationDirection.Reverse));
            }
            SelectedItems = new ListCollectionView(selectedVms);

            var allVms = new ObservableCollection<UserVM>();
            foreach (var user in UserDataService.GetActives())
            {
                allVms.Add(new UserVM(user, Access, UserDataService));
            }
            AllItems = new ListCollectionView(allVms);

            IncludeCommand = new Command(Include,CanInclude);
            ExcludeCommand = new Command(Exclude, CanExclude);
        }
开发者ID:T1Easyware,项目名称:Soheil,代码行数:27,代码来源:AccessRuleUsersVM.cs


示例14: LockTimeoutException

 internal LockTimeoutException(ObjectName tableName, AccessType accessType, int timeout)
     : base(SystemErrorCodes.LockTimeout, FormatMessage(tableName, accessType, timeout))
 {
     TableName = tableName;
     AccessType = accessType;
     Timeout = timeout;
 }
开发者ID:deveel,项目名称:deveeldb,代码行数:7,代码来源:LockTimeoutException.cs


示例15: EntityGroupPermission

        bool _initialized; //to avoid multiple initializations

        #endregion Fields

        #region Constructors

        public EntityGroupPermission(string name, AccessType accessType, params EntityGroupResource[] groupResources)
            : base(name)
        {
            AccessType = accessType;
              if (groupResources != null)
            Add(groupResources);
        }
开发者ID:yuanfei05,项目名称:vita,代码行数:13,代码来源:EntityGroupPermission.cs


示例16: PositionUsersVM

        public PositionUsersVM(PositionVM position, AccessType access)
            : base(access)
        {
            UnitOfWork = new SoheilEdmContext();
            CurrentPosition = position;
            PositionDataService = new PositionDataService(UnitOfWork);
            PositionDataService.UserAdded += OnUserAdded;
            PositionDataService.UserRemoved += OnUserRemoved;
            UserDataService = new UserDataService(UnitOfWork);

            var selectedVms = new ObservableCollection<UserPositionVM>();
            foreach (var positionUser in PositionDataService.GetUsers(position.Id))
            {
                selectedVms.Add(new UserPositionVM(positionUser, Access, RelationDirection.Reverse));
            }
            SelectedItems = new ListCollectionView(selectedVms);

            var allVms = new ObservableCollection<UserVM>();
            foreach (var user in UserDataService.GetActives(SoheilEntityType.Positions, CurrentPosition.Id))
            {
                allVms.Add(new UserVM(user, Access, UserDataService));
            }
            AllItems = new ListCollectionView(allVms);

            IncludeCommand = new Command(Include, CanInclude);
            ExcludeCommand = new Command(Exclude, CanExclude);
            
        }
开发者ID:T1Easyware,项目名称:Soheil,代码行数:28,代码来源:PositionUsersVM.cs


示例17: PutAccessType

        public IHttpActionResult PutAccessType(int id, AccessType accessType)
        {
            if (!ModelState.IsValid)
            {
                return BadRequest(ModelState);
            }

            if (id != accessType.AccessTypeId)
            {
                return BadRequest();
            }

            db.Entry(accessType).State = EntityState.Modified;

            try
            {
                db.SaveChanges();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!AccessTypeExists(id))
                {
                    return NotFound();
                }
                else
                {
                    throw;
                }
            }

            return StatusCode(HttpStatusCode.NoContent);
        }
开发者ID:pboyall,项目名称:NetReviewService,代码行数:32,代码来源:AccessTypesController.cs


示例18: CreateAndSign

 public static Token CreateAndSign(string username,string profileImg, AccessType accessLevel, DateTimeOffset? expiredTime)
 {
     var expiration = expiredTime.HasValue ? expiredTime.Value : DateTimeOffset.Now + TimeSpan.FromDays(2);
     var token = new Token(username, profileImg, accessLevel, expiration);
     SignToken(token);
     return token;
 }
开发者ID:meothailand,项目名称:Appster,代码行数:7,代码来源:Token.cs


示例19: UserRecordPermission

 public UserRecordPermission()
 {
     AccessTypes = AccessType.None;
       Peek = new OperationPermission(AccessType.Peek, false);
       ReadStrict = new OperationPermission(AccessType.ReadStrict, false);
       UpdateStrict = new OperationPermission(AccessType.UpdateStrict, false);
 }
开发者ID:yuanfei05,项目名称:vita,代码行数:7,代码来源:UserRecordPermission.cs


示例20: OperatorActivitiesVM

        public OperatorActivitiesVM(OperatorVM opr, AccessType access) : base(access)
        {
            UnitOfWork = new SoheilEdmContext();
            CurrentOperator = opr;
            OperatorDataService = new OperatorDataService(UnitOfWork);
            OperatorDataService.ActivityAdded += OnActivityAdded;
            OperatorDataService.ActivityRemoved += OnActivityRemoved;
            ActivityDataService = new ActivityDataService(UnitOfWork);
            ActivityOperatorDataService = new ActivitySkillDataService(UnitOfWork);
            ActivityGroupDataService = new ActivityGroupDataService(UnitOfWork);

            var selectedVms = new ObservableCollection<ActivityOperatorVM>();
            foreach (var generalActivitySkill in OperatorDataService.GetActivities(opr.Id))
            {
                selectedVms.Add(new ActivityOperatorVM(generalActivitySkill, Access, ActivityOperatorDataService, RelationDirection.Reverse));
            }
            SelectedItems = new ListCollectionView(selectedVms);

            var allVms = new ObservableCollection<ActivityVM>();
            foreach (var activity in ActivityDataService.GetActives()
				.Where(activity => !selectedVms.Any(activityOperator => activityOperator.ActivityId == activity.Id)))
            {
                allVms.Add(new ActivityVM(activity, Access, ActivityDataService, ActivityGroupDataService));
            }
            AllItems = new ListCollectionView(allVms);

            IncludeCommand = new Command(Include, CanInclude);
            ExcludeCommand = new Command(Exclude, CanExclude);
            
        }
开发者ID:T1Easyware,项目名称:Soheil,代码行数:30,代码来源:OperatorActivitiesVM.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# Accessibility类代码示例发布时间:2022-05-24
下一篇:
C# AccessToken类代码示例发布时间: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