Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / clr / src / BCL / System / Security / Principal / GenericIdentity.cs / 1 / 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;
[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");
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");
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;
[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");
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");
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
- X509PeerCertificateAuthentication.cs
- OrderPreservingPipeliningMergeHelper.cs
- MobileErrorInfo.cs
- GeometryConverter.cs
- TrackingStringDictionary.cs
- SqlTransaction.cs
- HierarchicalDataBoundControlAdapter.cs
- MenuBindingsEditor.cs
- SystemGatewayIPAddressInformation.cs
- ApplyTemplatesAction.cs
- HttpCachePolicy.cs
- RequestQueryProcessor.cs
- ConnectionPointGlyph.cs
- ViewPort3D.cs
- XamlInt32CollectionSerializer.cs
- GroupBox.cs
- TextSearch.cs
- SqlDataSourceTableQuery.cs
- ETagAttribute.cs
- EventBindingService.cs
- AppDomainManager.cs
- TemplateNameScope.cs
- StringAttributeCollection.cs
- Mapping.cs
- RequestNavigateEventArgs.cs
- Contracts.cs
- Queue.cs
- AsnEncodedData.cs
- ChannelManager.cs
- Empty.cs
- CodeAccessPermission.cs
- SoapAttributeOverrides.cs
- TreeBuilderBamlTranslator.cs
- HandleExceptionArgs.cs
- ScriptControlManager.cs
- smtppermission.cs
- FreezableCollection.cs
- PeerNameRecordCollection.cs
- ToolStripDropDownItem.cs
- PtsPage.cs
- ProtocolReflector.cs
- SafeArrayRankMismatchException.cs
- SqlParameterizer.cs
- CodeEventReferenceExpression.cs
- XmlText.cs
- EntityDataSourceWizardForm.cs
- Int16AnimationBase.cs
- MessageContractMemberAttribute.cs
- BrowserCapabilitiesFactoryBase.cs
- XmlElementAttributes.cs
- MessageOperationFormatter.cs
- RowToFieldTransformer.cs
- RuntimeHelpers.cs
- BrowserCapabilitiesCodeGenerator.cs
- ClientRoleProvider.cs
- ExpandSegment.cs
- GeometryCombineModeValidation.cs
- ColumnBinding.cs
- EntityFunctions.cs
- CleanUpVirtualizedItemEventArgs.cs
- DelegateBodyWriter.cs
- UIElement3D.cs
- ManualResetEvent.cs
- InputLanguage.cs
- CalculatedColumn.cs
- sapiproxy.cs
- WindowsRegion.cs
- CodeVariableReferenceExpression.cs
- XmlAutoDetectWriter.cs
- SqlEnums.cs
- GridItem.cs
- TransportListener.cs
- QilCloneVisitor.cs
- RepeatInfo.cs
- _FtpControlStream.cs
- WaitForChangedResult.cs
- SubMenuStyle.cs
- InvalidFilterCriteriaException.cs
- ComponentEvent.cs
- SpellerStatusTable.cs
- HtmlControlPersistable.cs
- XmlSchemaSimpleContent.cs
- FixedDocumentPaginator.cs
- EditorZone.cs
- InheritedPropertyChangedEventArgs.cs
- SQLInt16Storage.cs
- PersonalizationStateInfoCollection.cs
- RSACryptoServiceProvider.cs
- cookie.cs
- DataServicePagingProviderWrapper.cs
- CompareInfo.cs
- OutputBuffer.cs
- ListBoxDesigner.cs
- SplitContainer.cs
- TreeViewItemAutomationPeer.cs
- MarshalByValueComponent.cs
- GridViewRow.cs
- handlecollector.cs
- UrlPath.cs
- Help.cs