reportportal / agent-net-specflow

Report Portal agent for SpecFlow
Apache License 2.0
10 stars 4 forks source link

Plugin can be non-static to expose events? #74

Open nvborisenko opened 2 years ago

nvborisenko commented 2 years ago

Now user should write something like

class Bindings
{
  [BeforeTestRun(Order = -1000)]
  public static Init()
  {
    ReportPortal.SpecFlow.Plugin.Instance.SomeEvent += ... // subscribe on the event
  }
}

Looks like RP plugin can be injected (I didn't verify it)

class Bindings
{
  public Bindings(ReportPortal.SpecFlow.Plugin rp)
  {
    rp.SomeEvent += ...
  }
}

It allows user to not specify the order of his bindings, and events may be non-static (what is good).