Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Extensions / ClientServices / ClientRolePrincipal.cs / 1305376 / ClientRolePrincipal.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.ClientServices { using System; using System.Net; using System.Security.Principal; public class ClientRolePrincipal : IPrincipal { public IIdentity Identity { get { return _Identity; } } private IIdentity _Identity; public ClientRolePrincipal(IIdentity identity) { _Identity = identity; } public bool IsInRole(string role) { return System.Web.Security.Roles.IsUserInRole(_Identity.Name, role); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.ClientServices { using System; using System.Net; using System.Security.Principal; public class ClientRolePrincipal : IPrincipal { public IIdentity Identity { get { return _Identity; } } private IIdentity _Identity; public ClientRolePrincipal(IIdentity identity) { _Identity = identity; } public bool IsInRole(string role) { return System.Web.Security.Roles.IsUserInRole(_Identity.Name, role); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- TdsEnums.cs
- MetadataItemEmitter.cs
- TextEditorContextMenu.cs
- HorizontalAlignConverter.cs
- AspNetHostingPermission.cs
- BindingMAnagerBase.cs
- NavigationWindow.cs
- CodeArgumentReferenceExpression.cs
- LocalBuilder.cs
- WebServiceData.cs
- DataGridViewSelectedColumnCollection.cs
- XmlDataLoader.cs
- GraphicsContext.cs
- Rect3D.cs
- EntityClientCacheKey.cs
- ColorConverter.cs
- StorageRoot.cs
- SafeProcessHandle.cs
- HtmlShim.cs
- BaseResourcesBuildProvider.cs
- ListBoxChrome.cs
- ConnectionStringSettings.cs
- CodeDOMUtility.cs
- Block.cs
- WSSecurityJan2004.cs
- ReferenceSchema.cs
- MappedMetaModel.cs
- MediaCommands.cs
- XmlSchemaSequence.cs
- PreProcessor.cs
- StringValidator.cs
- BamlRecordReader.cs
- DataGridViewRowHeaderCell.cs
- EntityDataSourceUtil.cs
- SettingsBase.cs
- PanelDesigner.cs
- TransportListener.cs
- WindowsImpersonationContext.cs
- VisualTreeUtils.cs
- SqlDataSourceRefreshSchemaForm.cs
- EntityParameterCollection.cs
- CompilationLock.cs
- ResourceReader.cs
- SqlProviderServices.cs
- AliasedSlot.cs
- Translator.cs
- DataRow.cs
- SqlDataSourceQueryConverter.cs
- TextComposition.cs
- Material.cs
- GenericTypeParameterConverter.cs
- Label.cs
- ExceptionValidationRule.cs
- SplineQuaternionKeyFrame.cs
- DefaultValidator.cs
- ComponentResourceManager.cs
- ProxyWebPart.cs
- Renderer.cs
- XmlValueConverter.cs
- CopyNamespacesAction.cs
- ConnectionPointCookie.cs
- PersistenceException.cs
- MarkupProperty.cs
- HitTestDrawingContextWalker.cs
- ParameterExpression.cs
- ValueType.cs
- InsufficientMemoryException.cs
- DocumentGrid.cs
- Model3DCollection.cs
- DiscoveryClientChannelBase.cs
- ActionFrame.cs
- ConfigurationManagerHelper.cs
- CompiledIdentityConstraint.cs
- SafeRightsManagementHandle.cs
- CatalogZoneBase.cs
- SecurityResources.cs
- CryptoStream.cs
- XmlRootAttribute.cs
- ClientApiGenerator.cs
- AsymmetricSignatureDeformatter.cs
- ParentQuery.cs
- VarRefManager.cs
- StorageConditionPropertyMapping.cs
- CodeAccessSecurityEngine.cs
- IsolatedStorageFilePermission.cs
- ResourcePool.cs
- Task.cs
- SynchronizationContext.cs
- BindableTemplateBuilder.cs
- DesignerWebPartChrome.cs
- WindowsGraphics2.cs
- HtmlEncodedRawTextWriter.cs
- XmlObjectSerializerContext.cs
- TextBoxView.cs
- BehaviorEditorPart.cs
- Font.cs
- String.cs
- MatrixAnimationBase.cs
- CodeAssignStatement.cs
- ParseNumbers.cs