Search Results for

    Show / Hide Table of Contents

    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.

    Inheritance
    object
    GenericCredentials
    Inherited Members
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetType()
    object.MemberwiseClone()
    Namespace: Sdl.LanguagePlatform.TranslationMemoryApi
    Assembly: Sdl.LanguagePlatform.TranslationMemoryApi.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

    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

    true if the specified object is equal to this instance; otherwise, false.

    Overrides
    object.Equals(object)
    Exceptions
    Type Condition
    NullReferenceException

    The obj parameter is null.

    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
    object.GetHashCode()

    GetPropertyKeys()

    Returns an array of property key names that have values defined for them.

    Declaration
    public string[] GetPropertyKeys()
    Returns
    Type Description
    string[]
    Remarks

    This array does not contain entries for "userName" or "password" values.

    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.

    Overrides
    object.ToString()
    In this article
    • Constructors
      • GenericCredentials(string)
      • GenericCredentials(string, string)
    • Properties
      • this[string]
      • Password
      • UserName
    • Methods
      • Equals(object)
      • GetHashCode()
      • GetPropertyKeys()
      • ToCredentialString()
      • ToString()
    Back to top Generated by DocFX