Use expression-bodied members in more places (dotnet/coreclr#26500)
authorStephen Toub <stoub@microsoft.com>
Wed, 4 Sep 2019 15:21:59 +0000 (11:21 -0400)
committerGitHub <noreply@github.com>
Wed, 4 Sep 2019 15:21:59 +0000 (11:21 -0400)
commit3b2173d93ac06f96219fa71abdb2fb8255d6c9d6
tree1c7a600271d1476588190f89e2a30463680c7750
parent549ea26ac10f003780f839c0687420102559db01
Use expression-bodied members in more places (dotnet/coreclr#26500)

* Fix IDE0027 (use expression body for accessors)

* Fix IDE0023 / IDE0024 (use expression body for operators)

* Apply suggestions from code review

Co-Authored-By: Adam Sitnik <adam.sitnik@gmail.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/7b9509e01b9e1f840b990c56f5b4dfce33002896
92 files changed:
src/coreclr/src/System.Private.CoreLib/src/System/Collections/ObjectModel/ReadOnlyDictionary.cs
src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/ConstructorBuilder.cs
src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/DynamicMethod.cs
src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/MethodBuilder.cs
src/coreclr/src/System.Private.CoreLib/src/System/Reflection/RtFieldInfo.cs
src/coreclr/src/System.Private.CoreLib/src/System/Runtime/CompilerServices/RuntimeHelpers.cs
src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/WindowsRuntime/CLRIReferenceImpl.cs
src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/WindowsRuntime/EventRegistrationTokenTable.cs
src/coreclr/src/System.Private.CoreLib/src/System/RuntimeHandles.cs
src/coreclr/src/System.Private.CoreLib/src/System/Threading/Overlapped.cs
src/libraries/System.Private.CoreLib/src/Internal/Threading/Tasks/AsyncCausalitySupport.cs
src/libraries/System.Private.CoreLib/src/Microsoft/Win32/SafeHandles/SafeFileHandle.Windows.cs
src/libraries/System.Private.CoreLib/src/System/AppDomain.cs
src/libraries/System.Private.CoreLib/src/System/Array.cs
src/libraries/System.Private.CoreLib/src/System/AttributeUsageAttribute.cs
src/libraries/System.Private.CoreLib/src/System/ByReference.cs
src/libraries/System.Private.CoreLib/src/System/Collections/ArrayList.cs
src/libraries/System.Private.CoreLib/src/System/Collections/DictionaryEntry.cs
src/libraries/System.Private.CoreLib/src/System/Collections/Generic/List.cs
src/libraries/System.Private.CoreLib/src/System/Collections/Hashtable.cs
src/libraries/System.Private.CoreLib/src/System/Collections/ObjectModel/Collection.cs
src/libraries/System.Private.CoreLib/src/System/Collections/ObjectModel/ReadOnlyCollection.cs
src/libraries/System.Private.CoreLib/src/System/DateTime.cs
src/libraries/System.Private.CoreLib/src/System/DateTimeOffset.cs
src/libraries/System.Private.CoreLib/src/System/Decimal.cs
src/libraries/System.Private.CoreLib/src/System/Diagnostics/Debug.cs
src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/DiagnosticCounter.cs
src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventDescriptor.cs
src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventProvider.cs
src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventSource.cs
src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/EventDataAttribute.cs
src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/EventPayload.cs
src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/EventSourceActivity.cs
src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/EventSourceOptions.cs
src/libraries/System.Private.CoreLib/src/System/Double.cs
src/libraries/System.Private.CoreLib/src/System/Exception.cs
src/libraries/System.Private.CoreLib/src/System/Globalization/CultureInfo.cs
src/libraries/System.Private.CoreLib/src/System/Globalization/IdnMapping.cs
src/libraries/System.Private.CoreLib/src/System/Globalization/SortVersion.cs
src/libraries/System.Private.CoreLib/src/System/Guid.cs
src/libraries/System.Private.CoreLib/src/System/IO/Stream.cs
src/libraries/System.Private.CoreLib/src/System/IO/StreamWriter.cs
src/libraries/System.Private.CoreLib/src/System/IO/TextWriter.cs
src/libraries/System.Private.CoreLib/src/System/IO/UnmanagedMemoryStreamWrapper.cs
src/libraries/System.Private.CoreLib/src/System/IntPtr.cs
src/libraries/System.Private.CoreLib/src/System/LocalAppContextSwitches.cs
src/libraries/System.Private.CoreLib/src/System/Nullable.cs
src/libraries/System.Private.CoreLib/src/System/Numerics/Vector.cs
src/libraries/System.Private.CoreLib/src/System/Numerics/Vector_Operations.cs
src/libraries/System.Private.CoreLib/src/System/OperationCanceledException.cs
src/libraries/System.Private.CoreLib/src/System/ReadOnlySpan.Fast.cs
src/libraries/System.Private.CoreLib/src/System/ReadOnlySpan.cs
src/libraries/System.Private.CoreLib/src/System/Reflection/Assembly.cs
src/libraries/System.Private.CoreLib/src/System/Reflection/AssemblyName.cs
src/libraries/System.Private.CoreLib/src/System/Reflection/Emit/Label.cs
src/libraries/System.Private.CoreLib/src/System/Reflection/Emit/Opcode.cs
src/libraries/System.Private.CoreLib/src/System/Reflection/ParameterModifier.cs
src/libraries/System.Private.CoreLib/src/System/Resources/ResourceManager.cs
src/libraries/System.Private.CoreLib/src/System/Resources/ResourceReader.cs
src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/StrongBox.cs
src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ArrayWithOffset.cs
src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/HandleRef.cs
src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/Arm64/Aes.PlatformNotSupported.cs
src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/Arm64/Base.PlatformNotSupported.cs
src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/Arm64/Sha1.PlatformNotSupported.cs
src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/Arm64/Sha256.PlatformNotSupported.cs
src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/Arm64/Simd.PlatformNotSupported.cs
src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector128_1.cs
src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector256_1.cs
src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Vector64_1.cs
src/libraries/System.Private.CoreLib/src/System/Runtime/MemoryFailPoint.cs
src/libraries/System.Private.CoreLib/src/System/Runtime/Serialization/OptionalFieldAttribute.cs
src/libraries/System.Private.CoreLib/src/System/Runtime/Serialization/SerializationInfo.cs
src/libraries/System.Private.CoreLib/src/System/Runtime/Versioning/TargetFrameworkAttribute.cs
src/libraries/System.Private.CoreLib/src/System/Security/SecurityElement.cs
src/libraries/System.Private.CoreLib/src/System/Single.cs
src/libraries/System.Private.CoreLib/src/System/Span.Fast.cs
src/libraries/System.Private.CoreLib/src/System/Span.cs
src/libraries/System.Private.CoreLib/src/System/String.Comparison.cs
src/libraries/System.Private.CoreLib/src/System/Text/Decoder.cs
src/libraries/System.Private.CoreLib/src/System/Text/Encoder.cs
src/libraries/System.Private.CoreLib/src/System/Text/Encoding.cs
src/libraries/System.Private.CoreLib/src/System/Text/StringBuilder.cs
src/libraries/System.Private.CoreLib/src/System/Threading/AsyncLocal.cs
src/libraries/System.Private.CoreLib/src/System/Threading/ExecutionContext.cs
src/libraries/System.Private.CoreLib/src/System/Threading/ManualResetEventSlim.cs
src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs
src/libraries/System.Private.CoreLib/src/System/Threading/Thread.cs
src/libraries/System.Private.CoreLib/src/System/Threading/WaitHandle.cs
src/libraries/System.Private.CoreLib/src/System/TimeSpan.cs
src/libraries/System.Private.CoreLib/src/System/UIntPtr.cs
src/libraries/System.Private.CoreLib/src/System/Version.cs