System.Reflection.Emit.AssemblyBuilder.Equals C# (CSharp) Method

Equals() public method

public Equals ( object obj ) : bool
obj object
return bool
        public override bool Equals(object obj) { throw null; }
        public System.Reflection.Emit.ModuleBuilder GetDynamicModule(string name) { throw null; }

Usage Example

Esempio n. 1
0
		private void AddCacheMappings(AssemblyBuilder builder)
		{
			Dictionary<CacheKey, string> mappings;

			using (Lock.ForReading())
			{
				mappings = new Dictionary<CacheKey, string>();
				foreach (var cacheEntry in typeCache)
				{
					// NOTE: using == returns invalid results.
					// we need to use Equals here for it to work properly
					if(builder.Equals(cacheEntry.Value.Assembly))
					{
						mappings.Add(cacheEntry.Key, cacheEntry.Value.FullName);
					}
				}
			}

			CacheMappingsAttribute.ApplyTo(builder, mappings);
		}