private IResourceIndexEntry NewResource(IResourceKey rk, MemoryStream ms, DuplicateHandling dups, bool compress) { IResourceIndexEntry rie = CurrentPackage.Find(x => rk.Equals(x)); if (rie != null) { if (dups == DuplicateHandling.reject) return null; if (dups == DuplicateHandling.replace) CurrentPackage.DeleteResource(rie); } rie = CurrentPackage.AddResource(rk, ms, false);//we do NOT want to search again... if (rie == null) return null; rie.Compressed = (ushort)(compress ? 0x5A42 : 0); IsPackageDirty = true; return rie; }
bool IEqualityComparer <IResourceKey> .Equals( IResourceKey x, IResourceKey y) { return(x.Equals(y)); }
/// <summary> /// Determines whether the specified <see cref="IResourceKey"/> instances are equal. /// </summary> /// <param name="x">The first <see cref="IResourceKey"/> to compare.</param> /// <param name="y">The second <see cref="IResourceKey"/> to compare.</param> /// <returns>true if the specified <see cref="IResourceKey"/> instances are equal; otherwise, false.</returns> public bool Equals(IResourceKey x, IResourceKey y) { return(x.Equals(y)); }
public bool Equals(IResourceKey x, IResourceKey y) { return x.Equals(y); }