My X++ code below:
using Azure.Storage.Files.Shares;
using Azure.Storage.Files.Shares.Models;
using System.Collections;
using System.Threading;
{
...
{
ShareClient shareClient = new ShareClient(connectionString,fileShareReference);
ShareDirectoryClient rootDir = shareClient.GetRootDirectoryClient();
ShareDirectoryClient fileDir = rootDir.GetSubdirectoryClient(_FilePath);
{
error(fileDir.Uri.ToString());
}
}
...
}
As I know in C#, it doesn't need to pass any parameter, but X++ says it doesn't support literal of CancellationToken, is this the problem?
By the way, the version of my dev environment is PU64(10.0.40), the corresponding Azure.Storage.Files.Shares.dll is 12.12.1.0, the corresponding Azure.core.dll 1.35.0
I also check the loaded assembly with reflection code below, it shows the method did exist.....
var version = assembly.GetName().Version;
Info("Azure.Storage.Files.Shares Version:" + version.ToString());
System.Reflection.MethodInfo methodInfo = type.GetMethod("Exists");
if (methodInfo != null)
{
info("Return type: " + methodInfo.ReturnType.ToString());
int i, paramCount;
paramCount = parameters.Length;
for (i = 1; i <= paramCount; i++)
{
ParameterInfo parameter = methodInfo.GetParameters().Get(i - 1);
info(strFmt("Parameter %1: %2", i, parameter.ParameterType.ToString()));
}
}
else
{
info("Method 'Exists' not found.");
}