Age | Commit message (Collapse) | Author |
|
|
|
* Make relevant types static (mostly Interop)
* Fix a few stray semicolons
* Remove unnecessary locals
Some can be removed entirely, some can be replaced by discards.
* Remove unnecessary usings
* Move Unix-specific helper method to TimeZoneInfo.Unix.cs
* Remove duplicated code
* Remove duplicative checks
* Remove [ThreadStatic] initialization
These are all the default values and wouldn't be necessary for any static, but inline initialization for [ThreadStatic]s is particularly unuseful (and in non-default cases problematic) because the fields are only set to these values on the initializing thread.
* Fix methods whose return value is never used
* Use string.IsNullOrEmpty
* Remove unnecessary field initialization
All ctors overwrite these values.
* Address PR feedback
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
|
|
* Remove unnecessary asserts
* Make several classes static
* Use is instead of as+null check
* Use T? instead of Nullable<T>
* more static classes
* Mark locals as const
* Merge declaration and initialization of some variables
* Remove unnecessary casts
* Remove unnecessary "unsafe"s
* Simplify several lambda expressions
* Remove redundant parentheses
* Remove redundant '== true'
* Remove redundant empty lines
* Simplify boolean comparison with '== false'
* Replace if-statement with return statement
* Use while for infinite loop
* Add static to all partial static class declarations
* Use ++/-- operator instead of assignment
* Use string.IsNullOrEmpty
* Use coalesce expression
* Simplify lazy initialization
* Use coalese expression
* Join string expressions
* Use regular string literal instead of verbatim string literal
* Optimize StringBuilder.Append calls
* Remove redundant assignment
* Remove unnecessary unsafe context
* Merge processor directives
* Use String.Equals instead of String.Compare
* Use Debug.Fail instead of Debug.Assert(false
* Remove Attribute suffix
* Use predefined type
* Use compound assignment
* Use while statement to create an infinite loop
* Remove redundant base ctor call
* Avoid using catch (Exception)
* Remove empty regions
* Span comparison to null
* Avoid unnecessary boxing of value type
* Expression is always equal to 'true'
* Remove unused method
* update coalesce assignment
* fix unsafe
* fix redundant parens
* Fix whitespace errors introduced
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
|
|
* Refactor BinaryReader.ReadChars using Span (dotnet/coreclr#26325)
Avoids unsafe code and makes the code simpler
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
* Remove unnecessary parens from `return (true);` and `return (false);` (#26488)
Just a search and replace.
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
* Avoid some unnecessary initialization in DateTimeParse (#26487)
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
* Update analyzer versions (dotnet/corefx#40778)
In particular to pick up StyleCop fixes related to C# 8 and nullability.
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
|
|
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
|
|
This is just running the rule and auto-fixing everything. I undid changes that converted e.g. `while (...);` to `while (...) { }`.
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
|
|
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
|
|
* Fix IDE0065 (misplaced using)
* Fix IDE0005 (remove unnecessary usings)
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
|
|
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
|
|
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
|
|
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
|
|
* Enable nullable at the project level
* Remove `#nullable enable` from individual files
Removes `#nullable enable` from almost all .cs files in System.Private.CoreLib. I left it only in the ~30 files (out of ~1480 that had it) that are mirrored to corefx, that are built into projects by corefx that don't yet set NullableContextOptions at the project level, and that use nullable annotations; otherwise, they'd break the corefx build.
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
|
|
* Nullable: remainder of globalization
* annotate windows specific files
* add TODO-NULLABLE next to TODO suggesting comments
* fixes after merging other globalization annotations, apply feedback
* fix windows
* address feedback
* fix windows
* fixes
* apply feedback
* remove workaround
* s_Invariant?, couple of Debug.Asserts
Signed-off-by: dotnet-bot <anirudhagnihotry098@gmail.com>
|
|
* Clean up some string.Format usage
Mainly changes some string.Format usage to be SR.Format when working with resource strings. Also cleans up a few asserts that were using string.Format.
* Address PR feedback and clean up src
* Address more feedback
* Update src/System.Private.CoreLib/shared/System/Type.Enum.cs
Thanks.
Co-Authored-By: stephentoub <stoub@microsoft.com>
Signed-off-by: dotnet-bot <anirudhagnihotry098@gmail.com>
|
|
Taken from corefx commit 5956ad35864352b38c53aa8c2d1ce012c96b168d. Subsequent updates will happen via a mirroring bot.
|