public WebFormsReferenceManager(IServiceProvider serviceProvider, RegisterDirectiveCollection registerDirectives)
 {
     if (serviceProvider == null)
     {
         throw new ArgumentNullException("serviceProvider");
     }
     if (registerDirectives == null)
     {
         throw new ArgumentNullException("registerDirectives");
     }
     this._serviceProvider = serviceProvider;
     this._registerDirectives = registerDirectives;
 }
 void IDisposable.Dispose()
 {
     this._serviceProvider = null;
     this._registerDirectives = null;
 }
Exemple #3
0
 protected override void OnDeactivated()
 {
     base.OnDeactivated();
     if (this._registerDirectives != null)
     {
         this._registerDirectives.DirectiveAdded -= new DirectiveEventHandler(this.OnDirectiveAdded);
         this._registerDirectives = null;
     }
 }
Exemple #4
0
 protected override void OnActivated()
 {
     base.OnActivated();
     if (this._registerDirectives == null)
     {
         this._registerDirectives = ((WebFormsDocument) base.Document).RegisterDirectives;
         this._registerDirectives.DirectiveAdded += new DirectiveEventHandler(this.OnDirectiveAdded);
     }
 }