DynamicObj 3.0.0
See the version list below for details.
dotnet add package DynamicObj --version 3.0.0
NuGet\Install-Package DynamicObj -Version 3.0.0
<PackageReference Include="DynamicObj" Version="3.0.0" />
<PackageVersion Include="DynamicObj" Version="3.0.0" />
<PackageReference Include="DynamicObj" />
paket add DynamicObj --version 3.0.0
#r "nuget: DynamicObj, 3.0.0"
#:package DynamicObj@3.0.0
#addin nuget:?package=DynamicObj&version=3.0.0
#tool nuget:?package=DynamicObj&version=3.0.0
DynamicObj
F# library supporting Dynamic Objects including inheritance in functional style.
The library is compatible with Fable, allowing transpilation to javascript and python.
Usage example
Get started
#r "nuget: DynamicObj"
#r "nuget: Fable.Core" // Needed if working with Fable
open DynamicObj
open Fable.Core // Needed if working with Fable
[<AttachMembers>] // AttachMembers needed if working with Fable
type Person(id : int, name : string) =
// Include this in your class
inherit DynamicObj()
let mutable name = name
// Mutable property
member this.Name
with get() = name
and set(value) = name <- value
// Immutable property
member this.ID
with get() = id
let p = Person(1337,"John")
Accessing static and dynamic properties
// Access Static Properties
p.GetValue("Name") // val it: obj = "John"
p.GetValue("ID") // val it: obj = 1337
// Overwrite mutable static property
p.SetValue("Name","Jane") // val it: unit = ()
// Overwrite immutable static property
p.SetValue("ID",1234) // System.Exception: Cannot set value for static, immutable property "ID"
// Set dynamic property
p.SetValue("Address","FunStreet") // val it: unit = ()
// Access Properties
p.GetValue("Name") // val it: obj = "Jane"
p.Name // val it: string = "Jane"
p.GetValue("ID") // val it: obj = 1337
p.ID // val it: int = 1337
p.GetValue("Address") // val it: obj = "FunStreet"
Practical helpers
DynObj.format p
|> printfn "%s"
→
Name: Jane
ID: 1337
?Address: FunStreet
Development
Requirements
- nodejs and npm
- verify with
node --version(Tested with v18.16.1) - verify with
npm --version(Tested with v9.2.0)
- verify with
- .NET SDK
- verify with
dotnet --version(Tested with 7.0.306)
- verify with
- Python
- verify with
py --version(Tested with 3.12.2, known to work only for >=3.11)
- verify with
Local Setup
On windows you can use the setup.cmd to run the following steps automatically!
Setup dotnet tools
dotnet tool restoreInstall NPM dependencies
npm installSetup python environment
py -m venv .venvInstall Poetry and dependencies
.\.venv\Scripts\python.exe -m pip install -U pip setuptools.\.venv\Scripts\python.exe -m pip install poetry.\.venv\Scripts\python.exe -m poetry install --no-root
Verify correct setup with ./build.cmd runtests ✨
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Fable.Core (>= 4.3.0)
- FSharp.Core (>= 6.0.7)
- Newtonsoft.Json (>= 13.0.1)
NuGet packages (14)
Showing the top 5 NuGet packages that depend on DynamicObj:
| Package | Downloads |
|---|---|
|
Plotly.NET
plotly.js charts in .NET programming languages 📈🚀. |
|
|
ARCtrl.CWL
ARC helper functions for Common workflow language. |
|
|
BioFSharp
Open source bioinformatics and computational biology toolbox written in F#. |
|
|
ARCtrl.ROCrate
A data model of the ARC concept via it's RO Crate profile |
|
|
Cyjs.NET
.NET interface for Cytoscape.js written in F# |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 7.1.0 | 5,683 | 10/31/2025 |
| 7.0.1 | 11,427 | 2/17/2025 |
| 7.0.0 | 461 | 1/28/2025 |
| 6.0.0 | 338 | 1/27/2025 |
| 5.0.0 | 472 | 12/17/2024 |
| 4.0.3 | 9,114 | 10/16/2024 |
| 4.0.2 | 222 | 10/15/2024 |
| 4.0.1 | 336 | 10/15/2024 |
| 4.0.0 | 1,084 | 9/26/2024 |
| 3.1.0 | 3,708 | 9/2/2024 |
| 3.0.0 | 543 | 8/23/2024 |
| 2.0.0 | 945,213 | 5/31/2022 |
| 1.0.1 | 40,449 | 1/13/2022 |
| 1.0.0 | 659 | 1/13/2022 |
| 0.2.1 | 915 | 10/13/2021 |
| 0.2.0 | 25,351 | 9/10/2021 |
| 0.1.0 | 606 | 8/18/2021 |
| 0.0.3 | 25,387 | 4/16/2021 |
| 0.0.2 | 586 | 4/16/2021 |
| 0.0.1 | 1,164 | 1/27/2021 |
- Make project fable-compatible
- Rework project structure by splitting into DynamicObj and DynamicObj.Immutable
- Add a bunch of tests
- Backwards incompatible because of renaming and removing some members