I have gone to License your app and there is only code for C#. I am wondering where to place the license information in my F# WPF application. Does it go in the app.fs file or a different one.
Thanks
I'm not familiar with this SDK but it should go into the assembly (so exe or dll) file that uses it. It would've been helpful to show the C# code, and not just the link:
Esri.ArcGISRuntime.ArcGISRuntimeEnvironment.ClientId = "mYcLieNTid";
try
{
Esri.ArcGISRuntime.ArcGISRuntimeEnvironment.Initialize();
}
catch (Exception ex)
{
Console.WriteLine("Unable to initialize the ArcGIS Runtime with the client ID provided: " + ex.Message);
}
From the recently much improved F# docs Try/With is the equivalent exception handling mechanism in F#:
Esri.ArcGISRuntime.ArcGISRuntimeEnvironment.ClientId <- "mYcLieNTid";
try
Esri.ArcGISRuntime.ArcGISRuntimeEnvironment.Initialize()
with
| ex -> printfn "Unable to initialize the ArcGIS Runtime with the client ID provided: %A" ex.Message
Additional Info: If you have time please take a look at F# for fun and also Modules and Classes, you can also search these topics on SO. Here are some comments:
open
-ing it #load *.fsx
scripts, you can but you don't need to do this for *.fs
files, as those assumed to be built into an assembly. You can just say open File1
assuming you have a File1.fs and inside it a module File1
, then if inside the File1 module you have let let x = 5
, you can say File1.x
to access itApp.fs
). main
function, in the [<EntryPoint>]