question

khattabkhairdeen avatar image
khattabkhairdeen asked

Azure Function 'FunctionExecutionContext'

i'm reading through documentation on azure functions for playfab, yet i see: ' FunctionExecutionContext<dynamic> context = Json.Convert.DeserializeObject<FunctionExecutionContext<dynamic>>(await req.ReadAsStringAsync());' now, not only do i have no clue what any of that means, except my guess would be that it is how to access parameters when exexcuting the script. However, when i try type in FunctionExecutionContext, it doesnt show up in vs and it has a red line. what namespace is that key word under? and also, how do i actually access the parameters/input of the function that i execute, is it not just req.Query? or do i have to make context and args variables and use them?

apisdocumentation
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Gosen Gao avatar image
Gosen Gao answered

FunctionExecutionContext is used to help you access parameters. To use it, you need to include the CS2AFHelperClasses.cs file which contains the implementation of PlayFab.Samples namespace. For more information, please refer to Using and Calling CloudScript using Azure Functions from your PlayFab Title.

2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

khattabkhairdeen avatar image khattabkhairdeen commented ·

I see that now, however.. how do i actually import that package into visual studios? it wont show up

0 Likes 0 ·
Gosen Gao avatar image Gosen Gao khattabkhairdeen commented ·

You should download and add the file mentioned in the document to your project, then you can use that namespace.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.