Based on corefxlab work, will be used by a variety of new corefx Span-based APIs. We need to re-review to make sure it's exactly what we want to bake in to the core of the framework
C#
namespace System.Buffers // System?
{
public enum TransformationStatus // TransformStatus? TransformResult?
{
Done, // Success? Complete? Ok?
DestinationTooSmall,
NeedMoreSourceData, // SourceTooSmall?
InvalidData
}
}
cc: @terrajobst, @bartonjs, @KrzysztofCwalina, @ahsonkhan
Regarding naming, I'd prefer the following:
I'd prefer the following
In case it wasn't obvious from my comments I added to the type, me too ;)
I have used this enums in some contexts that were not transformations, e.g. in a routine that copies data from one buffer to another. Because of that, the currently proposed name is BufferOperationStatus, or even OperationStatus.
cc: @shiftylogic
the currently proposed name is BufferOperationStatus, or even OperationStatus.
Given the naming feedback:
"TransformResult", or something with "Result" in the name
Should the enum be named BufferOperationResult or OperationResult instead?
I named it Status because I thought it implies current state of an ongoing operation (multiple calls to the method). Result to me implies more the final state.
But it might be splitting hair, and so I would be ok with either postfix
@KrzysztofCwalina I believe we are blocked on some of your TextEncoding APIs to show motivation for this one ...
This is now tracked as part of other work item.
For reference, here is the enum now:
https://github.com/dotnet/corefx/blob/master/src/System.Memory/src/System/Buffers/OperationStatus.cs#L11
C#
namespace System.Buffers
{
public enum OperationStatus
{
Done,
DestinationTooSmall,
NeedMoreData,
InvalidData,
}
}
Are we happy with the field names as is?
Where is the main API approval issue? I can't find it ...
@ahsonkhan @KrzysztofCwalina what is the main API issue tracking the proposal now?
FYI: The API review discussion was recorded - see https://youtu.be/bHwCPVNQLwo?t=99 (4 min duration)
Most helpful comment
Regarding naming, I'd prefer the following: