Class ServiceBase
- Namespace
- Oqtane.Services
- Assembly
- Oqtane.Client.dll
- Inheritance
-
ServiceBase
Constructors
ServiceBase(HttpClient)
protected ServiceBase(HttpClient client)
Parameters
client
HttpClient
ServiceBase(HttpClient, SiteState)
protected ServiceBase(HttpClient httpClient, SiteState siteState)
Parameters
httpClient
HttpClient
siteState
SiteState
ServiceBase(IHttpClientFactory, SiteState)
protected ServiceBase(IHttpClientFactory factory, SiteState siteState)
Parameters
factory
IHttpClientFactory
siteState
SiteState
Properties
Alias
[Obsolete("This property of ServiceBase is deprecated. Cross tenant service calls are not supported.", false)]
public Alias Alias { get; set; }
Property Value
- Alias
Methods
CreateApiUrl(Alias, string)
[Obsolete("This method is obsolete. Use CreateApiUrl(string serviceName, Alias alias) in conjunction with ControllerRoutes.ApiRoute in Controllers instead.", false)]
public string CreateApiUrl(Alias alias, string serviceName)
Parameters
alias
Alias
serviceName
string
Returns
- string
CreateApiUrl(string)
public string CreateApiUrl(string serviceName)
Parameters
serviceName
string
Returns
- string
CreateApiUrl(string, Alias)
public string CreateApiUrl(string serviceName, Alias alias)
Parameters
serviceName
string
alias
Alias
Returns
- string
CreateApiUrl(string, Alias, string)
public string CreateApiUrl(string serviceName, Alias alias, string routeTemplate)
Parameters
serviceName
string
alias
Alias
routeTemplate
string
Returns
- string
CreateAuthorizationPolicyUrl(string, Dictionary<string, int>)
public string CreateAuthorizationPolicyUrl(string url, Dictionary<string, int> authEntityId)
Parameters
url
string
authEntityId
Dictionary<string, int>
Returns
- string
CreateAuthorizationPolicyUrl(string, int)
[Obsolete("This method is obsolete. Use CreateAuthorizationPolicyUrl(string url, string entityName, int entityId) where entityName = EntityNames.Module instead.", false)]
public string CreateAuthorizationPolicyUrl(string url, int entityId)
Parameters
url
string
entityId
int
Returns
- string
CreateAuthorizationPolicyUrl(string, string, int)
public string CreateAuthorizationPolicyUrl(string url, string entityName, int entityId)
Parameters
url
string
entityName
string
entityId
int
Returns
- string
DeleteAsync(string)
protected Task DeleteAsync(string uri)
Parameters
uri
string
Returns
- Task
GetAsync(string)
protected Task GetAsync(string uri)
Parameters
uri
string
Returns
- Task
GetByteArrayAsync(string)
protected Task<byte[]> GetByteArrayAsync(string uri)
Parameters
uri
string
Returns
- Task<byte[]>
GetHttpClient()
public HttpClient GetHttpClient()
Returns
- HttpClient
GetJsonAsync<T>(string)
protected Task<T> GetJsonAsync<T>(string uri)
Parameters
uri
string
Returns
- Task<T>
Type Parameters
T
GetJsonAsync<T>(string, T)
protected Task<T> GetJsonAsync<T>(string uri, T defaultResult)
Parameters
uri
string
defaultResult
T
Returns
- Task<T>
Type Parameters
T
GetStringAsync(string)
protected Task<string> GetStringAsync(string uri)
Parameters
uri
string
Returns
- Task<string>
PostAsync(string)
protected Task PostAsync(string uri)
Parameters
uri
string
Returns
- Task
PostJsonAsync<T>(string, T)
protected Task<T> PostJsonAsync<T>(string uri, T value)
Parameters
uri
string
value
T
Returns
- Task<T>
Type Parameters
T
PostJsonAsync<TValue, TResult>(string, TValue)
protected Task<TResult> PostJsonAsync<TValue, TResult>(string uri, TValue value)
Parameters
uri
string
value
TValue
Returns
- Task<TResult>
Type Parameters
TValue
TResult
PutAsync(string)
protected Task PutAsync(string uri)
Parameters
uri
string
Returns
- Task
PutJsonAsync<T>(string, T)
protected Task<T> PutJsonAsync<T>(string uri, T value)
Parameters
uri
string
value
T
Returns
- Task<T>
Type Parameters
T
PutJsonAsync<TValue, TResult>(string, TValue)
protected Task<TResult> PutJsonAsync<TValue, TResult>(string uri, TValue value)
Parameters
uri
string
value
TValue
Returns
- Task<TResult>
Type Parameters
TValue
TResult