Ejemplo n.º 1
0
 /// <summary>
 /// Tries to get a type by its name and kind.
 /// </summary>
 /// <typeparam name="T">The expected type kind.</typeparam>
 /// <param name="typeName">The name of the type.</param>
 /// <param name="type">The resolved type.</param>
 /// <returns>
 /// <c>true</c>, if a type with the name exists and is of the specified
 /// kind, <c>false</c> otherwise.
 /// </returns>
 public bool TryGetType <T>(NameString typeName, out T type)
     where T : INamedType
 {
     return(_types.TryGetType <T>(
                typeName.EnsureNotEmpty(nameof(typeName)),
                out type));
 }
Ejemplo n.º 2
0
 public bool TryGetType <T>(string typeName, out T type)
     where T : INamedType
 {
     return(_types.TryGetType <T>(typeName, out type));
 }
Ejemplo n.º 3
0
 public bool TryGetType <T>(NameString typeName, [NotNullWhen(true)] out T type)
     where T : INamedType =>
 _types.TryGetType(typeName.EnsureNotEmpty(nameof(typeName)), out type);