本文整理汇总了C#中ISecurityService类的典型用法代码示例。如果您正苦于以下问题:C# ISecurityService类的具体用法?C# ISecurityService怎么用?C# ISecurityService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ISecurityService类属于命名空间,在下文中一共展示了ISecurityService类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: EventService
public EventService(ISecurityService securityService, IUnitOfWork unitOfWork, ICampaignService campaignService, IGroupService groupService)
{
_securityService = securityService;
_unitOfWork = unitOfWork;
_campaignService = campaignService;
_groupService = groupService;
}
示例2: RemoteCredentialsDecorator
public RemoteCredentialsDecorator(Uri brokerUri, ISecurityService securityService, IMainThread mainThread) {
_securityService = securityService;
_mainThread = mainThread;
_authority = brokerUri.ToCredentialAuthority();
_lock = new AsyncReaderWriterLock();
_credentialsAreValid = true;
}
示例3: ThemeController
public ThemeController(Func<string, IThemeService> factory, ISettingsManager manager, ISecurityService securityService, IPermissionScopeService permissionScopeService,
string pathForMultipart, string pathForFiles, string defaultThemePath)
: base(securityService, permissionScopeService)
{
if (factory == null)
{
throw new ArgumentNullException("factory");
}
if (manager == null)
{
throw new ArgumentNullException("manager");
}
if (string.IsNullOrEmpty(pathForMultipart))
throw new ArgumentNullException("pathForMultipart");
if (string.IsNullOrEmpty(pathForFiles))
throw new ArgumentNullException("pathForFiles");
var chosenRepository = manager.GetValue(
"VirtoCommerce.Content.MainProperties.ThemesRepositoryType",
string.Empty);
_pathForMultipart = pathForMultipart;
_pathForFiles = pathForFiles;
_defaultThemePath = defaultThemePath;
var themeService = factory.Invoke(chosenRepository);
this._themeService = themeService;
}
示例4: SetUp
public void SetUp()
{
_repository = Substitute.For<IPatientRepository>();
_securityService = Substitute.For<ISecurityService>();
_securityService.IsInRole("Admin").Returns(true);
_service = new PatientService(_repository, _securityService);
}
示例5: EnsureCoreDataTask
public EnsureCoreDataTask(IFrameworkContext context, IHiveManager coreManager, IEnumerable<Lazy<Permission, PermissionMetadata>> permissions,
ISecurityService securityService)
: base(context, coreManager)
{
_permissions = permissions;
_securityService = securityService;
}
示例6: Render
/// <summary>
/// Renders an action projection to given html output.
/// </summary>
/// <param name="page">The page.</param>
/// <param name="securityService"></param>
/// <param name="html">The html helper.</param>
/// <returns><c>true</c> on success, otherwise <c>false</c>.</returns>
public override bool Render(IPage page, ISecurityService securityService, HtmlHelper html)
{
if (AccessRole != null && !securityService.IsAuthorized(AccessRole))
{
return false;
}
using (HtmlControlRenderer control = new HtmlControlRenderer(Tag))
{
OnPreRender(control, page, html);
using (HtmlTextWriter writer = new HtmlTextWriter(html.ViewContext.Writer))
{
control.RenderBeginTag(writer);
if (ChildProjections != null)
{
foreach (var htmlElementProjection in ChildProjections.OrderBy(f => f.Order))
{
htmlElementProjection.Render(page, securityService, html);
}
}
control.RenderEndTag(writer);
}
}
return true;
}
示例7: SecurityController
public SecurityController(ISecurityService securityService)
{
if (securityService == null)
throw new ArgumentNullException("securityService");
_securityService = securityService;
}
示例8: ContentController
public ContentController(Func<string, IContentBlobStorageProvider> contentStorageProviderFactory, IBlobUrlResolver urlResolver, ISecurityService securityService, IPermissionScopeService permissionScopeService, IStoreService storeService)
: base(securityService, permissionScopeService)
{
_storeService = storeService;
_contentStorageProviderFactory = contentStorageProviderFactory;
_urlResolver = urlResolver;
}
示例9: DefaultContentService
public DefaultContentService(ISecurityService securityService, IRepository repository, IUnitOfWork unitOfWork, IOptionService optionService)
{
this.unitOfWork = unitOfWork;
this.securityService = securityService;
this.repository = repository;
this.optionService = optionService;
}
示例10: AddressBookContactsService
public AddressBookContactsService(
IAddressBookContactsDataService contactDataService,
ISecurityService securityService)
{
_contactDataService = contactDataService;
_securityService = securityService;
}
示例11: NotificationsController
public NotificationsController(IAppleNotificationService appleService, ISecurityService securityService, IGoogleGcmNotificationService googleGcmService, IWindowsPhoneNotificationService windowsPhoneService)
{
_AppleService = appleService;
_SecurityService = securityService;
_GoogleGcmService = googleGcmService;
_WindowsPhoneService = windowsPhoneService;
}
示例12: CommunityController
public CommunityController(IMessageService messageService,ISecurityService securityService, IEventService eventService)
: base(securityService)
{
_messageService = messageService;
_securityService = securityService;
_eventService = eventService;
}
示例13: Initialize
public static void Initialize(ILayoutService layoutService, ISecurityService securityService)
{
ServiceFactoryBase.SecurityService = SecurityService = securityService;
Layout = layoutService;
ContentService = new ContentService("Monitor");
DragDropService = new DragDropService();
}
示例14: CmsController
/// <summary>
/// Initializes a new instance of the <see cref="CmsController" /> class.
/// </summary>
/// <param name="pageAccessor">The page accessor.</param>
/// <param name="cmsConfiguration">The configuration loader.</param>
/// <param name="cacheService">The cache service.</param>
/// <param name="securityService">The security service.</param>
public CmsController(IPageAccessor pageAccessor, ICmsConfiguration cmsConfiguration, ICacheService cacheService, ISecurityService securityService)
{
this.securityService = securityService;
this.pageAccessor = pageAccessor;
this.cmsConfiguration = cmsConfiguration;
this.cacheService = cacheService;
}
示例15: SecurityService
/// <summary>
/// Initializes a new instance of the <see cref="SecurityService"/> class.
/// </summary>
public SecurityService()
{
this.manager = Global.DependencyInjectionContainer.Resolve<SecurityManager>();
this.securityService = Global.DependencyInjectionContainer.Resolve<ISecurityService>();
this.manager.IsSecureConnection = this.Context.Request.IsSecureConnection;
this.cookiePath = this.manager.CookiePath;
}