Exemplo n.º 1
0
 protected override object CreateInstance(CreationContext context, ConstructorCandidate constructor, object[] arguments)
 {
     object component = base.CreateInstance(context, constructor, arguments);
     if (arguments != null)
     {
         IWatchDogService watchDogService = arguments.FirstOrDefault(arg => arg is IWatchDogService) as IWatchDogService;
         if (watchDogService != null)
         {
             watchDogService.WatchingType = component.GetType();
         }
     }
     return component;
 }
Exemplo n.º 2
0
 public WatchedClassViaConstructor(IWatchDogService watchDogService)
 {
     this.watchDogService = watchDogService;
 }