Exemplo n.º 1
0
 static bool IsMarkupExtensions(ITypeDefOrRef def)
 {
     while (def != null)
     {
         if (def.Namespace == "OmniXaml" && def.Name.String == "MarkupExtension")
             return true;
         def = def.GetBaseType();
     }
     return false;
 }
Exemplo n.º 2
0
 /// <summary>
 /// Returns the base type of <paramref name="tdr"/>
 /// </summary>
 /// <param name="tdr">The type</param>
 /// <returns>The base type or <c>null</c> if there's no base type, or if
 /// we couldn't resolve a <see cref="TypeRef"/></returns>
 public static ITypeDefOrRef GetBaseType(this ITypeDefOrRef tdr)
 {
     return(tdr.GetBaseType(false));
 }
 /// <summary>
 /// Returns the base type of <paramref name="tdr"/>. Throws if we can't resolve
 /// a <see cref="TypeRef"/>.
 /// </summary>
 /// <param name="tdr">The type</param>
 /// <returns>The base type or <c>null</c> if there's no base type</returns>
 public static ITypeDefOrRef GetBaseTypeThrow(this ITypeDefOrRef tdr) => tdr.GetBaseType(true);
Exemplo n.º 4
0
 /// <summary>
 /// Returns the base type of <paramref name="tdr"/>. Throws if we can't resolve
 /// a <see cref="TypeRef"/>.
 /// </summary>
 /// <param name="tdr">The type</param>
 /// <returns>The base type or <c>null</c> if there's no base type</returns>
 public static ITypeDefOrRef GetBaseTypeThrow(this ITypeDefOrRef tdr)
 {
     return(tdr.GetBaseType(true));
 }