Added support for NOACK in the StreamReadGroup methods. by ttingen · Pull Request #1154 · StackExchange/StackExchange.Redis (original) (raw)
Note on making this change: the usual pattern when there are existing optional parameters is to make the old version non-optional throughout, i.e.
from:
Whatever SomeMethod(int a, string b, float? c = null, SomeEnum d = SomeEnum.None) {...}
to
Whatever SomeMethod(int a, string b, float? c, SomeEnum d) => SomeMethod(a, b, c, blah, d);
Whatever SomeMethod(int a, string b, float? c = null, NewArgHere yay = blah, SomeEnum d = SomeEnum.None) {...}
This minimizes problems due to ambiguous method resolution, while ensuring that old code a: compiles, and b: continues to execute without compiling. Additionally, newly compiled code will almost always pick the new method, avoiding a stack-frame (which may or may not be inlined by the JIT).