Class ServerExtensions
This holds all the server related extensions methods
Inheritance
Inherited Members
Namespace:Dapplo.Jira
Assembly:Dapplo.Jira.dll
Syntax
public static class ServerExtensions
Methods
| Improve this Doc View SourceGetAvatarAsync<TResponse>(IServerDomain, AvatarUrls, AvatarSizes, CancellationToken)
Retrieve the Avatar for the supplied avatarUrls object
Declaration
public static Task<TResponse> GetAvatarAsync<TResponse>(this IServerDomain jiraClient, AvatarUrls avatarUrls, AvatarSizes avatarSize = AvatarSizes.ExtraLarge, CancellationToken cancellationToken = null)where TResponse : class
Parameters
Type | Name | Description |
---|---|---|
IServerDomain | jiraClient | IServerDomain to bind the extension method to |
AvatarUrls | avatarUrls | AvatarUrls object from User or Myself method, or a project from the projects |
AvatarSizes | avatarSize | Use one of the AvatarSizes to specify the size you want to have |
System.Threading.CancellationToken | cancellationToken | CancellationToken |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<TResponse> | Bitmap,BitmapSource or MemoryStream (etc) depending on TResponse |
Type Parameters
Name | Description |
---|---|
TResponse | the type to return the result into. e.g. Bitmap,BitmapSource or MemoryStream |
GetConfigurationAsync(IServerDomain, CancellationToken)
Get server configuration See get configuration
Declaration
public static Task<Configuration> GetConfigurationAsync(this IServerDomain jiraClient, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
IServerDomain | jiraClient | IServerDomain to bind the extension method to |
System.Threading.CancellationToken | cancellationToken | CancellationToken |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Configuration> | Configuration |
GetFieldsAsync(IServerDomain, CancellationToken)
Get all the available fields See get fields
Declaration
public static Task<IList<Field>> GetFieldsAsync(this IServerDomain jiraClient, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
IServerDomain | jiraClient | IServerDomain to bind the extension method to |
System.Threading.CancellationToken | cancellationToken | CancellationToken |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IList<Field>> | IList of Field objects |
GetInfoAsync(IServerDomain, CancellationToken)
Get server information See: https://docs.atlassian.com/jira/REST/latest/#d2e3828
Declaration
public static Task<ServerInfo> GetInfoAsync(this IServerDomain jiraClient, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
IServerDomain | jiraClient | IServerDomain to bind the extension method to |
System.Threading.CancellationToken | cancellationToken | CancellationToken |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<ServerInfo> | ServerInfo |
GetTimeTrackingConfigurationAsync(IServerDomain, CancellationToken)
Admin ONLY!!! Use GetConfigurationAsync instead, which funny enough supplies you with the same information. Get time tracking configuration (sub-set of the configuration) See get shared timetracking configuration
Declaration
public static Task<TimeTrackingConfiguration> GetTimeTrackingConfigurationAsync(this IServerDomain jiraClient, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
IServerDomain | jiraClient | IServerDomain to bind the extension method to |
System.Threading.CancellationToken | cancellationToken | CancellationToken |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<TimeTrackingConfiguration> | TimeTrackingConfiguration |
GetUriContentAsync<TResponse>(IServerDomain, Uri, CancellationToken)
Returns the content, specified by the Uri from the JIRA server. This is used internally, but can also be used to get e.g. the icon for an issue type.
Declaration
public static Task<TResponse> GetUriContentAsync<TResponse>(this IServerDomain jiraClient, Uri contentUri, CancellationToken cancellationToken = null)where TResponse : class
Parameters
Type | Name | Description |
---|---|---|
IServerDomain | jiraClient | IServerDomain to bind the extension method to |
System.Uri | contentUri | Uri |
System.Threading.CancellationToken | cancellationToken | CancellationToken |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<TResponse> | TResponse |
Type Parameters
Name | Description |
---|---|
TResponse |
SetTimeTrackingConfigurationAsync(IServerDomain, TimeTrackingConfiguration, CancellationToken)
Admin ONLY!!! Set time tracking configuration (sub-set of the configuration) See get shared timetracking configuration
Declaration
public static Task SetTimeTrackingConfigurationAsync(this IServerDomain jiraClient, TimeTrackingConfiguration timeTrackingConfiguration, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
IServerDomain | jiraClient | IServerDomain to bind the extension method to |
TimeTrackingConfiguration | timeTrackingConfiguration | TimeTrackingConfiguration to use |
System.Threading.CancellationToken | cancellationToken | CancellationToken |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |