C# Class StagingWebApi.Utils

显示文件 Open project: NuGet/Entropy

Public Methods

Method Description
CleanUpArtifacts ( List artifacts ) : Task
CreateBaseAddress ( Uri requestUri, string path ) : Uri
CreateErrorContent ( string reason ) : HttpContent
CreateErrorResponse ( HttpStatusCode statusCode, string reason ) : HttpResponseMessage
CreateJsonContent ( string json ) : HttpContent
CreateJsonResponse ( HttpStatusCode statusCode, string json ) : HttpResponseMessage
GetService ( Uri indexAddress, string resourceType ) : Task
LoadResource ( HttpClient httpClient, Uri uri, CancellationToken token ) : Task
MakeIndex ( string indexJson ) : List>.IDictionary

Method Details

CleanUpArtifacts() public static method

public static CleanUpArtifacts ( List artifacts ) : Task
artifacts List
return Task

CreateBaseAddress() public static method

public static CreateBaseAddress ( Uri requestUri, string path ) : Uri
requestUri System.Uri
path string
return System.Uri

CreateErrorContent() public static method

public static CreateErrorContent ( string reason ) : HttpContent
reason string
return System.Net.Http.HttpContent

CreateErrorResponse() public static method

public static CreateErrorResponse ( HttpStatusCode statusCode, string reason ) : HttpResponseMessage
statusCode HttpStatusCode
reason string
return System.Net.Http.HttpResponseMessage

CreateJsonContent() public static method

public static CreateJsonContent ( string json ) : HttpContent
json string
return System.Net.Http.HttpContent

CreateJsonResponse() public static method

public static CreateJsonResponse ( HttpStatusCode statusCode, string json ) : HttpResponseMessage
statusCode HttpStatusCode
json string
return System.Net.Http.HttpResponseMessage

GetService() public static method

public static GetService ( Uri indexAddress, string resourceType ) : Task
indexAddress System.Uri
resourceType string
return Task

LoadResource() public static method

public static LoadResource ( HttpClient httpClient, Uri uri, CancellationToken token ) : Task
httpClient System.Net.Http.HttpClient
uri System.Uri
token System.Threading.CancellationToken
return Task

MakeIndex() public static method

public static MakeIndex ( string indexJson ) : List>.IDictionary
indexJson string
return List>.IDictionary