Skip to content

Commit 74e52be

Browse files
Nirmal4Gmichael-hawker
authored andcommitted
Wrong formatting applied by .NET Tool
Both VS IDE Code Clean-up and dotnet-format applies this formatting. Only Code labels and Code within pre-processor blocks are affected. The reason may be that the indentation wasn't read/written properly by the formatter within or around those code blocks. NOTE: We could ignore this commit but we keep it as a reference point for the VS C# Editor and .NET format team to diagnose this issue.
1 parent 92dd6a6 commit 74e52be

File tree

12 files changed

+242
-242
lines changed

12 files changed

+242
-242
lines changed

Microsoft.Toolkit.HighPerformance/Buffers/StringPool.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,7 @@ private void UpdateTimestamp(ref int heapIndex)
667667
goto Fallback;
668668
}
669669

670-
Downheap:
670+
Downheap:
671671

672672
// Assign a new timestamp to the target heap node. We use a
673673
// local incremental timestamp instead of using the system timer
@@ -740,7 +740,7 @@ private void UpdateTimestamp(ref int heapIndex)
740740
root = ref Unsafe.Add(ref heapEntriesRef, (nint)(uint)currentIndex);
741741
}
742742

743-
Fallback:
743+
Fallback:
744744

745745
UpdateAllTimestamps();
746746

Microsoft.Toolkit.HighPerformance/Memory/Memory2D{T}.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -819,7 +819,7 @@ public bool TryGetMemory(out Memory<T> memory)
819819
return true;
820820
}
821821

822-
Failure:
822+
Failure:
823823

824824
memory = default;
825825

Microsoft.Toolkit.HighPerformance/Memory/ReadOnlyMemory2D{T}.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -832,7 +832,7 @@ public bool TryGetMemory(out ReadOnlyMemory<T> memory)
832832
return true;
833833
}
834834

835-
Failure:
835+
Failure:
836836

837837
memory = default;
838838

Microsoft.Toolkit.Uwp.UI.Controls.DataGrid/CollectionViews/ListCollectionView.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -318,9 +318,9 @@ protected virtual int Compare(object o1, object o2)
318318
return ActiveComparer.Compare(o1, o2);
319319
}
320320
#endif
321-
int i1 = InternalList.IndexOf(o1);
322-
int i2 = InternalList.IndexOf(o2);
323-
return i1 - i2;
321+
int i1 = InternalList.IndexOf(o1);
322+
int i2 = InternalList.IndexOf(o2);
323+
return i1 - i2;
324324
#if FEATURE_ICOLLECTIONVIEW_GROUP
325325
}
326326
else
@@ -1701,7 +1701,7 @@ protected bool InternalContains(object item)
17011701
if (!IsGrouping)
17021702
{
17031703
#endif
1704-
return InternalList.Contains(item);
1704+
return InternalList.Contains(item);
17051705
#if FEATURE_ICOLLECTIONVIEW_GROUP
17061706
}
17071707
else
@@ -1724,7 +1724,7 @@ protected IEnumerator InternalGetEnumerator()
17241724
#if FEATURE_IEDITABLECOLLECTIONVIEW
17251725
return new PlaceholderAwareEnumerator(this, InternalList.GetEnumerator(), _newItem);
17261726
#else
1727-
return new PlaceholderAwareEnumerator(this, InternalList.GetEnumerator(), NoNewItem);
1727+
return new PlaceholderAwareEnumerator(this, InternalList.GetEnumerator(), NoNewItem);
17281728
#endif
17291729
#if FEATURE_ICOLLECTIONVIEW_GROUP
17301730
}

Microsoft.Toolkit.Uwp.UI.Controls.DataGrid/DataGrid/Automation/DataGridAutomationPeer.cs

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -814,38 +814,38 @@ internal void RaiseAutomationInvokeEvents(DataGridEditingUnit editingUnit, DataG
814814
switch (editingUnit)
815815
{
816816
case DataGridEditingUnit.Cell:
817-
{
818-
DataGridCell cell = row.Cells[column.Index];
819-
AutomationPeer peer = FromElement(cell);
820-
if (peer != null)
821-
{
822-
peer.InvalidatePeer();
823-
}
824-
else
825817
{
826-
peer = CreatePeerForElement(cell);
827-
}
818+
DataGridCell cell = row.Cells[column.Index];
819+
AutomationPeer peer = FromElement(cell);
820+
if (peer != null)
821+
{
822+
peer.InvalidatePeer();
823+
}
824+
else
825+
{
826+
peer = CreatePeerForElement(cell);
827+
}
828828

829-
if (peer != null)
830-
{
829+
if (peer != null)
830+
{
831831
#if DEBUG_AUTOMATION
832832
Debug.WriteLine(peer.ToString() + ".RaiseAutomationEvent(AutomationEvents.InvokePatternOnInvoked)");
833833
#endif
834-
peer.RaiseAutomationEvent(AutomationEvents.InvokePatternOnInvoked);
835-
}
834+
peer.RaiseAutomationEvent(AutomationEvents.InvokePatternOnInvoked);
835+
}
836836

837-
break;
838-
}
837+
break;
838+
}
839839

840840
case DataGridEditingUnit.Row:
841-
{
842-
DataGridItemAutomationPeer peer = GetOrCreateItemPeer(row.DataContext);
841+
{
842+
DataGridItemAutomationPeer peer = GetOrCreateItemPeer(row.DataContext);
843843
#if DEBUG_AUTOMATION
844844
Debug.WriteLine("DataGridItemAutomationPeer.RaiseAutomationEvent(AutomationEvents.InvokePatternOnInvoked)");
845845
#endif
846-
peer.RaiseAutomationEvent(AutomationEvents.InvokePatternOnInvoked);
847-
break;
848-
}
846+
peer.RaiseAutomationEvent(AutomationEvents.InvokePatternOnInvoked);
847+
break;
848+
}
849849
}
850850
}
851851

Microsoft.Toolkit.Uwp.UI.Controls.DataGrid/DataGrid/Automation/DataGridGroupItemAutomationPeer.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,10 +177,10 @@ protected override IList<AutomationPeer> GetChildrenCore()
177177
{
178178
#endif
179179
#pragma warning disable SA1137 // Elements should have the same indentation
180-
foreach (object item in _group.GroupItems /*Items*/)
181-
{
182-
children.Add(this.OwningDataGridPeer.GetOrCreateItemPeer(item));
183-
}
180+
foreach (object item in _group.GroupItems /*Items*/)
181+
{
182+
children.Add(this.OwningDataGridPeer.GetOrCreateItemPeer(item));
183+
}
184184
#pragma warning restore SA1137 // Elements should have the same indentation
185185
#if FEATURE_ICOLLECTIONVIEW_GROUP
186186
}

Microsoft.Toolkit.Uwp.UI.Controls.DataGrid/DataGrid/Automation/DataGridItemAutomationPeer.cs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -256,25 +256,25 @@ protected override object GetPatternCore(PatternInterface patternInterface)
256256
switch (patternInterface)
257257
{
258258
case PatternInterface.Invoke:
259-
{
260-
if (!this.OwningDataGrid.IsReadOnly)
261259
{
262-
return this;
263-
}
260+
if (!this.OwningDataGrid.IsReadOnly)
261+
{
262+
return this;
263+
}
264264

265-
break;
266-
}
265+
break;
266+
}
267267

268268
case PatternInterface.ScrollItem:
269-
{
270-
if (this.OwningDataGrid.VerticalScrollBar != null &&
271-
this.OwningDataGrid.VerticalScrollBar.Maximum > 0)
272269
{
273-
return this;
274-
}
270+
if (this.OwningDataGrid.VerticalScrollBar != null &&
271+
this.OwningDataGrid.VerticalScrollBar.Maximum > 0)
272+
{
273+
return this;
274+
}
275275

276-
break;
277-
}
276+
break;
277+
}
278278

279279
case PatternInterface.Selection:
280280
case PatternInterface.SelectionItem:

Microsoft.Toolkit.Uwp.UI.Controls.DataGrid/DataGrid/DataGridColumnHeader.cs

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -711,37 +711,37 @@ private void DataGridColumnHeader_PointerReleased(object sender, PointerRoutedEv
711711
switch (interactionInfo.DragMode)
712712
{
713713
case DragMode.PointerPressed:
714-
{
715-
// Completed a click or tap without dragging, so raise the DataGrid.Sorting event.
716-
InvokeProcessSort();
717-
break;
718-
}
714+
{
715+
// Completed a click or tap without dragging, so raise the DataGrid.Sorting event.
716+
InvokeProcessSort();
717+
break;
718+
}
719719

720720
case DragMode.Reorder:
721-
{
722-
// Find header hovered over
723-
int targetIndex = this.GetReorderingTargetDisplayIndex(pointerPositionHeaders);
724-
725-
if ((!this.OwningColumn.IsFrozen && targetIndex >= this.OwningGrid.FrozenColumnCount) ||
726-
(this.OwningColumn.IsFrozen && targetIndex < this.OwningGrid.FrozenColumnCount))
727721
{
728-
this.OwningColumn.DisplayIndex = targetIndex;
722+
// Find header hovered over
723+
int targetIndex = this.GetReorderingTargetDisplayIndex(pointerPositionHeaders);
729724

730-
DataGridColumnEventArgs ea = new DataGridColumnEventArgs(this.OwningColumn);
731-
this.OwningGrid.OnColumnReordered(ea);
732-
}
725+
if ((!this.OwningColumn.IsFrozen && targetIndex >= this.OwningGrid.FrozenColumnCount) ||
726+
(this.OwningColumn.IsFrozen && targetIndex < this.OwningGrid.FrozenColumnCount))
727+
{
728+
this.OwningColumn.DisplayIndex = targetIndex;
733729

734-
DragCompletedEventArgs dragCompletedEventArgs = new DragCompletedEventArgs(pointerPosition.X - interactionInfo.DragStart.Value.X, pointerPosition.Y - interactionInfo.DragStart.Value.Y, false);
735-
this.OwningGrid.OnColumnHeaderDragCompleted(dragCompletedEventArgs);
736-
break;
737-
}
730+
DataGridColumnEventArgs ea = new DataGridColumnEventArgs(this.OwningColumn);
731+
this.OwningGrid.OnColumnReordered(ea);
732+
}
733+
734+
DragCompletedEventArgs dragCompletedEventArgs = new DragCompletedEventArgs(pointerPosition.X - interactionInfo.DragStart.Value.X, pointerPosition.Y - interactionInfo.DragStart.Value.Y, false);
735+
this.OwningGrid.OnColumnHeaderDragCompleted(dragCompletedEventArgs);
736+
break;
737+
}
738738

739739
case DragMode.Drag:
740-
{
741-
DragCompletedEventArgs dragCompletedEventArgs = new DragCompletedEventArgs(0, 0, false);
742-
this.OwningGrid.OnColumnHeaderDragCompleted(dragCompletedEventArgs);
743-
break;
744-
}
740+
{
741+
DragCompletedEventArgs dragCompletedEventArgs = new DragCompletedEventArgs(0, 0, false);
742+
this.OwningGrid.OnColumnHeaderDragCompleted(dragCompletedEventArgs);
743+
break;
744+
}
745745
}
746746

747747
SetResizeCursor(e.Pointer, pointerPosition);

0 commit comments

Comments
 (0)