Class ProxyCredentialsCache
Proxy credentials cache.
Inheritance
System.Object
ProxyCredentialsCache
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: FM.LiveSwitch
Assembly: FM.LiveSwitch.dll
Syntax
public class ProxyCredentialsCache
Constructors
ProxyCredentialsCache()
Initializes a new instance of the ProxyCredentialsCache class.
Declaration
public ProxyCredentialsCache()
Properties
Cache
Gets the underlying cache.
Declaration
public ManagedConcurrentDictionary<string, ProxyCredentials> Cache { get; }
Property Value
Type | Description |
---|---|
ManagedConcurrentDictionary<System.String, ProxyCredentials> |
DefaultCredentials
Gets or sets the default credentials.
Declaration
public ProxyCredentials DefaultCredentials { get; set; }
Property Value
Type | Description |
---|---|
ProxyCredentials |
Methods
FromJson(String)
Deserializes an instance from JSON.
Declaration
public static ProxyCredentialsCache FromJson(string instanceJson)
Parameters
Type | Name | Description |
---|---|---|
System.String | instanceJson | The serialized JSON. |
Returns
Type | Description |
---|---|
ProxyCredentialsCache | The instance. |
GetCredentials(String)
Gets the proxy credentials for the given proxy IP address.
Declaration
public ProxyCredentials GetCredentials(string proxyIPAddress)
Parameters
Type | Name | Description |
---|---|---|
System.String | proxyIPAddress | The proxy IP address. |
Returns
Type | Description |
---|---|
ProxyCredentials | The proxy credentials, if they exist, or |
SetCredentials(String, ProxyCredentials)
Sets the proxy credentials for the given proxy IP address.
Declaration
public void SetCredentials(string proxyIPAddress, ProxyCredentials proxyCredentials)
Parameters
Type | Name | Description |
---|---|---|
System.String | proxyIPAddress | The proxy IP address. |
ProxyCredentials | proxyCredentials | The proxy credentials. |
SetCredentials(String[], ProxyCredentials)
Sets the proxy credentials for the given proxy IP addresss.
Declaration
public void SetCredentials(string[] proxyIPAddresses, ProxyCredentials proxyCredentials)
Parameters
Type | Name | Description |
---|---|---|
System.String[] | proxyIPAddresses | The proxy IP addresses. |
ProxyCredentials | proxyCredentials | The proxy credentials. |
ToJson()
Serializes this instance to JSON.
Declaration
public string ToJson()
Returns
Type | Description |
---|---|
System.String | The serialized JSON. |
ToJson(ProxyCredentialsCache)
Serializes an instance to JSON.
Declaration
public static string ToJson(ProxyCredentialsCache instance)
Parameters
Type | Name | Description |
---|---|---|
ProxyCredentialsCache | instance | The instance. |
Returns
Type | Description |
---|---|
System.String | The serialized JSON. |