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
- AuthorizationRule.cs
- ValidationVisibilityAttribute.cs
- KeyEvent.cs
- ImageInfo.cs
- DoubleCollectionConverter.cs
- SqlInternalConnection.cs
- Geometry.cs
- XslAstAnalyzer.cs
- SamlDoNotCacheCondition.cs
- RSAOAEPKeyExchangeDeformatter.cs
- __TransparentProxy.cs
- TableRowGroupCollection.cs
- BitmapEffectGroup.cs
- InputLanguageManager.cs
- SecurityUtils.cs
- WebEncodingValidator.cs
- DataServiceStreamProviderWrapper.cs
- BinarySecretKeyIdentifierClause.cs
- XmlProcessingInstruction.cs
- HtmlLiteralTextAdapter.cs
- Application.cs
- DiscreteKeyFrames.cs
- StrongNameIdentityPermission.cs
- OrderedEnumerableRowCollection.cs
- SoapIncludeAttribute.cs
- ContextProperty.cs
- DataGridViewCellCancelEventArgs.cs
- RequestStatusBarUpdateEventArgs.cs
- WorkflowFileItem.cs
- OrderedDictionaryStateHelper.cs
- LocalizableAttribute.cs
- NamespaceTable.cs
- CqlWriter.cs
- ResourceReferenceExpression.cs
- SiteOfOriginPart.cs
- XmlName.cs
- TimeSpanSecondsConverter.cs
- NCryptNative.cs
- DeclarativeCatalogPart.cs
- WebPartConnectionsCancelVerb.cs
- CodeArrayIndexerExpression.cs
- LogArchiveSnapshot.cs
- X509Extension.cs
- PackagePartCollection.cs
- SmtpFailedRecipientsException.cs
- _DigestClient.cs
- AnnotationObservableCollection.cs
- DynamicResourceExtension.cs
- ServiceReflector.cs
- StateMachineTimers.cs
- XmlTextReaderImpl.cs
- CheckBoxAutomationPeer.cs
- QueryOutputWriter.cs
- Logging.cs
- DataContext.cs
- ProtectedConfigurationSection.cs
- KernelTypeValidation.cs
- DefaultCommandConverter.cs
- SystemUdpStatistics.cs
- Byte.cs
- PasswordBox.cs
- DataListItem.cs
- DataServiceResponse.cs
- ListSortDescriptionCollection.cs
- ProxyWebPartConnectionCollection.cs
- FamilyMapCollection.cs
- DetailsViewDeletedEventArgs.cs
- InstanceHandleConflictException.cs
- InfoCardProofToken.cs
- MimeParameters.cs
- RepeaterItem.cs
- SqlDataSourceStatusEventArgs.cs
- DataListItemEventArgs.cs
- XmlSchemaAnyAttribute.cs
- WindowsGraphicsCacheManager.cs
- VisualBasicSettingsConverter.cs
- SchemaNamespaceManager.cs
- UmAlQuraCalendar.cs
- FixedSOMPageElement.cs
- FirstMatchCodeGroup.cs
- SimpleLine.cs
- ColumnWidthChangedEvent.cs
- WindowsListView.cs
- BackgroundFormatInfo.cs
- HttpChannelHelpers.cs
- ListBoxItemAutomationPeer.cs
- PresentationAppDomainManager.cs
- UdpContractFilterBehavior.cs
- XmlNodeReader.cs
- TdsEnums.cs
- Int16KeyFrameCollection.cs
- PerformanceCountersElement.cs
- SpellCheck.cs
- Point3DAnimationBase.cs
- IResourceProvider.cs
- InternalConfigEventArgs.cs
- DataFormats.cs
- CompoundFileIOPermission.cs
- ProfileServiceManager.cs
- PropertyHelper.cs