aboutsummaryrefslogtreecommitdiff
path: root/SocketHttpListener/Net/HttpListenerBasicIdentity.cs
diff options
context:
space:
mode:
Diffstat (limited to 'SocketHttpListener/Net/HttpListenerBasicIdentity.cs')
-rw-r--r--SocketHttpListener/Net/HttpListenerBasicIdentity.cs37
1 files changed, 8 insertions, 29 deletions
diff --git a/SocketHttpListener/Net/HttpListenerBasicIdentity.cs b/SocketHttpListener/Net/HttpListenerBasicIdentity.cs
index faa26693d..5f6ec44b9 100644
--- a/SocketHttpListener/Net/HttpListenerBasicIdentity.cs
+++ b/SocketHttpListener/Net/HttpListenerBasicIdentity.cs
@@ -1,4 +1,4 @@
-using System.Security.Principal;
+using System.Security.Principal;
namespace SocketHttpListener.Net
{
@@ -12,10 +12,7 @@ namespace SocketHttpListener.Net
this.password = password;
}
- public virtual string Password
- {
- get { return password; }
- }
+ public virtual string Password => password;
}
public class GenericIdentity : IIdentity
@@ -26,7 +23,7 @@ namespace SocketHttpListener.Net
public GenericIdentity(string name)
{
if (name == null)
- throw new System.ArgumentNullException("name");
+ throw new System.ArgumentNullException(nameof(name));
m_name = name;
m_type = "";
@@ -35,36 +32,18 @@ namespace SocketHttpListener.Net
public GenericIdentity(string name, string type)
{
if (name == null)
- throw new System.ArgumentNullException("name");
+ throw new System.ArgumentNullException(nameof(name));
if (type == null)
- throw new System.ArgumentNullException("type");
+ throw new System.ArgumentNullException(nameof(type));
m_name = name;
m_type = type;
}
- public virtual string Name
- {
- get
- {
- return m_name;
- }
- }
+ public virtual string Name => m_name;
- public virtual string AuthenticationType
- {
- get
- {
- return m_type;
- }
- }
+ public virtual string AuthenticationType => m_type;
- public virtual bool IsAuthenticated
- {
- get
- {
- return !m_name.Equals("");
- }
- }
+ public virtual bool IsAuthenticated => !m_name.Equals("");
}
}