Example #1
0
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         TypeDescriptor.Refreshed -= new RefreshEventHandler(this.TypeDescriptor_Refreshed);
         if (this._service != null)
         {
             this._service.Clear();
             ((IDisposable)this._service).Dispose();
             this._service = (DesignModeValueProviderConnector.ValueTranslationServiceImpl)null;
         }
     }
     base.Dispose(disposing);
 }
Example #2
0
 public DesignModeValueProviderConnector(FeatureManager manager)
     : base(manager)
 {
     this.Context.Services.Publish <ValueTranslationService>((PublishServiceCallback <ValueTranslationService>)(() =>
     {
         this._service = new DesignModeValueProviderConnector.ValueTranslationServiceImpl(this);
         return((ValueTranslationService)this._service);
     }));
     this.Context.Items.Subscribe <AssemblyReferences>((SubscribeContextCallback <AssemblyReferences>)(newReferences =>
     {
         if (this._service == null)
         {
             return;
         }
         this._service.Clear();
     }));
     TypeDescriptor.Refreshed += new RefreshEventHandler(this.TypeDescriptor_Refreshed);
 }