/// <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)); }
public bool TryGetType <T>(string typeName, out T type) where T : INamedType { return(_types.TryGetType <T>(typeName, out type)); }
public bool TryGetType <T>(NameString typeName, [NotNullWhen(true)] out T type) where T : INamedType => _types.TryGetType(typeName.EnsureNotEmpty(nameof(typeName)), out type);