Show / Hide Table of Contents

# Class CredentialService

Service responsible for securing credentials in a platform-neutral manner. This provides a generic API for read, save and delete credentials

##### Inheritance

System.Object
CredentialService

##### 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:Microsoft.SqlTools.ServiceLayer.Credentials

###### Assembly:Microsoft.SqlTools.ServiceLayer.dll

##### Syntax

    public class CredentialService

### Properties

| Improve this Doc View Source

#### Instance

Gets the singleton service instance

##### Declaration

    public static CredentialService Instance { get; }

##### Property Value

Type | Description
--- | ---
CredentialService |

### Methods

| Improve this Doc View Source

#### HandleDeleteCredentialRequest(Credential, RequestContext<Boolean>)

##### Declaration

    public Task HandleDeleteCredentialRequest(Credential credential, RequestContext<bool> requestContext)

##### Parameters

Type | Name | Description
--- | --- | ---
Credential | credential |
RequestContext<System.Boolean> | requestContext |

##### Returns

Type | Description
--- | ---
System.Threading.Tasks.Task |

| Improve this Doc View Source

#### HandleReadCredentialRequest(Credential, RequestContext<Credential>)

##### Declaration

    public Task HandleReadCredentialRequest(Credential credential, RequestContext<Credential> requestContext)

##### Parameters

Type | Name | Description
--- | --- | ---
Credential | credential |
RequestContext<Credential> | requestContext |

##### Returns

Type | Description
--- | ---
System.Threading.Tasks.Task |

| Improve this Doc View Source

#### HandleSaveCredentialRequest(Credential, RequestContext<Boolean>)

##### Declaration

    public Task HandleSaveCredentialRequest(Credential credential, RequestContext<bool> requestContext)

##### Parameters

Type | Name | Description
--- | --- | ---
Credential | credential |
RequestContext<System.Boolean> | requestContext |

##### Returns

Type | Description
--- | ---
System.Threading.Tasks.Task |

| Improve this Doc View Source

#### InitializeService(IProtocolEndpoint)

##### Declaration

    public void InitializeService(IProtocolEndpoint serviceHost)

##### Parameters

Type | Name | Description
--- | --- | ---
IProtocolEndpoint | serviceHost |