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); }
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); }