C# 클래스 Google.PowerShell.Common.ActiveUserConfig

Class that represents the current active gcloud config. The active gcloud config is the config that is listed when running "gcloud config list". This active config can be changed if the user run commands like "gcloud config set account" or if certain CLOUDSDK_* environment variables are changed.
파일 보기 프로젝트 열기: GoogleCloudPlatform/google-cloud-powershell 1 사용 예제들

공개 메소드들

메소드 설명
GetActiveUserConfig ( CancellationToken cancellationToken = default(CancellationToken), bool refreshConfig = false ) : Task

Gets the current active config. This value will be cached for the next call. If refreshConfig is true, however, we will refresh the cache. Everytime the cache is refreshed, a new access token will be generated for the current active config (even if there is no change in the current active config).

GetActiveUserToken ( CancellationToken cancellationToken, bool refresh = false ) : Task

Gets the token that belongs to the current active config. This value will be normally be cached as the current active user config is normally cached. If refresh is true or if the current token already expired, however, we will refresh the active user config to get a new token.

GetPropertyValue ( string key ) : Task

Returns a property of the configuration based on the given key.

비공개 메소드들

메소드 설명
ActiveUserConfig ( string activeConfigJson ) : Newtonsoft.Json.Linq

Creates an active user config by parsing a JSON.

GetCurrentConfigurationFingerPrint ( ) : string

Returns fingerprint of the current configuration. The result will only be changed if there is either a change in the sentinel file (which is touched by gcloud any time the configuration is changed) or if there is a change in any CLOUDSDK_* environment variables.

메소드 상세

GetActiveUserConfig() 공개 정적인 메소드

Gets the current active config. This value will be cached for the next call. If refreshConfig is true, however, we will refresh the cache. Everytime the cache is refreshed, a new access token will be generated for the current active config (even if there is no change in the current active config).
public static GetActiveUserConfig ( CancellationToken cancellationToken = default(CancellationToken), bool refreshConfig = false ) : Task
cancellationToken System.Threading.CancellationToken
refreshConfig bool
리턴 Task

GetActiveUserToken() 공개 정적인 메소드

Gets the token that belongs to the current active config. This value will be normally be cached as the current active user config is normally cached. If refresh is true or if the current token already expired, however, we will refresh the active user config to get a new token.
public static GetActiveUserToken ( CancellationToken cancellationToken, bool refresh = false ) : Task
cancellationToken System.Threading.CancellationToken
refresh bool
리턴 Task

GetPropertyValue() 공개 정적인 메소드

Returns a property of the configuration based on the given key.
public static GetPropertyValue ( string key ) : Task
key string
리턴 Task