private void CheckParameters() { if (this.parameters == null) { this.parameters = this.InitializeParameters(); this.parameters.ItemAdded += new EventHandler <EventArgsR1 <TIntermediateParameter> >(parameters_ItemAdded); this.parameters.ItemRemoved += new EventHandler <EventArgsR1 <TIntermediateParameter> >(parameters_ItemRemoved); } }
/// <summary> /// Disposes the <see cref="IntermediateParameterParentMemberBase{TParentIdentifier, TParent, TIntermediateParent, TParameter, TIntermediateParameter, TGrandParent, TIntermediateGrandParent}"/> /// </summary> /// <param name="disposing">whether to dispose the managed /// resources as well as the unmanaged resources.</param> protected override void Dispose(bool disposing) { try { if (disposing) { if (this._parameter_ParameterTypeChangedPtr != null) { this._parameter_ParameterTypeChangedPtr = null; } if (this.parameters != null) { this.parameters.ItemAdded -= new EventHandler <EventArgsR1 <TIntermediateParameter> >(parameters_ItemAdded); this.parameters.ItemRemoved -= new EventHandler <EventArgsR1 <TIntermediateParameter> >(parameters_ItemRemoved); this.parameters.Dispose(); this.parameters = null; } } } finally { base.Dispose(disposing); } }