您可以添加
[<AbstractClass>]
定义标签:
> [<AbstractClass>]
- type Varying<'t> =
- abstract member Get : unit -> 't
- abstract member Set : 't -> unit
- abstract member AddHandler : Handler<'t> -> unit
- abstract member RemoveHandler : Handler<'t> -> unit
- member v.Add(f) = v.AddHandler(new Handler<_>(fun _ x -> f x))
- interface IEvent<'t> with
- member c.AddHandler(h) = c.AddHandler(h)
- member c.RemoveHandler(h) = c.RemoveHandler(h)
- member c.Add(f) = c.Add(f)
- ;;
type Varying<'t> =
class
abstract member AddHandler : Handler<'t> -> unit
abstract member Get : unit -> 't
abstract member RemoveHandler : Handler<'t> -> unit
abstract member Set : 't -> unit
interface IEvent<'t>
member Add : f:('t -> unit) -> unit
end