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
- AmbiguousMatchException.cs
- ActiveXContainer.cs
- PolygonHotSpot.cs
- ListViewItemMouseHoverEvent.cs
- ConfigXmlReader.cs
- ReadonlyMessageFilter.cs
- HtmlGenericControl.cs
- FlowDocument.cs
- UnsafeNativeMethods.cs
- HttpGetProtocolImporter.cs
- WindowsSpinner.cs
- ToolStripDesignerUtils.cs
- ServicePoint.cs
- HostExecutionContextManager.cs
- TextBox.cs
- SaveWorkflowAsyncResult.cs
- InnerItemCollectionView.cs
- ResXResourceWriter.cs
- FontNameEditor.cs
- SimpleHandlerFactory.cs
- AppearanceEditorPart.cs
- InvalidateEvent.cs
- Model3D.cs
- ObjectIDGenerator.cs
- SiteMapHierarchicalDataSourceView.cs
- ControlBuilder.cs
- OleDbPropertySetGuid.cs
- UrlAuthorizationModule.cs
- DataControlField.cs
- Int32Storage.cs
- HttpEncoder.cs
- FileSecurity.cs
- Fault.cs
- EventManager.cs
- FilteredDataSetHelper.cs
- NGCSerializer.cs
- ContainerParaClient.cs
- Geometry.cs
- AttributeAction.cs
- JsonSerializer.cs
- DrawingContext.cs
- HttpRequestCacheValidator.cs
- HttpListenerElement.cs
- DataPager.cs
- RootProfilePropertySettingsCollection.cs
- TrackingServices.cs
- DataGridViewComboBoxColumn.cs
- XmlResolver.cs
- DoubleLinkList.cs
- GroupPartitionExpr.cs
- QuadraticBezierSegment.cs
- RectangleF.cs
- SqlResolver.cs
- VectorCollection.cs
- WebWorkflowRole.cs
- APCustomTypeDescriptor.cs
- ImmutableCollection.cs
- Cursors.cs
- WindowsFormsSynchronizationContext.cs
- Deflater.cs
- SqlTypeSystemProvider.cs
- ExtensibleSyndicationObject.cs
- StringArrayConverter.cs
- TemplateEditingFrame.cs
- OdbcConnectionFactory.cs
- NativeMethods.cs
- PopupControlService.cs
- DefaultDiscoveryService.cs
- _NegotiateClient.cs
- WebUtil.cs
- IsolatedStorageFile.cs
- safelink.cs
- Button.cs
- HuffCodec.cs
- xamlnodes.cs
- ModelVisual3D.cs
- Help.cs
- GeometryHitTestResult.cs
- TransactionOptions.cs
- StreamAsIStream.cs
- Empty.cs
- UpdateCommand.cs
- RenderDataDrawingContext.cs
- HwndTarget.cs
- TemplateInstanceAttribute.cs
- BooleanFacetDescriptionElement.cs
- DesignerToolStripControlHost.cs
- DbCommandTree.cs
- SelectorItemAutomationPeer.cs
- WebRequestModulesSection.cs
- JournalEntry.cs
- HMACSHA384.cs
- DataContractSet.cs
- DataTemplateKey.cs
- ProxyWebPart.cs
- SingleKeyFrameCollection.cs
- GridViewColumnHeader.cs
- safelink.cs
- EmbeddedMailObject.cs
- Conditional.cs