How do you raise a .Net event from an IronRuby class?

Posted by Brian Genisio on Stack Overflow See other posts from Stack Overflow or by Brian Genisio
Published on 2010-04-17T15:24:59Z Indexed on 2010/04/17 17:23 UTC
Read the original article Hit count: 302

Filed under:

I'm trying to figure out how to implement an event in a ruby class. Specifically, I am trying to make my class implement an interface (INotifyPropertyChanged) that includes an event (PropertyChanged). I can create my add_PropertyChanged and remove_PropertyChanged methods... but then what?

This is what my class looks like so far:

class TestClass
    include System::ComponentModel::INotifyPropertyChanged

    def add_PropertyChanged(handler)
    end

    def remove_PropertyChanged(handler)
    end
end

© Stack Overflow or respective owner

Related posts about ironruby