TryCreate() public method

public TryCreate ( key, option, &@object ) : bool
return bool
Esempio n. 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;
	}