scripts
This commit is contained in:
@@ -0,0 +1,82 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Security.Principal
|
||||
{
|
||||
/// <summary>Represents a generic user.</summary>
|
||||
// Token: 0x020005A9 RID: 1449
|
||||
[ComVisible(true)]
|
||||
[Serializable]
|
||||
public class GenericIdentity : IIdentity
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Principal.GenericIdentity" /> class representing the user with the specified name and authentication type.</summary>
|
||||
/// <param name="name">The name of the user on whose behalf the code is running. </param>
|
||||
/// <param name="type">The type of authentication used to identify the user. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">The <paramref name="name" /> parameter is null.-or- The <paramref name="type" /> parameter is null. </exception>
|
||||
// Token: 0x06003515 RID: 13589 RVA: 0x000B6DB0 File Offset: 0x000B4FB0
|
||||
public GenericIdentity(string name, string type)
|
||||
{
|
||||
if (name == null)
|
||||
{
|
||||
throw new ArgumentNullException("name");
|
||||
}
|
||||
if (type == null)
|
||||
{
|
||||
throw new ArgumentNullException("type");
|
||||
}
|
||||
this.m_name = name;
|
||||
this.m_type = type;
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Principal.GenericIdentity" /> class representing the user with the specified name.</summary>
|
||||
/// <param name="name">The name of the user on whose behalf the code is running. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">The <paramref name="name" /> parameter is null. </exception>
|
||||
// Token: 0x06003516 RID: 13590 RVA: 0x000B6DF4 File Offset: 0x000B4FF4
|
||||
public GenericIdentity(string name)
|
||||
: this(name, string.Empty)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Gets the type of authentication used to identify the user.</summary>
|
||||
/// <returns>The type of authentication used to identify the user.</returns>
|
||||
// Token: 0x17000A66 RID: 2662
|
||||
// (get) Token: 0x06003517 RID: 13591 RVA: 0x000B6E04 File Offset: 0x000B5004
|
||||
public virtual string AuthenticationType
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_type;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the user's name.</summary>
|
||||
/// <returns>The name of the user on whose behalf the code is being run.</returns>
|
||||
// Token: 0x17000A67 RID: 2663
|
||||
// (get) Token: 0x06003518 RID: 13592 RVA: 0x000B6E0C File Offset: 0x000B500C
|
||||
public virtual string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_name;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether the user has been authenticated.</summary>
|
||||
/// <returns>true if the user was has been authenticated; otherwise, false.</returns>
|
||||
// Token: 0x17000A68 RID: 2664
|
||||
// (get) Token: 0x06003519 RID: 13593 RVA: 0x000B6E14 File Offset: 0x000B5014
|
||||
public virtual bool IsAuthenticated
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_name.Length > 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0400158E RID: 5518
|
||||
private string m_name;
|
||||
|
||||
// Token: 0x0400158F RID: 5519
|
||||
private string m_type;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user