/// <summary> /// Get Asset's property descriptors /// </summary> private void GetAssetProperties() { if (null == m_propertyDescriptors) { m_propertyDescriptors = new PropertyDescriptorCollection(new AssetPropertyPropertyDescriptor[0]); } else { return; } //For each AssetProperty in Asset, create an AssetPropertyPropertyDescriptor. //It means that each AssetProperty will be a property of Asset for (int index = 0; index < m_asset.Size; index++) { AssetProperty assetProperty = m_asset[index]; if (null != assetProperty) { AssetPropertyPropertyDescriptor assetPropertyPropertyDescriptor = new AssetPropertyPropertyDescriptor(assetProperty); m_propertyDescriptors.Add(assetPropertyPropertyDescriptor); } } }
/// <summary> /// Compares this to another object to see if they are equivalent /// </summary> /// <param name="obj">The object to compare to this AssetPropertyPropertyDescriptor. </param> /// <returns></returns> public override bool Equals(object obj) { AssetPropertyPropertyDescriptor other = obj as AssetPropertyPropertyDescriptor; return(other != null && other.AssetProperty.Equals(m_assetProperty)); }