// TODO: Notify other objects when a metadata file is added or removed #region Overridden properties and methods new public int Add(MetadataFile val) { if (this.Project != null) { val.SetProject(this.Project); } if ( !this.Contains(val) ) { if (this.Project != null && !Project.IsLoading) { foreach (IMetadataFileObserver observer in this.Project.MetadataFileObservers) { observer.OnMetadataFileAdded(val); } } return base.Add(val); } else { return -1; } }
new public void Insert(int index, MetadataFile val) { if (this.Project != null) { val.SetProject(this.Project); } if ( this.Contains(val) ) { base.Remove(val); } base.Insert(index, val); }