NSubstitute
                                
                                
                                
                                    NSubstitute copied to clipboard
                            
                            
                            
                        NSubstitute future improvements
Let's collect improvements we could/should make in our next major versions and are not allowed to apply now because of SemVer. Issue might be updated.
- 
[ ] Make
RouteActiona read-only struct to optimize performance - 
[ ] Return array instead of
IList, so we can optimize contracthttps://github.com/nsubstitute/NSubstitute/blob/deea0eaf8e2a193d3a1ccccd308a3a53460e786a/src/NSubstitute/Core/IThreadLocalContext.cs#L27
 - 
[ ] Refactor
ICalland replaceGetmethods with properties https://github.com/nsubstitute/NSubstitute/blob/a2462d5953e6099dde26d5f0a4d0045898210aa7/src/NSubstitute/Core/ICall.cs#L8-L19 - 
[ ] Make
NSubstitute.Core.Argumenta read-only struct, as it's a thin wrapper on top ofICalland index. - 
[ ] Rework
IAutoValueProviderinterface to:- Have only 
bool TryCreateValue(Type type, out object result)method - Avoid cyclic dependency from provider to list of all providers
 - Expose single aggregate provider from factory rather than an array of providers.
 
 - Have only 
 - 
[ ] Make the
ReflectionExtensionshelper internal and removeOrNullsuffix as we use nullability for that. - 
[ ] Normalize
Extension-like classes, as at the moment we have a plenty of them and it's a bit hard to navigate through them. - 
[ ] Add
classconstraint to all the DSL extension methods receiving substitute. Example:ReceivedExtensions.Received() - 
[ ] Review
IPendingSpecificationinterface and potentially change it toTrypattern. - 
[x] Convert to a
recordonce we drop .NET Standard 1.3 support:ArgumentMatchInfoQuantitydescendants
 - 
[ ] Do not expose internal classes from
Corenamespace, but instead expose interfaces. - 
[ ] Make
SubsitutionContextconstructor private, so it can be instantiated via container only. - 
[ ] Change return type of
ArgumentMatchInfo.DescribeNonMatchto return null if cannot describe instead of an empty string.