question

omerkhalid avatar image
omerkhalid asked

Duplicate classes in in helper files ExecuteFunction.cs and CS2AFHelperClasses.cs

I am trying to locally debug azure functions. The document for executing azure functions via cloudscript says to include CS2AFHelperClasses.cs file. The document for locally debugging functions says to include ExecuteFunction.cs file in the local project. However both of these contain duplicate classes such as TitleAuthenticationContext,FunctionExecutionContext<T> and many more. I am at a complete loss here and don't know how to proceed.

CloudScript
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

·
Citrus Yan avatar image
Citrus Yan answered

They serve for different purposes:

  • The ExecuteFunction.cs file you mentioned in question is the local implementation of the ExecuteFunction API call, It simulates the behavior of how PlayFab process the ExecuteFunction API call on the server side locally, by reading in parameters specified, passing the right context for the local Azure Functions app to execute, waiting for its response and returning it back . Therefore, classes such as TitleAuthenticationContextare necessary for ExecuteFunction.cs because it needs to use them to pass the right context to your local Azure Functions app.
  • The CS2AFHelperClasses.cs file helps you use the context passed by PlayFab (in this case, the context is passed by the localExecuteFunction implementation) to implement your Azure Functions app.
10 |1200

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

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.