We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It would make certain scenarios much easier. It could work similar to the following:
public interface IOptionalResult<T> { T GetDefaultValue(); } public class OptionalResultAttribute<T> : OptionalResultAttribute, IOptionalResult<T> { public T DefaultValue{ get; set; } public T GetDefaultValue() { return DefaultValue; } } public class EmptyEnumerableOptionalResult<T> : OptionalResultAttribute, IOptionalResult<IEnumerable<T>> { public IEnumerable<T> GetDefaultValue() { return Enumerable.Empty<T>(); } } public class DTO { [EmptyEnumerableOptionalResult<string>] public IEnumerable<string> SometimesEmpty { get; set; } }
The text was updated successfully, but these errors were encountered:
abe545
No branches or pull requests
It would make certain scenarios much easier. It could work similar to the following:
The text was updated successfully, but these errors were encountered: