private object this[int index] { get { return(this.properties[index].Value); } set { StoragePropertyValue storagePropertyValue = this.properties[index].Value as StoragePropertyValue; if (storagePropertyValue != null) { storagePropertyValue.DisposeStorage(); } this.properties[index].Value = value; } }
internal void Dispose() { foreach (TnefPropertyBag.PropertyData propertyData in this.properties) { StoragePropertyValue storagePropertyValue = propertyData.Value as StoragePropertyValue; if (storagePropertyValue != null) { storagePropertyValue.DisposeStorage(); } } if (this.newProperties != null) { foreach (KeyValuePair <TnefPropertyTag, object> keyValuePair in this.newProperties) { StoragePropertyValue storagePropertyValue2 = keyValuePair.Value as StoragePropertyValue; if (storagePropertyValue2 != null) { storagePropertyValue2.DisposeStorage(); } } this.newProperties = null; } this.newNamedProperties = null; }