Commit 49e778b
authored
Added AsSpan() and AsMemory() methods to ICharTermAttribute, CharsRef, and BytesRef (#1192)
* .build/dependencies.props: Added dependency on Microsoft.Bcl.Memory for Index/Range and Utf8 support on .NET Framework and .NET Standard 2.0. Bumped System.Memory to 4.6.3 (Required by Microsoft.Bcl.Memory).
* Added Lucene.Net.MemoryExtensions class with support for AsSpan() and AsMemory() overloads for ICharTermAttribute.
* Lucene.Net.Util.CharsRef: Added AsSpan(), AsMemory(), ctor, CopyChars(), and Append() methods to support System.Memory types.
* Lucene.Net.Util.BytesRef: Added AsSpan(), AsMemory(), ctor, CopyChars(), and Append() methods to support System.Memory types.
* Lucene.Net.Tests/Support/TestMemoryExtensions.cs: Added LuceneNetAttribute and links to the sources the file is based on.1 parent 2067df7 commit 49e778b
14 files changed
Lines changed: 2728 additions & 6 deletions
File tree
- .build
- src
- Lucene.Net.TestFramework/Support/TestFramework
- Lucene.Net.Tests._J-S
- Lucene.Net.Tests._T-Z
- Lucene.Net.Tests
- Support
- Util
- Lucene.Net
- Analysis/TokenAttributes
- Support
- Util
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
| |||
70 | 71 | | |
71 | 72 | | |
72 | 73 | | |
73 | | - | |
| 74 | + | |
74 | 75 | | |
75 | 76 | | |
76 | 77 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
66 | 67 | | |
67 | 68 | | |
68 | 69 | | |
| |||
91 | 92 | | |
92 | 93 | | |
93 | 94 | | |
| 95 | + | |
94 | 96 | | |
95 | 97 | | |
96 | 98 | | |
| |||
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1164 | 1164 | | |
1165 | 1165 | | |
1166 | 1166 | | |
| 1167 | + | |
| 1168 | + | |
| 1169 | + | |
| 1170 | + | |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
| 1174 | + | |
| 1175 | + | |
| 1176 | + | |
| 1177 | + | |
| 1178 | + | |
1167 | 1179 | | |
1168 | 1180 | | |
1169 | 1181 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| 35 | + | |
34 | 36 | | |
35 | 37 | | |
36 | 38 | | |
| |||
0 commit comments