mirror of
https://github.com/esiur/esiur-dotnet.git
synced 2025-06-27 05:23:13 +00:00
UInt8Array fix
This commit is contained in:
@ -640,7 +640,7 @@ namespace Esyur.Data
|
||||
public static sbyte[] GetInt8Array(this byte[] data, uint offset, uint length)
|
||||
{
|
||||
var rt = new sbyte[length];
|
||||
Buffer.BlockCopy(rt, (int)offset, rt, 0, (int)length);
|
||||
Buffer.BlockCopy(data, (int)offset, rt, 0, (int)length);
|
||||
return rt;
|
||||
}
|
||||
|
||||
@ -652,7 +652,7 @@ namespace Esyur.Data
|
||||
public static byte[] GetUInt8Array(this byte[] data, uint offset, uint length)
|
||||
{
|
||||
var rt = new byte[length];
|
||||
Buffer.BlockCopy(rt, (int)offset, rt, 0, (int)length);
|
||||
Buffer.BlockCopy(data, (int)offset, rt, 0, (int)length);
|
||||
return rt;
|
||||
}
|
||||
|
||||
|
@ -57,8 +57,8 @@ namespace Esyur.Data
|
||||
//Array = 0x80,
|
||||
VarArray = 0x80,
|
||||
BoolArray,
|
||||
UInt8Array,
|
||||
Int8Array,
|
||||
UInt8Array,
|
||||
CharArray,
|
||||
Int16Array,
|
||||
UInt16Array,
|
||||
|
@ -36,7 +36,7 @@ using Esyur.Core;
|
||||
namespace Esyur.Data
|
||||
{
|
||||
|
||||
public class KeyList<KT, T> : IEnumerable
|
||||
public class KeyList<KT, T> : IEnumerable<KeyValuePair<KT, T>>
|
||||
{
|
||||
private readonly object syncRoot = new object();
|
||||
private Dictionary<KT, T> dic;
|
||||
@ -144,11 +144,18 @@ namespace Esyur.Data
|
||||
}
|
||||
}
|
||||
|
||||
public IEnumerator GetEnumerator()
|
||||
|
||||
public IEnumerator<KeyValuePair<KT, T>> GetEnumerator()
|
||||
{
|
||||
return dic.GetEnumerator();
|
||||
}
|
||||
|
||||
IEnumerator IEnumerable.GetEnumerator()
|
||||
{
|
||||
return dic.GetEnumerator();
|
||||
}
|
||||
|
||||
|
||||
public void Clear()
|
||||
{
|
||||
if (removableList)
|
||||
|
Reference in New Issue
Block a user