From c13f3cd64d07b1319006d8766a92306646d26034 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Albin=20Cor=C3=A9n?= <2108U9@gmail.com>
Date: Wed, 18 Apr 2018 11:49:08 +0200
Subject: [PATCH] Supressed XML comments for Writer & Readere
---
.../Binary/BinaryHelpers.cs | 4 +++-
.../Binary/BitReader.cs | 4 +++-
.../Binary/BitWriter.cs | 17 ++++++++++++++++-
3 files changed, 22 insertions(+), 3 deletions(-)
diff --git a/MLAPI/NetworkingManagerComponents/Binary/BinaryHelpers.cs b/MLAPI/NetworkingManagerComponents/Binary/BinaryHelpers.cs
index eda5881..aba27d3 100644
--- a/MLAPI/NetworkingManagerComponents/Binary/BinaryHelpers.cs
+++ b/MLAPI/NetworkingManagerComponents/Binary/BinaryHelpers.cs
@@ -1,4 +1,5 @@
-namespace MLAPI.NetworkingManagerComponents.Binary
+#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
+namespace MLAPI.NetworkingManagerComponents.Binary
{
public static class BinaryHelpers
{
@@ -15,3 +16,4 @@
((value << 8) & (0xFFUL << 32)) ;
}
}
+#pragma warning restore CS1591 // Missing XML comment for publicly visible type or member
diff --git a/MLAPI/NetworkingManagerComponents/Binary/BitReader.cs b/MLAPI/NetworkingManagerComponents/Binary/BitReader.cs
index 1cc3fea..02beb75 100644
--- a/MLAPI/NetworkingManagerComponents/Binary/BitReader.cs
+++ b/MLAPI/NetworkingManagerComponents/Binary/BitReader.cs
@@ -1,4 +1,5 @@
-using System;
+#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
+using System;
using System.Runtime.InteropServices;
using System.Text;
@@ -107,3 +108,4 @@ namespace MLAPI.NetworkingManagerComponents.Binary
private static long ZigZagDecode(ulong d, int bytes) => (long)(((d << (bytes * 8 - 1)) & 1) | (d >> 1));
}
}
+#pragma warning restore CS1591 // Missing XML comment for publicly visible type or member
diff --git a/MLAPI/NetworkingManagerComponents/Binary/BitWriter.cs b/MLAPI/NetworkingManagerComponents/Binary/BitWriter.cs
index 081fd41..a0167c4 100644
--- a/MLAPI/NetworkingManagerComponents/Binary/BitWriter.cs
+++ b/MLAPI/NetworkingManagerComponents/Binary/BitWriter.cs
@@ -1,4 +1,5 @@
-using System;
+#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
+using System;
using System.Collections.Generic;
using System.Reflection;
using System.Runtime.InteropServices;
@@ -113,6 +114,10 @@ namespace MLAPI.NetworkingManagerComponents.Binary
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);
}
+ ///
+ /// Serializes data, allocates an array and returns it
+ ///
+ /// Allocated array with written data
public byte[] Finalize()
{
long bitCount = 0;
@@ -133,6 +138,11 @@ namespace MLAPI.NetworkingManagerComponents.Binary
}
//The ref is not needed. It's purley there to indicate that it's treated as a reference inside the method.
+ ///
+ /// Writes data to the given buffer
+ ///
+ ///
+ /// The amount of bytes written
public long Finalize(ref byte[] buffer)
{
if(buffer == null)
@@ -161,6 +171,10 @@ namespace MLAPI.NetworkingManagerComponents.Binary
return (bitCount / 8) + (bitCount % 8 == 0 ? 0 : 1);
}
+ ///
+ /// Gets the size in bytes if you were to serialize now
+ ///
+ /// The size in bytes
public long GetFinalizeSize()
{
long bitCount = 0;
@@ -391,3 +405,4 @@ namespace MLAPI.NetworkingManagerComponents.Binary
}
}
}
+#pragma warning restore CS1591 // Missing XML comment for publicly visible type or member