Exemplo n.º 1
0
        /// <summary>
        /// Check <see cref="t:Sdk.Service.IClient"/>
        /// </summary>
        /// <returns>Check <see cref="t:Sdk.Service.IClient"/></returns>
        public IAssetService GetAssetService()
        {
            if (!_credentials.AreValid() && !_credentials.CanRefresh)
            {
                throw new MissingTokenException("Access token expired and refresh token is missing. " +
                                                "Either pass a not expited access token through configuration or login through OAuth2");
            }

            return(_assetService ?? (_assetService = new AssetService(_requestSender)));
        }