Skip to content

Telplin cannot capture events correctly #69

@nojaf

Description

@nojaf

Issue created from telplin-online

Implementation

module Foo

open System.Collections.Generic

type MyClassWithCLIEvent() =

    let event1 = new Event<string>()

    [<CLIEvent>]
    member this.Event1 = event1.Publish

    member this.TestEvent(arg) =
        event1.Trigger(arg)

let classWithEvent = new MyClassWithCLIEvent()
classWithEvent.Event1.Add(fun arg ->
        printfn "Event1 occurred! Object data: %s" arg)

classWithEvent.TestEvent("Hello World!")

System.Console.ReadLine() |> ignore

Signature

module Foo

open System.Collections.Generic

type MyClassWithCLIEvent =
    new: unit -> MyClassWithCLIEvent

    [<CLIEvent>]
    member Event1: (Handler<string> -> unit)

    member TestEvent: arg: string -> unit

val classWithEvent: MyClassWithCLIEvent

Problem description

image

Extra information

  • The proposed signature has problems.
  • I or my company would be willing to help fix this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions