Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / clr / src / BCL / System / Security / Principal / GenericIdentity.cs / 1305376 / GenericIdentity.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== //[....] // // // GenericIdentity.cs // // A generic identity // namespace System.Security.Principal { using System.Runtime.Remoting; using System; using System.Security.Util; using System.Diagnostics.Contracts; [Serializable] [System.Runtime.InteropServices.ComVisible(true)] public class GenericIdentity : IIdentity { private string m_name; private string m_type; public GenericIdentity (string name) { if (name == null) throw new ArgumentNullException("name"); Contract.EndContractBlock(); m_name = name; m_type = ""; } public GenericIdentity (string name, string type) { if (name == null) throw new ArgumentNullException("name"); if (type == null) throw new ArgumentNullException("type"); Contract.EndContractBlock(); m_name = name; m_type = type; } public virtual string Name { get { return m_name; } } public virtual string AuthenticationType { get { return m_type; } } public virtual bool IsAuthenticated { get { return !m_name.Equals(""); } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== //[....] // // // GenericIdentity.cs // // A generic identity // namespace System.Security.Principal { using System.Runtime.Remoting; using System; using System.Security.Util; using System.Diagnostics.Contracts; [Serializable] [System.Runtime.InteropServices.ComVisible(true)] public class GenericIdentity : IIdentity { private string m_name; private string m_type; public GenericIdentity (string name) { if (name == null) throw new ArgumentNullException("name"); Contract.EndContractBlock(); m_name = name; m_type = ""; } public GenericIdentity (string name, string type) { if (name == null) throw new ArgumentNullException("name"); if (type == null) throw new ArgumentNullException("type"); Contract.EndContractBlock(); m_name = name; m_type = type; } public virtual string Name { get { return m_name; } } public virtual string AuthenticationType { get { return m_type; } } public virtual bool IsAuthenticated { get { return !m_name.Equals(""); } } } } // 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
- FixedSOMTable.cs
- HttpCapabilitiesEvaluator.cs
- ScriptManager.cs
- RegexParser.cs
- PagedControl.cs
- DataGridViewCellStyle.cs
- SqlCaseSimplifier.cs
- PlatformNotSupportedException.cs
- XsdDateTime.cs
- ZoneMembershipCondition.cs
- NavigateUrlConverter.cs
- DataGridViewCellValidatingEventArgs.cs
- RectangleHotSpot.cs
- FrameworkContentElement.cs
- MasterPageParser.cs
- XmlAtomicValue.cs
- __ConsoleStream.cs
- GeometryCombineModeValidation.cs
- bidPrivateBase.cs
- SqlCachedBuffer.cs
- TextParagraph.cs
- DirectionalLight.cs
- TextContainer.cs
- FormClosingEvent.cs
- PrintDialog.cs
- MetadataItem.cs
- XmlAnyElementAttribute.cs
- Lease.cs
- DeviceSpecificDialogCachedState.cs
- Comparer.cs
- WaitForChangedResult.cs
- srgsitem.cs
- UnSafeCharBuffer.cs
- ScriptServiceAttribute.cs
- StickyNoteHelper.cs
- UiaCoreTypesApi.cs
- XmlProcessingInstruction.cs
- IPEndPoint.cs
- Debugger.cs
- sqlcontext.cs
- ProfileSettings.cs
- EditingMode.cs
- SettingsPropertyValueCollection.cs
- NameScope.cs
- SchemaInfo.cs
- SurrogateDataContract.cs
- QilBinary.cs
- SoapInteropTypes.cs
- HwndTarget.cs
- GAC.cs
- ArrayList.cs
- Roles.cs
- DelayLoadType.cs
- TimeIntervalCollection.cs
- FloaterParaClient.cs
- CodeIndexerExpression.cs
- Evidence.cs
- SectionXmlInfo.cs
- UserMapPath.cs
- HtmlEmptyTagControlBuilder.cs
- SizeConverter.cs
- BoolExpressionVisitors.cs
- SecureStringHasher.cs
- WindowsTab.cs
- DataRowExtensions.cs
- BitmapMetadataEnumerator.cs
- TransactionManager.cs
- SslStreamSecurityUpgradeProvider.cs
- XmlSchemaInfo.cs
- PropertiesTab.cs
- CreateUserErrorEventArgs.cs
- CustomValidator.cs
- BinaryObjectInfo.cs
- SocketManager.cs
- HMACRIPEMD160.cs
- LOSFormatter.cs
- CultureSpecificCharacterBufferRange.cs
- __Filters.cs
- SoapClientProtocol.cs
- SoapFormatExtensions.cs
- ClientData.cs
- CommandConverter.cs
- UserValidatedEventArgs.cs
- HttpServerVarsCollection.cs
- DataContractJsonSerializer.cs
- DialogResultConverter.cs
- InternalTransaction.cs
- QuotedStringFormatReader.cs
- FontStretchConverter.cs
- MultiAsyncResult.cs
- FormParameter.cs
- TaskHelper.cs
- DataGridViewCellConverter.cs
- ResolveNameEventArgs.cs
- SQLDateTime.cs
- SafeNativeMethods.cs
- RoutedEventHandlerInfo.cs
- PartitionResolver.cs
- RelationshipDetailsCollection.cs
- Clock.cs