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

C# IUserContext类代码示例

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

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



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

示例1: UsersController

        public UsersController(
            IMessageBus messageBus,
            IUserContext userContext,
            IProjectViewModelQuery projectViewModelQuery,
            ISightingViewModelQuery sightingViewModelQuery,
            IActivityViewModelQuery activityViewModelQuery,
            IPostViewModelQuery postViewModelQuery,
            IUserViewModelQuery userViewModelQuery,
            IPermissionManager permissionManager,
            IDocumentSession documentSession
            )
        {
            Check.RequireNotNull(messageBus, "messageBus");
            Check.RequireNotNull(userContext, "userContext");
            Check.RequireNotNull(projectViewModelQuery, "projectViewModelQuery");
            Check.RequireNotNull(sightingViewModelQuery, "sightingViewModelQuery");
            Check.RequireNotNull(activityViewModelQuery, "activityViewModelQuery");
            Check.RequireNotNull(postViewModelQuery, "postViewModelQuery");
            Check.RequireNotNull(userViewModelQuery, "userViewModelQuery");
            Check.RequireNotNull(permissionManager, "permissionManager");
            Check.RequireNotNull(documentSession, "documentSession");

            _messageBus = messageBus;
            _userContext = userContext;
            _projectViewModelQuery = projectViewModelQuery;
            _sightingViewModelQuery = sightingViewModelQuery;
            _activityViewModelQuery = activityViewModelQuery;
            _postViewModelQuery = postViewModelQuery;
            _userViewModelQuery = userViewModelQuery;
            _permissionManager = permissionManager;
            _documentSession = documentSession;
        }
开发者ID:Bowerbird,项目名称:bowerbird-web,代码行数:32,代码来源:UsersController.cs


示例2: GroupListConfiguration

 public GroupListConfiguration(IUserContext userContext) : base(typeof(GroupListModel))
 {
     this.InterfaceResourceType = typeof(Resources.Interface);
     this.CanCreate = userContext.HasPermission(MembershipPermissions.AddGroup);
     this.CanEdit = userContext.HasPermission(MembershipPermissions.EditGroup);
     this.CanDelete = userContext.HasPermission(MembershipPermissions.DeleteGroup);
 }
开发者ID:StrixIT,项目名称:StrixIT.Platform.Modules.Membership,代码行数:7,代码来源:GroupListConfiguration.cs


示例3: ActivityViewModelQuery

        public ActivityViewModelQuery(
            IDocumentSession documentSession,
            ISightingViewFactory sightingViewFactory,
            ISightingNoteViewFactory sightingNoteViewFactory,
            IIdentificationViewFactory identificationViewFactory,
            IPostViewFactory postViewFactory,
            IUserContext userContext,
            IUserViewFactory userViewFactory)
        {
            Check.RequireNotNull(documentSession, "documentSession");
            Check.RequireNotNull(sightingViewFactory, "sightingViewFactory");
            Check.RequireNotNull(sightingNoteViewFactory, "sightingNoteViewFactory");
            Check.RequireNotNull(identificationViewFactory, "identificationViewFactory");
            Check.RequireNotNull(postViewFactory, "postViewFactory");
            Check.RequireNotNull(userContext, "userContext");
            Check.RequireNotNull(userViewFactory, "userViewFactory");

            _documentSession = documentSession;
            _sightingViewFactory = sightingViewFactory;
            _sightingNoteViewFactory = sightingNoteViewFactory;
            _identificationViewFactory = identificationViewFactory;
            _postViewFactory = postViewFactory;
            _userContext = userContext;
            _userViewFactory = userViewFactory;
        }
开发者ID:Bowerbird,项目名称:bowerbird-web,代码行数:25,代码来源:ActivityViewModelQuery.cs


示例4: SubsController

 public SubsController(IContextService contextService,
     ISubDao subDao,
     IMapper mapper,
     ICommandBus commandBus,
     IUserContext userContext,
     IPostDao postDao,
     IVoteDao voteDao,
     ICommentDao commentDao,
     IPermissionDao permissionDao,
     ICommentNodeHierarchyBuilder commentNodeHierarchyBuilder,
     ICommentTreeContextBuilder commentTreeContextBuilder,
     IPostWrapper postWrapper,
     ISubWrapper subWrapper,
     ICommentWrapper commentWrapper)
 {
     _contextService = contextService;
     _subDao = subDao;
     _mapper = mapper;
     _commandBus = commandBus;
     _userContext = userContext;
     _postDao = postDao;
     _voteDao = voteDao;
     _commentDao = commentDao;
     _permissionDao = permissionDao;
     _commentNodeHierarchyBuilder = commentNodeHierarchyBuilder;
     _commentTreeContextBuilder = commentTreeContextBuilder;
     _postWrapper = postWrapper;
     _subWrapper = subWrapper;
     _commentWrapper = commentWrapper;
 }
开发者ID:richardrcruzc,项目名称:skimur,代码行数:30,代码来源:SubsController.cs


示例5: EnterpriseTesterRaygunMessageBuilderFactory

 public EnterpriseTesterRaygunMessageBuilderFactory(IUserContext userContext, ILicenseManager licenseManager)
 {
     if (userContext == null) throw new ArgumentNullException("userContext");
     if (licenseManager == null) throw new ArgumentNullException("licenseManager");
     _userContext = userContext;
     _licenseManager = licenseManager;
 }
开发者ID:KodiEhf,项目名称:EnterpriseTester-API-Examples,代码行数:7,代码来源:EnterpriseTesterRaygunMessageBuilderFactory.cs


示例6: FileManagerController

 /// <summary>
 /// Constructor for the file manager.
 /// </summary>
 /// <remarks>This action requires editor rights.</remarks>
 public FileManagerController(ApplicationSettings settings, UserServiceBase userManager, IUserContext context,
     SettingsService settingsService, AttachmentFileHandler attachment)
     : base(settings, userManager, context, settingsService)
 {
     _attachmentHandler = attachment;
     _attachmentPathUtil = new AttachmentPathUtil(settings);
 }
开发者ID:Kiresorg,项目名称:roadkill,代码行数:11,代码来源:FileManagerController.cs


示例7: ImportNotificationApplicationAuthorization

 public ImportNotificationApplicationAuthorization(IwsContext context,
     ImportNotificationContext importNotificationContext, IUserContext userContext)
 {
     this.context = context;
     this.importNotificationContext = importNotificationContext;
     this.userContext = userContext;
 }
开发者ID:EnvironmentAgency,项目名称:prsd-iws,代码行数:7,代码来源:ImportNotificationApplicationAuthorization.cs


示例8: MenuParser

 public MenuParser(MarkupConverter markupConverter, IRepository repository, SiteCache siteCache, IUserContext userContext)
 {
     _markupConverter = markupConverter;
     _repository = repository;
     _siteCache = siteCache;
     _userContext = userContext;
 }
开发者ID:NaseUkolyCZ,项目名称:roadkill,代码行数:7,代码来源:MenuParser.cs


示例9: HomeController

        public HomeController(
            IMessageBus messageBus,
            IUserContext userContext,
            IActivityViewModelQuery activityViewModelQuery,
            ISightingViewModelQuery sightingViewModelQuery,
            IUserViewModelQuery userViewModelQuery,
            IDocumentSession documentSession,
            IPostViewModelQuery postViewModelQuery
            )
        {
            Check.RequireNotNull(messageBus, "messageBus");
            Check.RequireNotNull(userContext, "userContext");
            Check.RequireNotNull(activityViewModelQuery, "activityViewModelQuery");
            Check.RequireNotNull(sightingViewModelQuery, "sightingViewModelQuery");
            Check.RequireNotNull(userViewModelQuery, "userViewModelQuery");
            Check.RequireNotNull(documentSession, "documentSession");
            Check.RequireNotNull(postViewModelQuery, "postViewModelQuery");

            _messageBus = messageBus;
            _userContext = userContext;
            _activityViewModelQuery = activityViewModelQuery;
            _sightingViewModelQuery = sightingViewModelQuery;
            _userViewModelQuery = userViewModelQuery;
            _documentSession = documentSession;
            _postViewModelQuery = postViewModelQuery;
        }
开发者ID:Bowerbird,项目名称:bowerbird-web,代码行数:26,代码来源:HomeController.cs


示例10: MenuParser

		public MenuParser(MarkupConverter markupConverter, ISettingsRepository settingsRepository, SiteCache siteCache, IUserContext userContext)
		{
			_markupConverter = markupConverter;
			_settingsRepository = settingsRepository;
			_siteCache = siteCache;
			_userContext = userContext;
		}
开发者ID:RyanGroom,项目名称:roadkill,代码行数:7,代码来源:MenuParser.cs


示例11: CapturedMovementFactory

 public CapturedMovementFactory(IMovementNumberValidator movementNumberValidator, INotificationAssessmentRepository assessmentRepository,
     IUserContext userContext)
 {
     this.movementNumberValidator = movementNumberValidator;
     this.assessmentRepository = assessmentRepository;
     this.userContext = userContext;
 }
开发者ID:EnvironmentAgency,项目名称:prsd-iws,代码行数:7,代码来源:CapturedMovementFactory.cs


示例12: UpgradeController

        public UpgradeController(ApplicationSettings settings, IRepository repository, UserServiceBase userService,
			IUserContext context, SettingsService settingsService, ConfigReaderWriter configReaderWriter)
            : base(settings, userService, context, settingsService)
        {
            _repository = repository;
            _configReaderWriter = configReaderWriter;
        }
开发者ID:NaseUkolyCZ,项目名称:roadkill,代码行数:7,代码来源:UpgradeController.cs


示例13: ProfileController

 public ProfileController(IUserProfileBusinessLogic userProfileBusinessLogic, IGenderViewTypeConverter genderTypeConverter, IActivityLevelViewTypeConverter activityLevelViewTypeConverter, IUserContext userContext)
 {
     ActivityLevelViewTypeConverter = activityLevelViewTypeConverter;
     GenderTypeConverter = genderTypeConverter;
     UserProfileBusinessLogic = userProfileBusinessLogic;
     UserContext = userContext;
 }
开发者ID:yodiz,项目名称:CarbonFitness,代码行数:7,代码来源:ProfileController.cs


示例14: RoleListConfiguration

 public RoleListConfiguration(IUserContext userContext) : base(typeof(RoleViewModel), null)
 {
     this.InterfaceResourceType = typeof(Resources.Interface);
     this.CanCreate = userContext.HasPermission(MembershipPermissions.AddRole);
     this.CanEdit = userContext.HasPermission(MembershipPermissions.EditRole);
     this.CanDelete = userContext.HasPermission(MembershipPermissions.DeleteRole);
 }
开发者ID:StrixIT,项目名称:StrixIT.Platform.Modules.Membership,代码行数:7,代码来源:RoleListConfiguration.cs


示例15: CommitAction

 /// <summary>
 /// Commits one action of the transaction.
 /// </summary>
 /// <param name="userContext">The user context.</param>
 /// <param name="transac">The transac.</param>
 /// <param name="index">The index.</param>
 /// <param name="action">The action.</param>
 protected override void CommitAction(IUserContext userContext, TransacInfo transac, int index, TransacActionInfo action)
 {
     object referenceObject = null;
     if (action.Type == TransacActionType.Insert)
     {
         referenceObject = action.TargetInstance;
     }
     else
     {
         referenceObject = action.SourceInstance;
     }
     IMetamodelEntity metamodelEntity = IoC.Get<ISecurityManager>().MetamodelManager.GetEntity(referenceObject.GetType());
     if (metamodelEntity != null)
     {
         if (metamodelEntity.AuditType == AuditType.Simple)
         {
             AuditTransacAction actionEntity = new AuditTransacAction();
             actionEntity.AuditTransacId = Convert.ToInt32(transac.TransacId);
             actionEntity.AuditTransacActionIx = index + 1;
             actionEntity.EntityId = metamodelEntity.EntId;
             actionEntity.PrimaryKey = metamodelEntity.GetStringKey(referenceObject);
             userContext.Context.Add(actionEntity);
         }
     }
 }
开发者ID:jseijas,项目名称:supido,代码行数:32,代码来源:AuditManager.cs


示例16: OrganisationsController

        public OrganisationsController(
            IMessageBus messageBus,
            IUserContext userContext,
            IOrganisationViewModelQuery organisationViewModelQuery,
            IActivityViewModelQuery activityViewModelQuery,
            IPostViewModelQuery postViewModelQuery,
            IUserViewModelQuery userViewModelQuery,
            IPermissionManager permissionManager,
            IDocumentSession documentSession
            )
        {
            Check.RequireNotNull(messageBus, "messageBus");
            Check.RequireNotNull(userContext, "userContext");
            Check.RequireNotNull(organisationViewModelQuery, "organisationViewModelQuery");
            Check.RequireNotNull(activityViewModelQuery, "activityViewModelQuery");
            Check.RequireNotNull(postViewModelQuery, "postViewModelQuery");
            Check.RequireNotNull(userViewModelQuery, "userViewModelQuery");
            Check.RequireNotNull(permissionManager, "permissionManager");
            Check.RequireNotNull(documentSession, "documentSession");

            _messageBus = messageBus;
            _userContext = userContext;
            _organisationViewModelQuery = organisationViewModelQuery;
            _activityViewModelQuery = activityViewModelQuery;
            _postViewModelQuery = postViewModelQuery;
            _userViewModelQuery = userViewModelQuery;
            _permissionManager = permissionManager;
            _documentSession = documentSession;
        }
开发者ID:Bowerbird,项目名称:bowerbird-web,代码行数:29,代码来源:OrganisationsController.cs


示例17: GetUserDataText

    private string GetUserDataText(IUserContext uc)
    {
        var sb = new StringBuilder();

        var data = uc.Data;
        sb.AppendLine("Data<size=28>");
        sb.AppendFormat("RegisterTime: {0}\n", data.RegisterTime);
        sb.AppendFormat("LastLoginTime: {0}\n", data.LastLoginTime);
        sb.AppendFormat("LoginCount: {0}\n", data.LoginCount);
        sb.AppendLine("</size>");

        var achivements = uc.Achivements;
        sb.AppendLine("Achievement<size=28>");
        foreach (AchievementKey key in Enum.GetValues(typeof(AchievementKey)))
        {
            UserAchievement ach;
            if (achivements.TryGetValue((int)key, out ach))
            {
                if (ach.AchieveTime.HasValue)
                    sb.AppendFormat("{0}: Achieved({1})\n", key, ach.AchieveTime.Value);
                else
                    sb.AppendFormat("{0}: Progress({1})\n", key, ach.Value);
            }
        }
        sb.AppendLine("</size>");

        return sb.ToString();
    }
开发者ID:SaladLab,项目名称:TicTacToe,代码行数:28,代码来源:UserInfoDialogBox.cs


示例18: OperatorController

 public OperatorController(IUserContext userContext, IClientsService clientsService, IClientProfileService clientProfileService)
     : base(userContext)
 {
     Contract.Requires<ArgumentNullException>(clientsService.IsNotNull());
     Contract.Requires<ArgumentNullException>(clientProfileService.IsNotNull());
     this.clientsService = clientsService;
 }
开发者ID:dzhivtsov,项目名称:GangsterBank,代码行数:7,代码来源:OperatorController.cs


示例19: ConfigurationTesterController

		public ConfigurationTesterController(ApplicationSettings appSettings, IUserContext userContext, ConfigReaderWriter configReaderWriter, IActiveDirectoryProvider activeDirectoryProvider) 
		{
			_applicationSettings = appSettings;
			_userContext = userContext;
			_configReaderWriter = configReaderWriter;
			_activeDirectoryProvider = activeDirectoryProvider;
		}
开发者ID:35e8,项目名称:roadkill,代码行数:7,代码来源:ConfigurationTesterController.cs


示例20: WeeeAuthorization

        public WeeeAuthorization(WeeeContext context, IUserContext userContext)
        {
            Guard.ArgumentNotNull(() => context, context);
            Guard.ArgumentNotNull(() => userContext, userContext);

            this.context = context;
            this.userContext = userContext;
        }
开发者ID:EnvironmentAgency,项目名称:prsd-weee,代码行数:8,代码来源:WeeeAuthorization.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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