dynamitey-ci - FSharp.Interop.Dynamic 4.0.3-alpha121

dynamic operator using the DLR

PM> Install-Package FSharp.Interop.Dynamic -Version 4.0.3-alpha121 -Source https://www.myget.org/F/dynamitey-ci/api/v3/index.json

Copy to clipboard

> nuget.exe install FSharp.Interop.Dynamic -Version 4.0.3-alpha121 -Source https://www.myget.org/F/dynamitey-ci/api/v3/index.json

Copy to clipboard

> dotnet add package FSharp.Interop.Dynamic --version 4.0.3-alpha121 --source https://www.myget.org/F/dynamitey-ci/api/v3/index.json

Copy to clipboard
<PackageReference Include="FSharp.Interop.Dynamic" Version="4.0.3-alpha121" />
Copy to clipboard
source https://www.myget.org/F/dynamitey-ci/api/v3/index.json

nuget FSharp.Interop.Dynamic  ~> 4.0.3-alpha121
Copy to clipboard

> choco install FSharp.Interop.Dynamic --version 4.0.3-alpha121 --source https://www.myget.org/F/dynamitey-ci/api/v2

Copy to clipboard
Import-Module PowerShellGet
Register-PSRepository -Name "dynamitey-ci" -SourceLocation "https://www.myget.org/F/dynamitey-ci/api/v2"
Install-Module -Name "FSharp.Interop.Dynamic" -RequiredVersion "4.0.3-alpha121" -Repository "dynamitey-ci" -AllowPreRelease
Copy to clipboard

Browse the sources in this package using Visual Studio or WinDbg by configuring the following legacy symbol server URL: https://www.myget.org/F/dynamitey-ci/symbols/


FSharp.Interop.Dynamic NuGet Status

The F# Dynamic Operator, powered by the DLR. Compiled for .NET Standard 2.0, .NET Standard 1.6, .NET Framework 4.5

Install from NuGet

PM> Install-Package FSharp.Interop.Dynamic

Build Status

Platform Status
Nuget Deployment Build status
Mac/Linux/Windows Action Status
Coverage codecov Coverage Status

Bleeding edge feed on MyGet

MyGet Pre Release

Usage

target?Property, target?Property<-value, and target?Method(arg,arg2) allow you to dynamically get/set properties and call methods

Also Dyn.implicitConvert,Dyn.explicitConvert, comparison operators and more.

Examples:

System.Dynamic

open FSharp.Interop.Dynamic
let ex1 = ExpandoObject()
ex1?Test<-"Hi"//Set Dynamic Property
ex1?Test //Get Dynamic

MVC ViewBag

x.ViewBag?Name<-"George"

Dynamitey

open FSharp.Interop.Dynamic
open Dynamitey.DynamicObjects

let ComBinder = LateType("System.Dynamic.ComBinder, System.Dynamic, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")

let getPropertyNames (target:obj) =
  seq {
    yield! target.GetType().GetTypeInfo().GetProperties().Select(fun it -> it.Name)
    if (ComBinder.IsAvailable) then
      yield! ComBinder?GetDynamicDataMemberNames(target)
  }

Python Interop

Translated from this example C# code: https://github.com/SciSharp/pythonnet#example

open Python.Runtime
open FSharp.Interop.Dynamic
open FSharp.Interop.Dynamic.Operators

do
  use __ = Py.GIL()

  let np = Py.Import("numpy")
  np?cos(np?pi ?*? 2)
  |> printfn "%O"

  let sin: obj -> obj = np?sin
  sin 5 |> printfn "%O"

  np?cos 5 ?+? sin 5
  |> printfn "%O"

  let a: obj = np?array([| 1.; 2.; 3. |])
  printfn "%O" a?dtype

  let b: obj = np?array([| 6.; 5.; 4. |], Dyn.namedArg "dtype" np?int32)
  printfn "%O" b?dtype

  a ?*? b
  |> printfn "%O"

Output

1.0
-0.9589242746631385
-0.6752620891999122
float64
int32
[ 6. 10. 12.]

SignalR (.net framework version)

open FSharp.Interop.Dynamic
type MyHub =
    inherit Hub
    member x.Send (name : string) (message : string) =
        base.Clients.All?addMessage(name,message) |> ignore

Caveats:

The DLR is incompatible with interface explicit members, so are these operators, just like C#'s dynamic keyword.

.NET Core 2.0.0 to 2.0.2 had a major bug in the C# dynamic keyword with nested classes inside of generic classes.. You will know it from a substring argument length exception. .NET Framework 4.0+, .NET Core 1.x and .NET Core 2.0.3+ and later are unaffected.

Maintainer(s)

The default maintainer account for projects under "fsprojects" is @fsprojectsgit - F# Community Project Incubation Space (repo management)

  • .NETFramework 4.0
    • Dynamitey (>= 2.0.6-beta111)
    • FSharp.Core (>= 4.1.18)
    • System.ValueTuple (>= 4.4.0)
  • Portable Class Library (.NETFramework 4.5, Silverlight 5.0, Windows 8.0)
    • Dynamitey (>= 2.0.6-beta111)
    • FSharp.Core (>= 4.1.18)
  • .NETStandard 1.6
    • Dynamitey (>= 2.0.6-beta111)
    • FSharp.Core (>= 4.1.18)
    • Microsoft.CSharp (>= 4.3.0)
    • NETStandard.Library (>= 1.6.1)
    • System.ValueTuple (>= 4.4.0)
  • .NETFramework 4.0: 4.0.0.0
  • Portable Class Library (.NETFramework 4.5, Silverlight 5.0, Windows 8.0): Profile47: 0.0.0.0
  • .NETStandard 1.6: 1.6.0.0

                        
Assembly Assembly hash Match
/lib/netstandard1.6/fsharp.interop.dynamic.dll 4f2fc770a978485fb542e671fa3c7603FFFFFFFF
/lib/portable-net45+sl5+win8/fsharp.interop.dynamic.dll aee9b5b3960a4de3b13a5ef9c6840ecbFFFFFFFF
/lib/net40/fsharp.interop.dynamic.dll cbea8f0fb443449794547a9553bca122FFFFFFFF

Owners

Jay Tuley

Authors

Jay Tuley

Project URL

https://github.com/fsprojects/FSharp.Interop.Dynamic

License

Apache-2.0

Tags

fsharp dynamic dlr

Info

5864 total downloads
80 downloads for version 4.0.3-alpha121
Download (24.62 KB)
Download legacy symbols (33.24 KB)
Found on the current feed only

Package history

Version Size Last updated Downloads Mirrored?
5.0.1.269 53.33 KB Thu, 03 Oct 2019 05:01:29 GMT 74
5.0.1.268 53.33 KB Thu, 03 Oct 2019 04:52:08 GMT 80
5.0.1-alpha272 50.72 KB Thu, 03 Oct 2019 05:21:08 GMT 82
5.0.1-alpha271 50.72 KB Thu, 03 Oct 2019 05:16:38 GMT 66
5.0.1-alpha270 50.5 KB Thu, 03 Oct 2019 05:12:01 GMT 77
5.0.1-alpha267 50.49 KB Thu, 03 Oct 2019 04:47:39 GMT 70
5.0.0.251 53.15 KB Wed, 11 Sep 2019 21:56:11 GMT 75
5.0.0.250 53.16 KB Wed, 11 Sep 2019 21:48:31 GMT 85
5.0.0-alpha266 50.48 KB Thu, 03 Oct 2019 04:42:43 GMT 73
5.0.0-alpha265 50.48 KB Thu, 03 Oct 2019 04:28:27 GMT 80
5.0.0-alpha264 50.49 KB Thu, 03 Oct 2019 04:12:24 GMT 90
5.0.0-alpha262 50.49 KB Thu, 03 Oct 2019 03:58:39 GMT 74
5.0.0-alpha257 50.29 KB Wed, 02 Oct 2019 21:54:33 GMT 81
5.0.0-alpha256 50.29 KB Wed, 02 Oct 2019 21:19:46 GMT 92
5.0.0-alpha255 50.29 KB Wed, 02 Oct 2019 21:15:22 GMT 71
5.0.0-alpha254 50.29 KB Wed, 02 Oct 2019 21:10:59 GMT 75
5.0.0-alpha253 50.3 KB Wed, 02 Oct 2019 21:00:39 GMT 70
5.0.0-alpha252 50.31 KB Wed, 02 Oct 2019 20:36:41 GMT 77
5.0.0-alpha249 50.31 KB Wed, 11 Sep 2019 21:28:01 GMT 80
5.0.0-alpha248 46.89 KB Wed, 11 Sep 2019 21:15:55 GMT 79
5.0.0-alpha247 46.89 KB Mon, 03 Dec 2018 17:02:11 GMT 75
5.0.0-alpha243 46.98 KB Thu, 07 Jun 2018 03:07:41 GMT 80
5.0.0-alpha241 46.99 KB Thu, 07 Jun 2018 02:51:45 GMT 81
5.0.0-alpha239 46.99 KB Thu, 07 Jun 2018 02:40:17 GMT 72
5.0.0-alpha238 45.19 KB Thu, 24 May 2018 23:20:30 GMT 80
5.0.0-alpha236 45.19 KB Thu, 24 May 2018 23:12:54 GMT 72
5.0.0-alpha234 45.19 KB Thu, 24 May 2018 23:06:47 GMT 74
5.0.0-alpha232 45.19 KB Thu, 24 May 2018 22:49:43 GMT 79
5.0.0-alpha231 45.19 KB Thu, 24 May 2018 22:39:30 GMT 83
5.0.0-alpha229 45.19 KB Thu, 24 May 2018 22:27:15 GMT 71
5.0.0-alpha227 45.19 KB Thu, 24 May 2018 22:09:51 GMT 83
5.0.0-alpha219 45.19 KB Thu, 24 May 2018 17:03:40 GMT 67
5.0.0-alpha217 45.19 KB Thu, 24 May 2018 16:37:24 GMT 77
5.0.0-alpha215 45.13 KB Thu, 24 May 2018 16:20:33 GMT 76
5.0.0-alpha213 45.04 KB Thu, 24 May 2018 14:15:14 GMT 71
5.0.0-alpha211 42.61 KB Wed, 23 May 2018 20:56:22 GMT 79
5.0.0-alpha209 41.6 KB Wed, 23 May 2018 20:23:28 GMT 74
5.0.0-alpha207 41.62 KB Wed, 23 May 2018 17:22:28 GMT 73
5.0.0-alpha205 37.36 KB Wed, 23 May 2018 14:14:55 GMT 78
5.0.0-alpha203 37.34 KB Wed, 23 May 2018 05:51:09 GMT 75
5.0.0-alpha199 37.34 KB Wed, 23 May 2018 05:31:12 GMT 75
5.0.0-alpha198 37.35 KB Wed, 23 May 2018 05:28:28 GMT 73
5.0.0-alpha195 37.34 KB Wed, 23 May 2018 05:17:50 GMT 76
5.0.0-alpha193 37.34 KB Wed, 23 May 2018 05:12:28 GMT 86
5.0.0-alpha191 37.35 KB Wed, 23 May 2018 05:06:56 GMT 76
5.0.0-alpha189 37.34 KB Wed, 23 May 2018 05:02:55 GMT 74
5.0.0-alpha187 37.34 KB Wed, 23 May 2018 04:53:05 GMT 71
5.0.0-alpha185 37.34 KB Wed, 23 May 2018 04:40:25 GMT 67
5.0.0-alpha183 37.34 KB Wed, 23 May 2018 04:34:24 GMT 75
5.0.0-alpha181 37.34 KB Wed, 23 May 2018 04:18:38 GMT 70
5.0.0-alpha179 37.34 KB Wed, 23 May 2018 04:05:03 GMT 69
5.0.0-alpha177 37.34 KB Wed, 23 May 2018 03:57:55 GMT 71
5.0.0-alpha175 37.34 KB Wed, 23 May 2018 03:45:40 GMT 75
5.0.0-alpha173 37.34 KB Wed, 23 May 2018 03:41:17 GMT 73
5.0.0-alpha171 37.35 KB Wed, 23 May 2018 03:26:35 GMT 81
5.0.0-alpha169 37.34 KB Wed, 23 May 2018 03:09:43 GMT 72
5.0.0-alpha167 37.34 KB Wed, 23 May 2018 03:03:04 GMT 76
5.0.0-alpha165 37.34 KB Wed, 23 May 2018 02:58:51 GMT 82
5.0.0-alpha163 37.34 KB Wed, 23 May 2018 02:44:47 GMT 81
5.0.0-alpha161 37.34 KB Wed, 23 May 2018 02:12:49 GMT 65
5.0.0-alpha159 37.34 KB Wed, 23 May 2018 01:52:48 GMT 69
5.0.0-alpha157 37.34 KB Wed, 23 May 2018 01:47:48 GMT 79
5.0.0-alpha155 37.34 KB Tue, 22 May 2018 15:22:51 GMT 75
5.0.0-alpha153 25.53 KB Tue, 22 May 2018 13:08:48 GMT 80
5.0.0-alpha151 25.54 KB Tue, 22 May 2018 04:08:51 GMT 77
4.1.0-alpha135 38.15 KB Wed, 09 May 2018 04:19:14 GMT 64
4.0.4-alpha134 24.59 KB Sun, 29 Apr 2018 21:51:11 GMT 69
4.0.3.131 26.8 KB Thu, 05 Apr 2018 06:26:00 GMT 65
4.0.3.130 26.81 KB Thu, 05 Apr 2018 06:22:31 GMT 81
4.0.3-beta97 24.17 KB Sat, 19 Aug 2017 02:43:36 GMT 74
4.0.3-beta95 24.17 KB Sat, 19 Aug 2017 02:38:38 GMT 65
4.0.3-alpha99 24.16 KB Tue, 19 Dec 2017 19:29:23 GMT 70
4.0.3-alpha98 24.17 KB Tue, 19 Dec 2017 19:25:13 GMT 66
4.0.3-alpha94 24.18 KB Sat, 19 Aug 2017 02:30:01 GMT 74
4.0.3-alpha83 24.23 KB Thu, 17 Aug 2017 21:16:27 GMT 79
4.0.3-alpha133 24.59 KB Thu, 05 Apr 2018 06:27:42 GMT 69
4.0.3-alpha126 24.59 KB Thu, 05 Apr 2018 05:31:13 GMT 69
4.0.3-alpha121 24.62 KB Tue, 20 Mar 2018 06:20:21 GMT 80