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


C# ISecurityContext类代码示例

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


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

示例1: SaveSettingsCommand

 public SaveSettingsCommand(SettingsViewModel viewModel, ISettingsRepositories repos, IUserNotify notify, ISecurityContext ctx)
 {
     this.viewModel = viewModel;
     this.repos = repos;
     this.notify = notify;
     this.ctx = ctx;
 }
开发者ID:AleksMorozova,项目名称:prizm,代码行数:7,代码来源:SaveSettingsCommand.cs

示例2: SaveReleaseNoteCommand

 public SaveReleaseNoteCommand(ReleaseNoteViewModel viewModel, IReleaseNoteRepositories repo, IUserNotify notify, ISecurityContext ctx)
 {
     this.viewModel = viewModel;
     this.repos = repo;
     this.notify = notify;
     this.ctx = ctx;
 }
开发者ID:AleksMorozova,项目名称:prizm,代码行数:7,代码来源:SaveReleaseNoteCommand.cs

示例3: PartInspectionViewModel

        public PartInspectionViewModel(ISession session, IPartInspectionRepository repos, IUserNotify notify, ISecurityContext ctx)
        {
            try
            {
                this.session = session;
                this.repos = repos;
                this.notify = notify;
                this.ctx = ctx;

                this.Inspectors = repos.RepoInspector.GetAll();
                if(this.Inspectors == null || this.Inspectors.Count <= 0)
                    log.Warn("Incoming Inspection of Componentry: List of Inspectors is NULL or empty");

                searchCommand = ViewModelSource.Create(() => new SearchPartForInspectionCommand(this, session, ctx));
                saveInspectionTestResultsCommand = ViewModelSource.Create(() => new SaveInspectionTestResultsCommand(repos.RepoInspectionTestResult, this, notify, ctx));
                saveAndClearTestResultsCommand = ViewModelSource.Create(() => new SaveAndClearTestResultsCommand(this));
                this.Inspectors = repos.RepoInspector.GetAll();
            }
            catch(RepositoryException ex)
            {
                log.Warn(this.GetType().Name + " | " + ex.ToString());
                notify.ShowWarning(Program.LanguageManager.GetString(StringResources.Notification_Error_Db_Message),
            Program.LanguageManager.GetString(StringResources.Notification_Error_Db_Header));
            }
        }
开发者ID:AleksMorozova,项目名称:prizm,代码行数:25,代码来源:PartInspectionViewModel.cs

示例4: SecurityContextWrapper

        public SecurityContextWrapper(ISecurityContext securityContext)
        {
            if (securityContext == null)
                throw new ArgumentNullException("securityContext");

            _securityContext = securityContext;
        }
开发者ID:protechdm,项目名称:CloudCompare,代码行数:7,代码来源:SecurityContextWrapper.cs

示例5: EnforcePolicies

        public IEnumerable<PolicyResult> EnforcePolicies(ISecurityContext context)
        {
            if (_policies.Count.Equals(0))
                throw ExceptionFactory.CreateConfigurationErrorsException("You must add at least 1 policy for controller {0} action {1}.".FormatWith(ControllerName, ActionName));

            return _policies.Select(policy => policy.Enforce(context)).ToArray();
        }
开发者ID:daniellee,项目名称:FluentSecurity,代码行数:7,代码来源:PolicyContainer.cs

示例6: AuthenticationContextService

 public AuthenticationContextService(ISecurityContext securityContext, IPrincipalFactory principalFactory, ICurrentSDKUser currentSdkUser, ILogger logger)
 {
     _securityContext = securityContext;
     _principalFactory = principalFactory;
     _currentSdkUser = currentSdkUser;
     _logger = logger;
 }
开发者ID:modulexcite,项目名称:dovetail-bootstrap,代码行数:7,代码来源:AuthenticationContextService.cs

示例7: AuthenticationRequiredBehavior

 public AuthenticationRequiredBehavior(ISecurityContext securityContext, IUrlRegistry urlRegistry, IOutputWriter outputWriter)
     : base(PartialBehavior.Ignored)
 {
     _securityContext = securityContext;
     _urlRegistry = urlRegistry;
     _outputWriter = outputWriter;
 }
开发者ID:henninga,项目名称:FubuDate,代码行数:7,代码来源:AuthenticationRequiredBehavior.cs

示例8: SaveInspectionTestResultsCommand

 public SaveInspectionTestResultsCommand(IInspectionTestResultRepository repo, PartInspectionViewModel viewModel, IUserNotify notify, ISecurityContext ctx)
 {
     this.repo = repo;
     this.viewModel = viewModel;
     this.notify = notify;
     this.ctx = ctx;
 }
开发者ID:AleksMorozova,项目名称:prizm,代码行数:7,代码来源:SaveInspectionTestResultsCommand.cs

示例9: SpoolDeactivationCommand

 public SpoolDeactivationCommand(ISpoolRepositories repo, SpoolViewModel viewModel, IUserNotify notify, ISecurityContext ctx)
 {
     this.repo = repo;
     this.viewModel = viewModel;
     this.notify = notify;
     this.ctx = ctx;
 }
开发者ID:AleksMorozova,项目名称:prizm,代码行数:7,代码来源:SpoolDeactivationCommand.cs

示例10: AddAction

        public AddAction(IDailyTimeRecordService timeRecordService,  IUserService userService, ISecurityContext securityContext)
        {
            _timeRecordService = timeRecordService;

            _userService = userService;
            _securityContext = securityContext;
        }
开发者ID:rauhryan,项目名称:kokugen,代码行数:7,代码来源:AddAction.cs

示例11: StatusPointsService

		public StatusPointsService(IAppraiserOrderDeliveryService appraiserOrderDeliveryService, DashboardConditionFilters dashboardConditionFilters, ICurrentAppraiser currentAppraiser, ISecurityContext securityContext)
		{
			_securityContext = ValidationUtil.CheckOnNullAndThrowIfNull(securityContext);
			_appraiserOrderDeliveryService = ValidationUtil.CheckOnNullAndThrowIfNull(appraiserOrderDeliveryService);
			_dashboardConditionFilters = ValidationUtil.CheckOnNullAndThrowIfNull(dashboardConditionFilters);
			_currentAppraiser = ValidationUtil.CheckOnNullAndThrowIfNull(currentAppraiser);
		}
开发者ID:evkap,项目名称:DVS,代码行数:7,代码来源:StatusPointsService.cs

示例12: PolicyViolationException

 internal PolicyViolationException(PolicyResult policyResult, ISecurityContext securityContext)
     : base(policyResult.Message)
 {
     PolicyResult = policyResult;
     SecurityContext = securityContext;
     PolicyType = PolicyResult.PolicyType;
 }
开发者ID:jskrepnek,项目名称:FluentSecurity,代码行数:7,代码来源:PolicyViolationException.cs

示例13: SpiderFactory

        public SpiderFactory(ILogger logger, ISecurityContext securityContext, IMediaFactory mediaFactory, ILinkRepository linkRepository, ITagRepository tagRepository, IMediaRepository mediaRepository, IMetadataRepository mediaItemRepository, IAudioStreamFactory audioStreamFactory)
        {
            if (logger == null)
                throw new ArgumentNullException("logger");
            if (securityContext == null)
                throw new ArgumentNullException("securityContext");
            if (mediaFactory == null)
                throw new ArgumentNullException("mediaFactory");
            if (linkRepository == null)
                throw new ArgumentNullException("linkRepository");
            if (tagRepository == null)
                throw new ArgumentNullException("tagRepository");
            if (mediaRepository == null)
                throw new ArgumentNullException("mediaRepository");
            if (mediaItemRepository == null)
                throw new ArgumentNullException("mediaItemRepository");

            this.logger = logger;
            this.securityContext = securityContext;
            this.securityContext = securityContext;
            this.mediaFactory = mediaFactory;
            this.linkRepository = linkRepository;
            this.tagRepository = tagRepository;
            this.mediaRepository = mediaRepository;
            this.mediaItemRepository = mediaItemRepository;
            this.audioStreamFactory = audioStreamFactory;
        }
开发者ID:bossaia,项目名称:alexandrialibrary,代码行数:27,代码来源:SpiderFactory.cs

示例14: Initialize

        public void Initialize(ILogger logger, ISecurityContext securityContext, IMediaFactory mediaFactory, IMetadataController mediaItemController, ITaskController taskController, ITagController tagController, IVideoPlayer videoPlayer)
        {
            if (logger == null)
                throw new ArgumentNullException("logger");
            if (securityContext == null)
                throw new ArgumentNullException("securityContext");
            if (mediaFactory == null)
                throw new ArgumentNullException("mediaFactory");
            if (mediaItemController == null)
                throw new ArgumentNullException("mediaItemController");
            if (taskController == null)
                throw new ArgumentNullException("taskController");
            if (tagController == null)
                throw new ArgumentNullException("tagController");
            if (videoPlayer == null)
                throw new ArgumentNullException("videoPlayer");

            this.logger = logger;
            this.securityContext = securityContext;
            this.mediaFactory = mediaFactory;
            this.taskController = taskController;
            this.mediaItemController = mediaItemController;
            this.tagController = tagController;
            this.videoPlayer = videoPlayer;
        }
开发者ID:bossaia,项目名称:alexandrialibrary,代码行数:25,代码来源:TaskResultView.xaml.cs

示例15: Enforce

        public PolicyResult Enforce(ISecurityContext context)
        {
            var innerPolicy = new RequireAllRolesPolicy(UserRole.Administrator);
            var result = innerPolicy.Enforce(context);

            return result.ViolationOccured ? PolicyResult.CreateFailureResult(this, result.Message) : PolicyResult.CreateSuccessResult(this);
        }
开发者ID:pvivera,项目名称:FluentSecurity,代码行数:7,代码来源:AdministratorPolicy.cs


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