public CremaApplication() { this.service = this.GetService(typeof(CremaService)) as CremaService; this.Dispatcher = new Dispatcher(this); this.service.Opening += Service_Opening; this.service.Opened += Service_Opened; this.service.Closing += Service_Closing; this.service.Closed += Service_Closed; AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException; }
public override IEnumerable <Tuple <System.Type, object> > GetParts() { var service = new CremaService(this); foreach (var item in base.GetParts()) { yield return(item); } yield return(new Tuple <Type, object>(typeof(CremaApplication), this)); yield return(new Tuple <Type, object>(typeof(CremaService), service)); yield return(new Tuple <Type, object>(typeof(ICremaService), service)); }