title: ServiceStack: Dependency Invocation
body: <p>I have the following Service which has a dependency on another class which has an event.</p>
  
  <pre><code>public class DashboardService : SecureService
  {
      private readonly DashboardAdapter _dashboardAdapter;
      private bool _isConnected;
  
      public DashboardService(DashboardAdapter dashboardAdapter)
      {
          _dashboardAdapter = dashboardAdapter;
          _dashboardAdapter.OnConnection += OnConnection;
      }
  
      public object Get(DashboardRequest request)
      {
          return new Dashboard { IsConnected = _isConnected };
      }
  
      private void OnConnection(object sender, ConnectionEventArgs e)
      {
          _isConnected = e.IsConnected;
      }
  }
  </code></pre>
  
  <p>The problem is, the event is never firing, where as if I did the following, the event would fire and set my property appropriately:</p>
  
  <pre><code>    public object Get(DashboardRequest request)
      {
          var dashboard = new DashboardAdapter();
          dashboard.OnConnected += OnConnection;
          return new Dashboard { IsConnected = _isConnected };
      }
  </code></pre>
  
  <p>I have registered my adapter in the container like so:</p>
  
  <pre><code>var dashboard = new DashboardAdapter();
  container.Register(dashboard);
  </code></pre>
  
  <p>Is there something I am missing or going about this the wrong way?</p>