Slice method in RefEnumerable<T> and ReadOnlyRefEnumerable<T>

未关闭
#1,040 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
csharp

调研方向

定位 RefEnumerable 和 ReadOnlyRefEnumerable 的定义,然后将它们现有的 API 与 issue 中描述的 Span 切片行为进行比较。检查这些 enumerable 类型是如何进行测试的,并为所请求的 start 和 length 情况添加覆盖;完成的标准是两种类型都提供所请求的 Slice API,且不复制底层值。

由索引模型根据 Issue 内容生成。

描述

feature request :mailbox_with_mail:
Overview

Slice method in RefEnumerable and ReadOnlyRefEnumerable analogue to Slice method of Span.

API breakdown
namespace CommunityToolkit.SomePackage;

public class ReadOnlyRefEnumerable<T>
{
    public ReadOnlyRefEnumerable<T> Slice(int start,int length);
}
Usage example
var span=new Span2D<double>(5,5);//matrix representation
span.GetColumn(0)[..3];//get 3 values from matrix

### Breaking change?

No

### Alternatives

Alternative is to copy everything to span.

### Additional context

_No response_

### Help us help you

Yes, I'd like to be assigned to work on this item
主要语言
C#
星标
3.8k
派生
402
PR 合并指标
30 天内没有已合并 PR

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

CommunityToolkit/dotnet 的其他 Issue

查看 CommunityToolkit/dotnet 的全部 Issue

相似的 Issue

更多 C# Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。