Class GenericCredentials
A generic class for building and parsing a credentials string. This will usually contain a UserName and Password but may also contain other parameters using an indexer on this class.
Inherited Members
Namespace: SdlSdl.TerminologySdl.Terminology.TerminologyProviderCore
Assembly: Sdl.Terminology.TerminologyProvider.Core.dll
Syntax
public class GenericCredentials
Constructors
GenericCredentials(string)
Constructs a GenericCredentials class from a credentials string previously created by another instance of this class.
Declaration
public GenericCredentials(string credentialString)
Parameters
Type | Name | Description |
---|---|---|
string | credentialString |
GenericCredentials(string, string)
Constructs a GenericCredentials class from a UserName and Password string.
Declaration
public GenericCredentials(string userName, string password)
Parameters
Type | Name | Description |
---|---|---|
string | userName | |
string | password |
Properties
this[string]
A string indexer that allows any number of key/value pairs to used in a credentials store.
Declaration
public string this[string propertyName] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
string | propertyName |
Property Value
Type | Description |
---|---|
string |
Password
The Password to be used in a credentials store - if null, then no password is specified.
Declaration
public string Password { get; set; }
Property Value
Type | Description |
---|---|
string |
PropertyKeys
Returns an array of property key names that have values defined for them.
Declaration
public string[] PropertyKeys { get; }
Property Value
Type | Description |
---|---|
string |
Remarks
This array does not contain entries for "userName" or "password" values.
UserName
The UserName to be used in a credentials store - if null, then no username is specified.
Declaration
public string UserName { get; set; }
Property Value
Type | Description |
---|---|
string |
Methods
Equals(object)
Determines whether the specified object is equal to this instance.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | The object to compare with this instance. |
Returns
Type | Description |
---|---|
bool |
|
Overrides
Exceptions
Type | Condition |
---|---|
NullReferenceException | The |
GetHashCode()
Returns a hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. |
Overrides
ToCredentialString()
Returns a string containing a UserName and Password and any other defined parameters that can be used in a credentials store.
Declaration
public string ToCredentialString()
Returns
Type | Description |
---|---|
string | The credential string representation. |
ToString()
Returns the string representation of the credentials. See ToCredentialString().
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | The credential string representation. |