示例#1
0
 /// <summary>
 /// Dispose method
 /// </summary>
 /// <param name="disposing"><c>true</c> if called by <see cref="Dispose()"/></param>
 protected virtual void Dispose(bool disposing)
 {
     if (!disposing)
     {
         return;
     }
     foreach (var resource in Resources2.GetInitializedElements())
     {
         if (resource != null)
         {
             resource.Dispose();
         }
     }
     Resources.Clear();
     if (typeDefFinder != null)
     {
         typeDefFinder.Dispose();
         typeDefFinder = null;
     }
 }
示例#2
0
 /// <summary>
 /// Finds a <see cref="TypeDef"/>. Its scope (i.e., module or assembly) is ignored when
 /// looking up the type. For speed, enable <see cref="EnableTypeDefFindCache"/> if possible
 /// (read the documentation first).
 /// </summary>
 /// <param name="typeRef">The type ref</param>
 /// <returns>An existing <see cref="TypeDef"/> or <c>null</c> if it wasn't found.</returns>
 public TypeDef Find(TypeRef typeRef)
 {
     return(TypeDefFinder.Find(typeRef));
 }
示例#3
0
 /// <summary>
 /// Finds a <see cref="TypeDef"/>. For speed, enable <see cref="EnableTypeDefFindCache"/>
 /// if possible (read the documentation first).
 /// </summary>
 /// <param name="fullName">Full name of the type (no assembly information)</param>
 /// <param name="isReflectionName"><c>true</c> if it's a reflection name, and nested
 /// type names are separated by a <c>+</c> character. If <c>false</c>, nested type names
 /// are separated by a <c>/</c> character.</param>
 /// <returns>An existing <see cref="TypeDef"/> or <c>null</c> if it wasn't found.</returns>
 public TypeDef Find(string fullName, bool isReflectionName)
 {
     return(TypeDefFinder.Find(fullName, isReflectionName));
 }