Corefxlab: Move Buffer<T> and friends to corlib, netstandard, system.runtime

Created on 21 Aug 2017  Â·  4Comments  Â·  Source: dotnet/corefxlab

area-System.Memory scheduled

Most helpful comment

Before the move, we also agreed to do the following cleanup:

  • [x] Cleanup span/buffer equality APIs (as discussed in review) <= Done (https://github.com/dotnet/corefxlab/pull/1646)
  • [x] Rename Buffer to Memory <= (Done - https://github.com/dotnet/coreclr/pull/13583)
  • [x] Remove offset from OwnedBuffer.Pin - <= Done (https://github.com/dotnet/corefxlab/pull/1715)
  • [x] Remove OwnedBuffer.Add (~will submit PR for this soon~ Done – using Unsafe.Add - https://github.com/dotnet/corefx/pull/20886 / https://github.com/dotnet/corefxlab/pull/1713)
  • [x] Remote IsRetainable and change Release return type to bool (~PR needs to be updated~ - Done -
    https://github.com/dotnet/corefxlab/pull/1648)
  • [x] We should consider renaming Buffer and ReadOnlyBuffer to AsBuffer and AsReadOnlyBuffer to be consistent with AsSpan (if we rename Buffer to Memory, it would be AsMemory, etc.) <= Done as part of the PR https://github.com/dotnet/coreclr/pull/13583)
  • [x] Where should BufferExtensions go? Should we merge with SpanExtensions? (Discussion as part of https://github.com/dotnet/corefx/issues/23862).
  • [x] Move the following APIs to corlib, System.Runtime, NetStandard, and System.Memory: Buffer, ReadOnlyBuffer, OwnedBuffer, ~members of BufferExtensions~, BufferHandle, IRetainable. <= (PRs - https://github.com/dotnet/coreclr/pull/13583 /https://github.com/dotnet/corefx/pull/23701 / https://github.com/dotnet/corefx/pull/23841)
  • [x] Span and Buffer ctros should be the same. See https://github.com/dotnet/corefx/issues/23471 (Done as part of this PR - https://github.com/dotnet/coreclr/pull/13583#discussion_r135186229)
  • [x] Move the APIs to the corfx repo (PRs https://github.com/dotnet/corefx/pull/23701 / https://github.com/dotnet/corefx/pull/23841)
  • [x] Update corefxlab to use the types from System.Memory (PR - https://github.com/dotnet/corefxlab/pull/1756)

All 4 comments

Before the move, we also agreed to do the following cleanup:

  • [x] Cleanup span/buffer equality APIs (as discussed in review) <= Done (https://github.com/dotnet/corefxlab/pull/1646)
  • [x] Rename Buffer to Memory <= (Done - https://github.com/dotnet/coreclr/pull/13583)
  • [x] Remove offset from OwnedBuffer.Pin - <= Done (https://github.com/dotnet/corefxlab/pull/1715)
  • [x] Remove OwnedBuffer.Add (~will submit PR for this soon~ Done – using Unsafe.Add - https://github.com/dotnet/corefx/pull/20886 / https://github.com/dotnet/corefxlab/pull/1713)
  • [x] Remote IsRetainable and change Release return type to bool (~PR needs to be updated~ - Done -
    https://github.com/dotnet/corefxlab/pull/1648)
  • [x] We should consider renaming Buffer and ReadOnlyBuffer to AsBuffer and AsReadOnlyBuffer to be consistent with AsSpan (if we rename Buffer to Memory, it would be AsMemory, etc.) <= Done as part of the PR https://github.com/dotnet/coreclr/pull/13583)
  • [x] Where should BufferExtensions go? Should we merge with SpanExtensions? (Discussion as part of https://github.com/dotnet/corefx/issues/23862).
  • [x] Move the following APIs to corlib, System.Runtime, NetStandard, and System.Memory: Buffer, ReadOnlyBuffer, OwnedBuffer, ~members of BufferExtensions~, BufferHandle, IRetainable. <= (PRs - https://github.com/dotnet/coreclr/pull/13583 /https://github.com/dotnet/corefx/pull/23701 / https://github.com/dotnet/corefx/pull/23841)
  • [x] Span and Buffer ctros should be the same. See https://github.com/dotnet/corefx/issues/23471 (Done as part of this PR - https://github.com/dotnet/coreclr/pull/13583#discussion_r135186229)
  • [x] Move the APIs to the corfx repo (PRs https://github.com/dotnet/corefx/pull/23701 / https://github.com/dotnet/corefx/pull/23841)
  • [x] Update corefxlab to use the types from System.Memory (PR - https://github.com/dotnet/corefxlab/pull/1756)

Span and Buffer ctros should be the same. See dotnet/corefx#23471

Is this work item solely about removing Memory(T[], int) ctor or are there other constructors we want to add/remove?

@KrzysztofCwalina, can we consider this work/issue complete? The extension work can be tracked by the api review issue - https://github.com/dotnet/corefx/issues/23862

Yeah, go ahead and close it. Just make sure the extensions issue does not get lost.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bendono picture bendono  Â·  5Comments

TylerBrinkley picture TylerBrinkley  Â·  9Comments

KrzysztofCwalina picture KrzysztofCwalina  Â·  3Comments

Drawaes picture Drawaes  Â·  10Comments

ahsonkhan picture ahsonkhan  Â·  8Comments