Skip to content

Commit c13f3cd

Browse files
committed
Supressed XML comments for Writer & Readere
1 parent e342afe commit c13f3cd

File tree

3 files changed

+22
-3
lines changed

3 files changed

+22
-3
lines changed

MLAPI/NetworkingManagerComponents/Binary/BinaryHelpers.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
namespace MLAPI.NetworkingManagerComponents.Binary
1+
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
2+
namespace MLAPI.NetworkingManagerComponents.Binary
23
{
34
public static class BinaryHelpers
45
{
@@ -15,3 +16,4 @@ public static ulong SwapEndian(ulong value) =>
1516
((value << 8) & (0xFFUL << 32)) ;
1617
}
1718
}
19+
#pragma warning restore CS1591 // Missing XML comment for publicly visible type or member

MLAPI/NetworkingManagerComponents/Binary/BitReader.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using System;
1+
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
2+
using System;
23
using System.Runtime.InteropServices;
34
using System.Text;
45

@@ -107,3 +108,4 @@ private T ReadFloating<T>()
107108
private static long ZigZagDecode(ulong d, int bytes) => (long)(((d << (bytes * 8 - 1)) & 1) | (d >> 1));
108109
}
109110
}
111+
#pragma warning restore CS1591 // Missing XML comment for publicly visible type or member

MLAPI/NetworkingManagerComponents/Binary/BitWriter.cs

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using System;
1+
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
2+
using System;
23
using System.Collections.Generic;
34
using System.Reflection;
45
using System.Runtime.InteropServices;
@@ -113,6 +114,10 @@ private void PushArray<T>(T[] t, bool knownSize = false)
113114
foreach (T t1 in t) Push(signed ? (object)ZigZagEncode(t1 as long? ?? t1 as int? ?? t1 as short? ?? t1 as sbyte? ?? 0, size) : (object)t1);
114115
}
115116

117+
/// <summary>
118+
/// Serializes data, allocates an array and returns it
119+
/// </summary>
120+
/// <returns>Allocated array with written data</returns>
116121
public byte[] Finalize()
117122
{
118123
long bitCount = 0;
@@ -133,6 +138,11 @@ public byte[] Finalize()
133138
}
134139

135140
//The ref is not needed. It's purley there to indicate that it's treated as a reference inside the method.
141+
/// <summary>
142+
/// Writes data to the given buffer
143+
/// </summary>
144+
/// <param name="buffer"></param>
145+
/// <returns>The amount of bytes written</returns>
136146
public long Finalize(ref byte[] buffer)
137147
{
138148
if(buffer == null)
@@ -161,6 +171,10 @@ public long Finalize(ref byte[] buffer)
161171
return (bitCount / 8) + (bitCount % 8 == 0 ? 0 : 1);
162172
}
163173

174+
/// <summary>
175+
/// Gets the size in bytes if you were to serialize now
176+
/// </summary>
177+
/// <returns>The size in bytes</returns>
164178
public long GetFinalizeSize()
165179
{
166180
long bitCount = 0;
@@ -391,3 +405,4 @@ public void Dispose()
391405
}
392406
}
393407
}
408+
#pragma warning restore CS1591 // Missing XML comment for publicly visible type or member

0 commit comments

Comments
 (0)