Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJan Kotas <jkotas@microsoft.com>2018-03-08 01:47:49 +0300
committerJan Kotas <jkotas@microsoft.com>2018-03-08 07:04:05 +0300
commit8bdede75864638b2f57f99801d71779b39f4532e (patch)
tree1dfdbcdbd6aa4abb0ac59d9114b4933f0044ffc3 /src
parentbc5905fdad203dfdce18119044ccc393088b28fa (diff)
Delete AsReadOnly* APIs that are no longer part of the public surface (#16799)
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Diffstat (limited to 'src')
-rw-r--r--src/System.Private.CoreLib/shared/System/Globalization/DateTimeParse.cs4
-rw-r--r--src/System.Private.CoreLib/shared/System/MemoryExtensions.cs28
2 files changed, 2 insertions, 30 deletions
diff --git a/src/System.Private.CoreLib/shared/System/Globalization/DateTimeParse.cs b/src/System.Private.CoreLib/shared/System/Globalization/DateTimeParse.cs
index fd64c6d11..bf86e0cfd 100644
--- a/src/System.Private.CoreLib/shared/System/Globalization/DateTimeParse.cs
+++ b/src/System.Private.CoreLib/shared/System/Globalization/DateTimeParse.cs
@@ -5296,7 +5296,7 @@ new DS[] { DS.ERROR, DS.TX_NNN, DS.TX_NNN, DS.TX_NNN, DS.ERROR, DS.ERROR,
Span<char> result = new char[i + 1];
result[i] = ch;
Value.Slice(0, i).CopyTo(result);
- Value = result.AsReadOnlySpan();
+ Value = result;
}
}
}
@@ -5323,7 +5323,7 @@ new DS[] { DS.ERROR, DS.TX_NNN, DS.TX_NNN, DS.TX_NNN, DS.ERROR, DS.ERROR,
Span<char> result = new char[Value.Length - i];
result[0] = ch;
Value.Slice(i + 1).CopyTo(result.Slice(1));
- Value = result.AsReadOnlySpan();
+ Value = result;
}
}
}
diff --git a/src/System.Private.CoreLib/shared/System/MemoryExtensions.cs b/src/System.Private.CoreLib/shared/System/MemoryExtensions.cs
index d5a6b72eb..0f8f167e6 100644
--- a/src/System.Private.CoreLib/shared/System/MemoryExtensions.cs
+++ b/src/System.Private.CoreLib/shared/System/MemoryExtensions.cs
@@ -786,34 +786,6 @@ namespace System
}
/// <summary>
- /// Creates a new readonly span over the entire target array.
- /// </summary>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static ReadOnlySpan<T> AsReadOnlySpan<T>(this T[] array)
- {
- return new ReadOnlySpan<T>(array);
- }
-
- /// <summary>
- /// Creates a new readonly span over the entire target span.
- /// </summary>
- public static ReadOnlySpan<T> AsReadOnlySpan<T>(this Span<T> span) => span;
-
- /// <summary>
- /// Creates a new readonly span over the target array segment.
- /// </summary>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static ReadOnlySpan<T> AsReadOnlySpan<T>(this ArraySegment<T> arraySegment)
- {
- return new ReadOnlySpan<T>(arraySegment.Array, arraySegment.Offset, arraySegment.Count);
- }
-
- /// <summary>
- /// Creates a new readonly memory over the entire target memory.
- /// </summary>
- public static ReadOnlyMemory<T> AsReadOnlyMemory<T>(this Memory<T> memory) => memory;
-
- /// <summary>
/// Creates a new memory over the target array.
/// </summary>
public static Memory<T> AsMemory<T>(this T[] array) => new Memory<T>(array);