This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding placeholder Span debugger proxy (dotnet/coreclr#14749)
* Adding placeholder Span debugger proxy. * Remove unnecessary unsafe keyword. Signed-off-by: dotnet-bot-corefx-mirror <dotnet-bot@microsoft.com>
- Loading branch information
1 parent
d05c0d4
commit fcbb264
Showing
4 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
using System.Diagnostics; | ||
using System.Reflection; | ||
using System.Runtime.CompilerServices; | ||
|
||
namespace System | ||
{ | ||
internal sealed class SpanDebugView<T> | ||
{ | ||
private readonly T[] _array; | ||
|
||
public SpanDebugView(Span<T> span) | ||
{ | ||
_array = span.ToArray(); | ||
} | ||
|
||
public SpanDebugView(ReadOnlySpan<T> span) | ||
{ | ||
_array = span.ToArray(); | ||
} | ||
|
||
[DebuggerBrowsable(DebuggerBrowsableState.RootHidden)] | ||
public T[] Items => _array; | ||
} | ||
} |