discoverynetworkcredential.cs
来自「SharpDevelop2.0.0 c#开发免费工具」· CS 代码 · 共 44 行
CS
44 行
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Matthew Ward" email="mrward@users.sourceforge.net"/>
// <version>$Revision: 1005 $</version>
// </file>
using System;
using System.Net;
namespace ICSharpCode.SharpDevelop.Gui
{
/// <summary>
/// Adds an authentication type to the standard NetworkCredential class.
/// </summary>
public class DiscoveryNetworkCredential : NetworkCredential
{
public const string DefaultAuthenticationType = "Default";
string authenticationType = String.Empty;
public DiscoveryNetworkCredential(string userName, string password, string domain, string authenticationType) : base(userName, password, domain)
{
this.authenticationType = authenticationType;
}
public DiscoveryNetworkCredential(NetworkCredential credential, string authenticationType) : this(credential.UserName, credential.Password, credential.Domain, authenticationType)
{
}
public string AuthenticationType {
get {
return authenticationType;
}
}
public bool IsDefaultAuthenticationType {
get {
return String.Compare(authenticationType, DefaultAuthenticationType, true) == 0;
}
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?