mirror of
https://github.com/TalAloni/SMBLibrary.git
synced 2025-08-05 15:31:29 +02:00
Utilities: Renamed ReadGuidBytes / WriteGuidBytes to ReadGuid / WriteGuid
This commit is contained in:
parent
f5d727ddf2
commit
153abe3d27
12 changed files with 21 additions and 21 deletions
|
@ -52,7 +52,7 @@ namespace Utilities
|
|||
return BigEndianConverter.ToUInt64(buffer, offset - 8);
|
||||
}
|
||||
|
||||
public static Guid ReadGuidBytes(byte[] buffer, ref int offset)
|
||||
public static Guid ReadGuid(byte[] buffer, ref int offset)
|
||||
{
|
||||
offset += 16;
|
||||
return BigEndianConverter.ToGuid(buffer, offset - 16);
|
||||
|
@ -107,7 +107,7 @@ namespace Utilities
|
|||
return BigEndianConverter.ToUInt64(buffer, 0);
|
||||
}
|
||||
|
||||
public static Guid ReadGuidBytes(Stream stream)
|
||||
public static Guid ReadGuid(Stream stream)
|
||||
{
|
||||
byte[] buffer = new byte[16];
|
||||
stream.Read(buffer, 0, 16);
|
||||
|
|
|
@ -89,15 +89,15 @@ namespace Utilities
|
|||
offset += 8;
|
||||
}
|
||||
|
||||
public static void WriteGuidBytes(byte[] buffer, int offset, Guid value)
|
||||
public static void WriteGuid(byte[] buffer, int offset, Guid value)
|
||||
{
|
||||
byte[] bytes = BigEndianConverter.GetBytes(value);
|
||||
Array.Copy(bytes, 0, buffer, offset, bytes.Length);
|
||||
}
|
||||
|
||||
public static void WriteGuidBytes(byte[] buffer, ref int offset, Guid value)
|
||||
public static void WriteGuid(byte[] buffer, ref int offset, Guid value)
|
||||
{
|
||||
WriteGuidBytes(buffer, offset, value);
|
||||
WriteGuid(buffer, offset, value);
|
||||
offset += 16;
|
||||
}
|
||||
|
||||
|
@ -143,7 +143,7 @@ namespace Utilities
|
|||
stream.Write(bytes, 0, bytes.Length);
|
||||
}
|
||||
|
||||
public static void WriteGuidBytes(Stream stream, Guid value)
|
||||
public static void WriteGuid(Stream stream, Guid value)
|
||||
{
|
||||
byte[] bytes = BigEndianConverter.GetBytes(value);
|
||||
stream.Write(bytes, 0, bytes.Length);
|
||||
|
|
|
@ -89,7 +89,7 @@ namespace Utilities
|
|||
return LittleEndianConverter.ToUInt64(buffer, 0);
|
||||
}
|
||||
|
||||
public static Guid ReadGuidBytes(Stream stream)
|
||||
public static Guid ReadGuid(Stream stream)
|
||||
{
|
||||
byte[] buffer = new byte[16];
|
||||
stream.Read(buffer, 0, 16);
|
||||
|
|
|
@ -77,15 +77,15 @@ namespace Utilities
|
|||
offset += 8;
|
||||
}
|
||||
|
||||
public static void WriteGuidBytes(byte[] buffer, int offset, Guid value)
|
||||
public static void WriteGuid(byte[] buffer, int offset, Guid value)
|
||||
{
|
||||
byte[] bytes = LittleEndianConverter.GetBytes(value);
|
||||
Array.Copy(bytes, 0, buffer, offset, bytes.Length);
|
||||
}
|
||||
|
||||
public static void WriteGuidBytes(byte[] buffer, ref int offset, Guid value)
|
||||
public static void WriteGuid(byte[] buffer, ref int offset, Guid value)
|
||||
{
|
||||
WriteGuidBytes(buffer, offset, value);
|
||||
WriteGuid(buffer, offset, value);
|
||||
offset += 16;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue