TryCreate() public méthode

public TryCreate ( key, option, &@object ) : bool
Résultat bool
Exemple #1
0
	public static TObject CreateOrFail<TKey, TOption, TObject>(
		this GenericFactory<TKey, TOption, TObject> factory,
		TKey key,
		TOption option)
	{
		if (!factory.TryCreate(key, option, out var @object))
			throw new NotImplementedException($"Not Recognized or Not Registered in {nameof(GenericFactory)}");
		return @object;
	}