Skip to content

DanielFabian/FSharp.Dynamic

 
 

Repository files navigation

Issue Stats Issue Stats

FSharp.Dynamic NuGet Status

F# Dynamic Operator using the DLR (Portable Class Library WinRT, .NET 4.5, Silverlight 5) + .NET 4.0 Library

Install from nuget

PM> Install-Package FSharp.Dynamic

Build Status

Build Status Build status

Usage

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

Also >?> (dynImplicit), >>?>> (dynExplicit) and more.

Examples:

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

###SignalR

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

###MVC ViewBag

x.ViewBag?Name<-"George"

#Caveats:

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

Maintainer(s)

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

About

portable class library dynamic operator using the DLR

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • F# 87.8%
  • PowerShell 10.1%
  • Shell 2.1%