Skip to content

Commit ccae362

Browse files
committed
Add remaining samples
1 parent 339b342 commit ccae362

File tree

4 files changed

+58
-0
lines changed

4 files changed

+58
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
using System.Globalization;
2+
3+
namespace Lucene.Net.CodeAnalysis.Dev.Sample;
4+
5+
public class LuceneDev1001Sample
6+
{
7+
private readonly float float1 = 1f;
8+
9+
public void MyMethod()
10+
{
11+
string result = float1.ToString(CultureInfo.InvariantCulture);
12+
}
13+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
namespace Lucene.Net.CodeAnalysis.Dev.Sample;
2+
3+
public class LuceneDev1002Sample
4+
{
5+
private readonly float float1 = 1f;
6+
private readonly float float2 = 3.14f;
7+
8+
public void MyMethod()
9+
{
10+
long foo = 33;
11+
var result = ((double)float1 * (double)float2) / foo;
12+
}
13+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
namespace Lucene.Net.CodeAnalysis.Dev.Sample;
2+
3+
public class LuceneDev1003Sample
4+
{
5+
public static bool ParseChar(string id, int[] pos, char ch)
6+
{
7+
int start = pos[0];
8+
//pos[0] = PatternProps.SkipWhiteSpace(id, pos[0]);
9+
if (pos[0] == id.Length ||
10+
id[pos[0]] != ch)
11+
{
12+
pos[0] = start;
13+
return false;
14+
}
15+
++pos[0];
16+
return true;
17+
}
18+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
namespace Lucene.Net.CodeAnalysis.Dev.Sample;
2+
3+
public class LuceneDev1004Sample
4+
{
5+
public static byte[] GetVersionByteArrayFromCompactInt32(int version) // ICU4N specific - Renamed from GetVersionByteArrayFromCompactInt
6+
{
7+
return new byte[] {
8+
(byte)(version >> 24),
9+
(byte)(version >> 16),
10+
(byte)(version >> 8),
11+
(byte)(version)
12+
};
13+
}
14+
}

0 commit comments

Comments
 (0)