MapBlazor: Architecture of a Blazor Component Library for ArcGIS Maps (Series)

MapBlazor is a Razor Class Library that puts the ArcGIS Maps SDK for JavaScript (Esri) behind a typed .NET API. A Blazor app, whether Server, WebAssembly or Auto, can add 2D maps and 3D scenes, layers, basemaps, drawing, selection, popups and widgets without writing JavaScript. This series covers the architecture behind it: how the JavaScript SDK is bundled and shipped, how the SDK is bootstrapped, how .NET and JS talk to each other, how map state flows back into Blazor, and how it is packaged and tested. Part Topic 01 Goals, project layout and the build pipeline 02 Configuration-first SDK bootstrapping and pluggable authentication (bring your own IdP) 03 The .NET ↔ JavaScript bridge: registry, DTOs, callbacks, disposal 04 The MapView<TMap> component and per-map services 05 Layers, basemaps, 2D/3D, drawing, selection, popups and widgets 06 State with Fluxor, error contracts, packaging and testing Stack: .NET 10 Razor Class Library, ArcGIS Map...

My FSharp Notes

My Notes - F#

Basic File Copy with overwrites - but no failsafe if failed.

Can run on Linqpad in F# Expression Mode.

let rec directoryCopy srcPath dstPath copySubDirs =

  if not <| System.IO.Directory.Exists(srcPath) then
      let msg = System.String.Format("Source directory does not exist or could not be found: {0}", srcPath)
      raise (System.IO.DirectoryNotFoundException(msg))

  if not <| System.IO.Directory.Exists(dstPath) then
      System.IO.Directory.CreateDirectory(dstPath) |> ignore

  let srcDir = new System.IO.DirectoryInfo(srcPath)

  for file in srcDir.GetFiles() do
      let temppath = System.IO.Path.Combine(dstPath, file.Name)
      printfn "from:%s -> to:%s" file.FullName temppath
      file.CopyTo(temppath, true) |> ignore

  if copySubDirs then
      for subdir in srcDir.GetDirectories() do
          let dstSubDir = System.IO.Path.Combine(dstPath, subdir.Name)
          directoryCopy subdir.FullName dstSubDir copySubDirs
            
let dirpath = @"D:\directory1"
let remote = @"\\remotefile\directory2"
                      
directoryCopy dirpath remote true

Comments

Popular posts from this blog

My Cloud Notes

My CSharp Notes