TaskExtensions.SyncResult Method (Task<HttpResponseMessage>)
Namespace: Microsoft.VisualStudio.Services.WebApi
Assembly: Microsoft.VisualStudio.Services.WebApi (in Microsoft.VisualStudio.Services.WebApi.dll)
Syntax
'Declaration
<ExtensionAttribute> _
Public Shared Function SyncResult ( _
task As Task(Of HttpResponseMessage) _
) As HttpResponseMessage
public static HttpResponseMessage SyncResult(
this Task<HttpResponseMessage> task
)
[ExtensionAttribute]
public:
static HttpResponseMessage^ SyncResult(
Task<HttpResponseMessage^>^ task
)
static member SyncResult :
task:Task<HttpResponseMessage> -> HttpResponseMessage
public static function SyncResult(
task : Task<HttpResponseMessage>
) : HttpResponseMessage
Parameters
- task
Type: System.Threading.Tasks.Task<HttpResponseMessage>
Return Value
Type: System.Net.Http.HttpResponseMessage
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type Task<HttpResponseMessage>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.