Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- FrugalMap.cs
- Rotation3DAnimation.cs
- XmlStreamStore.cs
- RichTextBoxConstants.cs
- DataGrid.cs
- AmbientLight.cs
- MouseActionConverter.cs
- SpellerError.cs
- ToolStripMenuItemDesigner.cs
- jithelpers.cs
- Bezier.cs
- Span.cs
- ForEachAction.cs
- MobileComponentEditorPage.cs
- Rotation3DAnimationUsingKeyFrames.cs
- WindowsStartMenu.cs
- ContainerAction.cs
- UInt64.cs
- FlowDocumentScrollViewerAutomationPeer.cs
- ConstrainedDataObject.cs
- UnsafeNativeMethodsCLR.cs
- SoapWriter.cs
- ExpressionPrinter.cs
- StrongNameKeyPair.cs
- RijndaelManagedTransform.cs
- SemanticResolver.cs
- TraceInternal.cs
- DllNotFoundException.cs
- PropertyRef.cs
- ImageList.cs
- HttpApplicationStateWrapper.cs
- ProgressBarHighlightConverter.cs
- DocumentViewerAutomationPeer.cs
- Delegate.cs
- NotificationContext.cs
- sqlpipe.cs
- DriveInfo.cs
- SystemException.cs
- ParameterCollection.cs
- TransformerConfigurationWizardBase.cs
- ImageField.cs
- SchemaEntity.cs
- WebPartDisplayMode.cs
- JsonQueryStringConverter.cs
- AnnotationDocumentPaginator.cs
- TypeElement.cs
- WebPartDescriptionCollection.cs
- PieceNameHelper.cs
- Soap11ServerProtocol.cs
- AccessedThroughPropertyAttribute.cs
- DescendantBaseQuery.cs
- PtsHost.cs
- IfAction.cs
- Propagator.JoinPropagator.cs
- FormsAuthentication.cs
- TreeView.cs
- SimpleWorkerRequest.cs
- CodeObject.cs
- SliderAutomationPeer.cs
- Encoder.cs
- DbMetaDataFactory.cs
- WebAdminConfigurationHelper.cs
- EventListener.cs
- DocumentSequence.cs
- ContainerActivationHelper.cs
- DesignerGeometryHelper.cs
- PrintControllerWithStatusDialog.cs
- ListControl.cs
- SoapMessage.cs
- Bits.cs
- GeometryGroup.cs
- GenericTextProperties.cs
- DesignOnlyAttribute.cs
- HtmlAnchor.cs
- StylusDownEventArgs.cs
- PointUtil.cs
- TreeViewImageGenerator.cs
- SqlCharStream.cs
- Enlistment.cs
- DifferencingCollection.cs
- ConnectionProviderAttribute.cs
- NamedElement.cs
- NavigateEvent.cs
- DBCSCodePageEncoding.cs
- ChtmlTextWriter.cs
- WebPartActionVerb.cs
- CommandID.cs
- FormViewDeleteEventArgs.cs
- LinkAreaEditor.cs
- xamlnodes.cs
- SqlNotificationEventArgs.cs
- DataRecordInternal.cs
- XamlClipboardData.cs
- XmlDocumentFragment.cs
- FlowDecisionDesigner.xaml.cs
- LineBreakRecord.cs
- BitmapCache.cs
- GZipDecoder.cs
- OdbcError.cs
- CacheManager.cs