Skip to content
This repository was archived by the owner on Nov 1, 2020. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/System.Private.CoreLib/src/System/Decimal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ public static Decimal Parse(String s, NumberStyles style, IFormatProvider provid
return Number.ParseDecimal(s, style, NumberFormatInfo.GetInstance(provider));
}

public static Decimal Parse(ReadOnlySpan<char> s, NumberStyles style, IFormatProvider provider)
public static Decimal Parse(ReadOnlySpan<char> s, NumberStyles style = NumberStyles.Integer, IFormatProvider provider = null)
{
ValidateParseStyleFloatingPoint(style);
return Number.ParseDecimal(s, style, NumberFormatInfo.GetInstance(provider));
Expand Down
18 changes: 9 additions & 9 deletions src/System.Private.CoreLib/src/System/Delegate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -493,21 +493,21 @@ private bool TrySetSlot(Delegate[] a, int index, Delegate o)

// This method will combine this delegate with the passed delegate
// to form a new delegate.
protected virtual Delegate CombineImpl(Delegate follow)
protected virtual Delegate CombineImpl(Delegate d)
{
if ((Object)follow == null) // cast to object for a more efficient test
if ((Object)d == null) // cast to object for a more efficient test
return this;

// Verify that the types are the same...
if (!InternalEqualTypes(this, follow))
if (!InternalEqualTypes(this, d))
throw new ArgumentException();

if (IsDynamicDelegate() && follow.IsDynamicDelegate())
if (IsDynamicDelegate() && d.IsDynamicDelegate())
{
throw new InvalidOperationException();
}

MulticastDelegate dFollow = (MulticastDelegate)follow;
MulticastDelegate dFollow = (MulticastDelegate)d;
Delegate[] resultList;
int followCount = 1;
Delegate[] followList = dFollow.m_helperObject as Delegate[];
Expand Down Expand Up @@ -616,12 +616,12 @@ private bool EqualInvocationLists(Delegate[] a, Delegate[] b, int start, int cou
// look at the invocation list.) If this is found we remove it from
// this list and return a new delegate. If its not found a copy of the
// current list is returned.
protected virtual Delegate RemoveImpl(Delegate value)
protected virtual Delegate RemoveImpl(Delegate d)
{
// There is a special case were we are removing using a delegate as
// the value we need to check for this case
//
MulticastDelegate v = value as MulticastDelegate;
MulticastDelegate v = d as MulticastDelegate;

if (v == null)
return this;
Expand All @@ -631,15 +631,15 @@ protected virtual Delegate RemoveImpl(Delegate value)
if (invocationList == null)
{
// they are both not real Multicast
if (this.Equals(value))
if (this.Equals(d))
return null;
}
else
{
int invocationCount = (int)m_extraFunctionPointerOrData;
for (int i = invocationCount; --i >= 0;)
{
if (value.Equals(invocationList[i]))
if (d.Equals(invocationList[i]))
{
if (invocationCount == 2)
{
Expand Down
1 change: 1 addition & 0 deletions src/System.Private.CoreLib/src/System/Enum.cs
Original file line number Diff line number Diff line change
Expand Up @@ -833,6 +833,7 @@ public String ToString(String format)
return Format(enumInfo, this, format);
}

[Obsolete("The provider argument is not used. Please use ToString().")]
public String ToString(String format, IFormatProvider provider)
{
return ToString(format);
Expand Down
10 changes: 5 additions & 5 deletions src/System.Private.CoreLib/src/System/GC.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,23 +75,23 @@ public static int GetGeneration(Object obj)
/// Returns the current generation number of the target
/// of a specified <see cref="System.WeakReference"/>.
/// </summary>
/// <param name="wr">The WeakReference whose target is the object
/// <param name="wo">The WeakReference whose target is the object
/// whose generation will be returned</param>
/// <returns>The generation of the target of the WeakReference</returns>
/// <exception cref="ArgumentNullException">The target of the weak reference
/// has already been garbage collected.</exception>
public static int GetGeneration(WeakReference wr)
public static int GetGeneration(WeakReference wo)
{
// note - this throws an NRE if given a null weak reference. This isn't
// documented, but it's the behavior of Desktop and CoreCLR.
Object handleRef = RuntimeImports.RhHandleGet(wr.m_handle);
Object handleRef = RuntimeImports.RhHandleGet(wo.m_handle);
if (handleRef == null)
{
throw new ArgumentNullException(nameof(wr));
throw new ArgumentNullException(nameof(wo));
}

int result = RuntimeImports.RhGetGeneration(handleRef);
KeepAlive(wr);
KeepAlive(wo);
return result;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ public MissingFieldException(String message, Exception inner)
HResult = HResults.COR_E_MISSINGFIELD;
}

public MissingFieldException(string className, string methodName)
public MissingFieldException(string className, string fieldName)
{
ClassName = className;
MemberName = methodName;
MemberName = fieldName;
}

protected MissingFieldException(SerializationInfo info, StreamingContext context)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,23 +65,23 @@ public static Object GetObjectValue(Object obj)
return RuntimeImports.RhMemberwiseClone(obj);
}

public new static bool Equals(Object obj1, Object obj2)
public new static bool Equals(Object o1, Object o2)
{
if (obj1 == obj2)
if (o1 == o2)
return true;

if ((obj1 == null) || (obj2 == null))
if ((o1 == null) || (o2 == null))
return false;

// If it's not a value class, don't compare by value
if (!obj1.EETypePtr.IsValueType)
if (!o1.EETypePtr.IsValueType)
return false;

// Make sure they are the same type.
if (obj1.EETypePtr != obj2.EETypePtr)
if (o1.EETypePtr != o2.EETypePtr)
return false;

return RuntimeImports.RhCompareObjectContentsAndPadding(obj1, obj2);
return RuntimeImports.RhCompareObjectContentsAndPadding(o1, o2);
}

#if !FEATURE_SYNCTABLE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
namespace System
{
[StructLayout(LayoutKind.Sequential)]
public struct RuntimeArgumentHandle
public ref struct RuntimeArgumentHandle
{
}
}