Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release/5.0] Update dependencies from dotnet/arcade #3635

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
20 changes: 10 additions & 10 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -103,25 +103,25 @@
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="5.0.0-beta.20506.7">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="5.0.0-beta.20510.1">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>ee39cd1573dbb8011f343e1037af51d4fc00a747</Sha>
<Sha>6813f5aa511a7a4498fa217a54219b5704a01f83</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.CodeAnalysis" Version="5.0.0-beta.20506.7">
<Dependency Name="Microsoft.DotNet.CodeAnalysis" Version="5.0.0-beta.20510.1">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>ee39cd1573dbb8011f343e1037af51d4fc00a747</Sha>
<Sha>6813f5aa511a7a4498fa217a54219b5704a01f83</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="5.0.0-beta.20506.7">
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="5.0.0-beta.20510.1">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>ee39cd1573dbb8011f343e1037af51d4fc00a747</Sha>
<Sha>6813f5aa511a7a4498fa217a54219b5704a01f83</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.ApiCompat" Version="5.0.0-beta.20506.7">
<Dependency Name="Microsoft.DotNet.ApiCompat" Version="5.0.0-beta.20510.1">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>ee39cd1573dbb8011f343e1037af51d4fc00a747</Sha>
<Sha>6813f5aa511a7a4498fa217a54219b5704a01f83</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.GenAPI" Version="5.0.0-beta.20506.7">
<Dependency Name="Microsoft.DotNet.GenAPI" Version="5.0.0-beta.20510.1">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>ee39cd1573dbb8011f343e1037af51d4fc00a747</Sha>
<Sha>6813f5aa511a7a4498fa217a54219b5704a01f83</Sha>
</Dependency>
</ToolsetDependencies>
</Dependencies>
6 changes: 3 additions & 3 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@
</PropertyGroup>
<!-- Packages that come from https://github.com/dotnet/arcade -->
<PropertyGroup>
<MicrosoftDotNetApiCompatVersion>5.0.0-beta.20506.7</MicrosoftDotNetApiCompatVersion>
<MicrosoftDotNetCodeAnalysisPackageVersion>5.0.0-beta.20506.7</MicrosoftDotNetCodeAnalysisPackageVersion>
<MicrosoftDotNetGenAPIVersion>5.0.0-beta.20506.7</MicrosoftDotNetGenAPIVersion>
<MicrosoftDotNetApiCompatVersion>5.0.0-beta.20510.1</MicrosoftDotNetApiCompatVersion>
<MicrosoftDotNetCodeAnalysisPackageVersion>5.0.0-beta.20510.1</MicrosoftDotNetCodeAnalysisPackageVersion>
<MicrosoftDotNetGenAPIVersion>5.0.0-beta.20510.1</MicrosoftDotNetGenAPIVersion>
</PropertyGroup>
<!-- Packages that come from https://github.com/dotnet/corefxlab -->
<PropertyGroup>
Expand Down
8 changes: 4 additions & 4 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"tools": {
"dotnet": "5.0.100-rc.1.20452.10",
"dotnet": "5.0.100-rc.2.20479.15",
"runtimes": {
"dotnet": [
"2.1.7",
Expand All @@ -12,11 +12,11 @@
}
},
"msbuild-sdks": {
"Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.20506.7",
"Microsoft.DotNet.Helix.Sdk": "5.0.0-beta.20506.7"
"Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.20510.1",
"Microsoft.DotNet.Helix.Sdk": "5.0.0-beta.20510.1"
},
"sdk": {
"version": "5.0.100-rc.1.20452.10"
"version": "5.0.100-rc.2.20479.15"
},
"native-tools": {
"strawberry-perl": "5.28.1.1-1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,6 @@ internal static Rect GetBoundsHelper(Pen pen, Matrix worldMatrix, Point center,
{
Rect rect;

Debug.Assert(worldMatrix != null);
Debug.Assert(geometryMatrix != null);

if ( (pen == null || pen.DoesNotContainGaps) &&
worldMatrix.IsIdentity && geometryMatrix.IsIdentity)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ private static long ComputeEstimatedSize(IntPtr bitmapObject)
{
long estimatedSize = 0;

if (bitmapObject != null && bitmapObject != IntPtr.Zero)
if (bitmapObject != IntPtr.Zero)
{
IntPtr wicBitmap;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,6 @@ BitmapPalette palette
// Sanitize inputs
//

if (pixelFormat == null)
{
// Backwards Compat:
//
// The original code would null-ref, but we choose to raise a
// better exception.
throw new ArgumentNullException("pixelFormat");
}

if (pixelFormat.Palettized && palette == null)
{
throw new InvalidOperationException(SR.Get(SRID.Image_IndexedPixelFormatRequiresPalette));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,6 @@ internal override Rect GetBoundsInternal(Pen pen, Matrix worldMatrix, double tol
internal static Rect GetBoundsHelper(Pen pen, Matrix worldMatrix, Point pt1, Point pt2,
Matrix geometryMatrix, double tolerance, ToleranceType type)
{
Debug.Assert(worldMatrix != null);
Debug.Assert(geometryMatrix != null);

if (pen == null && worldMatrix.IsIdentity && geometryMatrix.IsIdentity)
{
return new Rect(pt1, pt2);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,6 @@ internal static Rect GetBoundsHelper(Pen pen, Matrix worldMatrix, Rect rect, dou
{
Rect boundingRect;

Debug.Assert(worldMatrix != null);
Debug.Assert(geometryMatrix != null);

if (rect.IsEmpty)
{
boundingRect = Rect.Empty;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,13 @@ public bool TryTransform(Point3D inPoint, out Point result)
result = new Point();

// project the point
if (_projectionTransform != null)
{ Point3D projectedPoint = _projectionTransform.Transform(inPoint);

if (_transformBetween2D != null)
{
result = _transformBetween2D.Transform(new Point(projectedPoint.X, projectedPoint.Y));
success = true;
}
}
Point3D projectedPoint = _projectionTransform.Transform(inPoint);

if (_transformBetween2D != null)
{
result = _transformBetween2D.Transform(new Point(projectedPoint.X, projectedPoint.Y));
success = true;
}

return success;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,9 @@ internal static IntPtr MarshalPropVariant(Object obj)

// allocate an unmanaged PROPVARIANT to return
pNative = Marshal.AllocCoTaskMem(Marshal.SizeOf(typeof(PROPVARIANT)));
// Per MSDN, AllocCoTaskMem never returns null. One can't be too careful, though.
Invariant.Assert(pNative != null);

// Per MSDN, AllocCoTaskMem never returns null: check for IntPtr.Zero instead.
Invariant.Assert(pNative != IntPtr.Zero);

// marshal the managed PROPVARIANT into the unmanaged block and return it
Marshal.StructureToPtr(v, pNative, false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,7 @@ IntPtr unmanagedBuffer
}
catch (Exception)
{
if (unmanagedBuffer != null)
if (unmanagedBuffer != IntPtr.Zero)
{
FreeUnmanagedPrintDlgExStruct(unmanagedBuffer);
unmanagedBuffer = IntPtr.Zero;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ internal void FormatCellFinite(Size subpageSize, IntPtr breakRecordIn, bool isEm
int dvrTopSpace;
PTS.FSPAP fspap;

if(CellParagraph.StructuralCache.DtrList != null && breakRecordIn != null)
if(CellParagraph.StructuralCache.DtrList != null && breakRecordIn != IntPtr.Zero)
{
CellParagraph.InvalidateStructure(TextContainerHelper.GetCPFromElement(CellParagraph.StructuralCache.TextContainer, CellParagraph.Element, ElementEdge.BeforeStart));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public void Dispose()
marshaler?.Dispose();
}
}
if (_array != null)
if (_array != IntPtr.Zero)
{
Marshal.FreeCoTaskMem(_array);
}
Expand Down Expand Up @@ -445,7 +445,7 @@ public void Dispose()
Marshaler<T>.DisposeMarshaler(marshaler);
}
}
if (_array != null)
if (_array != IntPtr.Zero)
{
Marshal.FreeCoTaskMem(_array);
}
Expand Down Expand Up @@ -627,7 +627,7 @@ public void Dispose()
DisposeMarshaler(marshaler);
}
}
if (_array != null)
if (_array != IntPtr.Zero)
{
Marshal.FreeCoTaskMem(_array);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ public sealed class DateTimeAutomationPeer : AutomationPeer, IGridItemProvider,
internal DateTimeAutomationPeer(DateTime date, Calendar owningCalendar, CalendarMode buttonMode)
: base()
{
if (date == null)
{
throw new ArgumentNullException("date");
}
if (owningCalendar == null)
{
throw new ArgumentNullException("owningCalendar");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1380,23 +1380,20 @@ private void ProcessEndKey(bool shift)
{
case CalendarMode.Month:
{
if (this.DisplayDate != null)
{
DateTime? selectedDate = new DateTime(this.DisplayDateInternal.Year, this.DisplayDateInternal.Month, 1);

if (DateTimeHelper.CompareYearMonth(DateTime.MaxValue, selectedDate.Value) > 0)
{
// since DisplayDate is not equal to DateTime.MaxValue we are sure selectedDate is not null
selectedDate = DateTimeHelper.AddMonths(selectedDate.Value, 1).Value;
selectedDate = DateTimeHelper.AddDays(selectedDate.Value, -1).Value;
}
else
{
selectedDate = DateTime.MaxValue;
}
DateTime? selectedDate = new DateTime(this.DisplayDateInternal.Year, this.DisplayDateInternal.Month, 1);

ProcessSelection(shift, selectedDate);
if (DateTimeHelper.CompareYearMonth(DateTime.MaxValue, selectedDate.Value) > 0)
{
// since DisplayDate is not equal to DateTime.MaxValue we are sure selectedDate is not null
selectedDate = DateTimeHelper.AddMonths(selectedDate.Value, 1).Value;
selectedDate = DateTimeHelper.AddDays(selectedDate.Value, -1).Value;
}
else
{
selectedDate = DateTime.MaxValue;
}

ProcessSelection(shift, selectedDate);

break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -349,9 +349,6 @@ private bool IsValidThread()
/// <returns></returns>
private CalendarDateRange GetContainingDateRange(DateTime date)
{
if (date == null)
return null;

for (int i = 0; i < Count; i++)
{
if (DateTimeHelper.InRange(date, this[i]))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ internal void NotifyPropertyChanged(DependencyObject d, string propertyName, Dep
{
column.RefreshCellContent(this, propertyName);
}
else if (e != null && e.Property != null)
else if (e.Property != null)
{
column.RefreshCellContent(this, e.Property.Name);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,6 @@ private void Cell_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
CalendarKeyboardHelper.GetMetaKeyState(out ctrl, out shift);

DateTime selectedDate = (DateTime)b.DataContext;
Debug.Assert(selectedDate != null);

switch (this.Owner.SelectionMode)
{
Expand Down Expand Up @@ -1303,7 +1302,6 @@ private void SetYearModeMonthButtons()

if (this.Owner != null)
{
Debug.Assert(this.Owner.DisplayDateInternal != null);
childButton.HasSelectedDays = (DateTimeHelper.CompareYearMonth(day, this.Owner.DisplayDateInternal) == 0);

if (DateTimeHelper.CompareYearMonth(day, this.Owner.DisplayDateStartInternal) < 0 || DateTimeHelper.CompareYearMonth(day, this.Owner.DisplayDateEndInternal) > 0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ protected override void SetItem(int index, DateTime item)
}
else
{
if (item != null && DateTime.Compare(this[index], item) != 0 && Calendar.IsValidDateSelection(this._owner, item))
if (DateTime.Compare(this[index], item) != 0 && Calendar.IsValidDateSelection(this._owner, item))
{
removedItems.Add(this[index]);
base.SetItem(index, item);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,6 @@ internal override void OnPropertyInvalidation(DependencyObject d, DependencyProp
{
if (d == null)
throw new ArgumentNullException("d");
if (args == null)
throw new ArgumentNullException("args");

DependencyProperty dp = args.Property;
if (dp == null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4589,7 +4589,8 @@ protected sealed override void ArrangeCore(Rect finalRect)
// First, get clipped, transformed, unrounded size.
if (useLayoutRounding)
{
if (ltd != null && ltd.TransformedUnroundedDS != null)
// 'transformUnroundedDS' is a non-nullable value type and can never be null.
if (ltd != null)
{
transformedUnroundedDS = ltd.TransformedUnroundedDS;
transformedUnroundedDS.Width = Math.Max(0, transformedUnroundedDS.Width - marginWidth);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2797,7 +2797,7 @@ public static MONITORINFO GetMonitorInfo(IntPtr hMonitor)
public static IntPtr GetStockObject(StockObject fnObject)
{
IntPtr retPtr = _GetStockObject(fnObject);
if (retPtr == null)
if (retPtr == IntPtr.Zero)
{
HRESULT.ThrowLastError();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ private static Storyboard GenerateDynamicTransitionAnimations(FrameworkElement r

if (transition != null)
{
if (transition.GeneratedDuration != null)
if (transition.GeneratedDuration != DurationZero)
{
dynamic.Duration = transition.GeneratedDuration;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6148,7 +6148,7 @@ private static object CoerceRenderTransform(DependencyObject d, object value)
Transform renderTransformValue = (Transform)value;

if ((value == null) ||
(renderTransformValue != null && renderTransformValue.Value != null && renderTransformValue.Value.IsIdentity == true))
(renderTransformValue != null && renderTransformValue.Value.IsIdentity == true))
{
// setting this value is allowed.
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,8 @@ private bool UnhookWindowProc(bool force)

//AvDebug.Assert(_gcHandle.IsAllocated, "External GC handle has not been allocated.");

if(null != _gcHandle)
// GCHandle is a non-nullable type. Check GCHandle.IsAllocated before calling Free().
if(_gcHandle.IsAllocated)
_gcHandle.Free();

return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,8 @@ private void Initialize(
}
}

// set metafata as required
if (contentId != null)
// set metadata as required
if (contentId != Guid.Empty)
{
hr = SafeNativeMethods.DRMSetMetaData(
_issuanceLicenseHandle,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ private object CloseInternal(Object fadeOutArg)
// In the case where the developer has specified AutoClose=True and then calls
// Close(non_zero_timespan) before the auto close operation is dispatched we begin
// the fadeout immidiately and ignore the later call to close.
if (_dt != null || _hwnd == null)
if (_dt != null || _hwnd == IntPtr.Zero)
{
return BooleanBoxes.TrueBox;
}
Expand Down