diff --git a/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf.dll b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf.dll
deleted file mode 100644
index 7663c313..00000000
Binary files a/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf.dll and /dev/null differ
diff --git a/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf.dll.meta b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf.dll.meta
deleted file mode 100644
index 794d80b6..00000000
--- a/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf.dll.meta
+++ /dev/null
@@ -1,33 +0,0 @@
-fileFormatVersion: 2
-guid: 2c61c2e567bd4e146b4c09946e815a55
-PluginImporter:
- externalObjects: {}
- serializedVersion: 2
- iconMap: {}
- executionOrder: {}
- defineConstraints: []
- isPreloaded: 0
- isOverridable: 0
- isExplicitlyReferenced: 0
- validateReferences: 1
- platformData:
- - first:
- Any:
- second:
- enabled: 1
- settings: {}
- - first:
- Editor: Editor
- second:
- enabled: 0
- settings:
- DefaultValueInitialized: true
- - first:
- Windows Store Apps: WindowsStoreApps
- second:
- enabled: 0
- settings:
- CPU: AnyCPU
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf.meta b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf.meta
new file mode 100644
index 00000000..ae447dcd
--- /dev/null
+++ b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 4a8c636c0276a9740b79c406e75975e0
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/ByteArray.cs b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/ByteArray.cs
new file mode 100644
index 00000000..c8adaf7d
--- /dev/null
+++ b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/ByteArray.cs
@@ -0,0 +1,56 @@
+#region Copyright notice and license
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+//
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file or at
+// https://developers.google.com/open-source/licenses/bsd
+#endregion
+
+using System;
+
+namespace Google.Protobuf
+{
+ ///
+ /// Provides a utility routine to copy small arrays much more quickly than Buffer.BlockCopy
+ ///
+ internal static class ByteArray
+ {
+ ///
+ /// The threshold above which you should use Buffer.BlockCopy rather than ByteArray.Copy
+ ///
+ private const int CopyThreshold = 12;
+
+ ///
+ /// Determines which copy routine to use based on the number of bytes to be copied.
+ ///
+ internal static void Copy(byte[] src, int srcOffset, byte[] dst, int dstOffset, int count)
+ {
+ if (count > CopyThreshold)
+ {
+ Buffer.BlockCopy(src, srcOffset, dst, dstOffset, count);
+ }
+ else
+ {
+ int stop = srcOffset + count;
+ for (int i = srcOffset; i < stop; i++)
+ {
+ dst[dstOffset++] = src[i];
+ }
+ }
+ }
+
+ ///
+ /// Reverses the order of bytes in the array
+ ///
+ internal static void Reverse(byte[] bytes)
+ {
+ for (int first = 0, last = bytes.Length - 1; first < last; first++, last--)
+ {
+ byte temp = bytes[first];
+ bytes[first] = bytes[last];
+ bytes[last] = temp;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/ByteArray.cs.meta b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/ByteArray.cs.meta
new file mode 100644
index 00000000..530b61e5
--- /dev/null
+++ b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/ByteArray.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 572496ae08a6d1348a4f88c22abdaa12
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/ByteString.cs b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/ByteString.cs
new file mode 100644
index 00000000..b8e0b391
--- /dev/null
+++ b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/ByteString.cs
@@ -0,0 +1,424 @@
+#region Copyright notice and license
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+//
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file or at
+// https://developers.google.com/open-source/licenses/bsd
+#endregion
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.IO;
+using System.Runtime.InteropServices;
+using System.Security;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace Google.Protobuf
+{
+ ///
+ /// Immutable array of bytes.
+ ///
+ [SecuritySafeCritical]
+ [DebuggerDisplay("Length = {Length}")]
+ [DebuggerTypeProxy(typeof(ByteStringDebugView))]
+ public sealed class ByteString : IEnumerable, IEquatable
+ {
+ private static readonly ByteString empty = new ByteString(new byte[0]);
+
+ private readonly ReadOnlyMemory bytes;
+
+ ///
+ /// Internal use only. Ensure that the provided memory is not mutated and belongs to this instance.
+ ///
+ internal static ByteString AttachBytes(ReadOnlyMemory bytes)
+ {
+ return new ByteString(bytes);
+ }
+
+ ///
+ /// Internal use only. Ensure that the provided memory is not mutated and belongs to this instance.
+ /// This method encapsulates converting array to memory. Reduces need for SecuritySafeCritical
+ /// in .NET Framework.
+ ///
+ internal static ByteString AttachBytes(byte[] bytes)
+ {
+ return AttachBytes(bytes.AsMemory());
+ }
+
+ ///
+ /// Constructs a new ByteString from the given memory. The memory is
+ /// *not* copied, and must not be modified after this constructor is called.
+ ///
+ private ByteString(ReadOnlyMemory bytes)
+ {
+ this.bytes = bytes;
+ }
+
+ ///
+ /// Returns an empty ByteString.
+ ///
+ public static ByteString Empty
+ {
+ get { return empty; }
+ }
+
+ ///
+ /// Returns the length of this ByteString in bytes.
+ ///
+ public int Length
+ {
+ get { return bytes.Length; }
+ }
+
+ ///
+ /// Returns true if this byte string is empty, false otherwise.
+ ///
+ public bool IsEmpty
+ {
+ get { return Length == 0; }
+ }
+
+ ///
+ /// Provides read-only access to the data of this .
+ /// No data is copied so this is the most efficient way of accessing.
+ ///
+ public ReadOnlySpan Span
+ {
+ get { return bytes.Span; }
+ }
+
+ ///
+ /// Provides read-only access to the data of this .
+ /// No data is copied so this is the most efficient way of accessing.
+ ///
+ public ReadOnlyMemory Memory
+ {
+ get { return bytes; }
+ }
+
+ ///
+ /// Converts this into a byte array.
+ ///
+ /// The data is copied - changes to the returned array will not be reflected in this ByteString.
+ /// A byte array with the same data as this ByteString.
+ public byte[] ToByteArray()
+ {
+ return bytes.ToArray();
+ }
+
+ ///
+ /// Converts this into a standard base64 representation.
+ ///
+ /// A base64 representation of this ByteString.
+ public string ToBase64()
+ {
+#if NET5_0_OR_GREATER
+ return Convert.ToBase64String(bytes.Span);
+#else
+ if (MemoryMarshal.TryGetArray(bytes, out ArraySegment segment))
+ {
+ // Fast path. ByteString was created with an array, so pass the underlying array.
+ return Convert.ToBase64String(segment.Array, segment.Offset, segment.Count);
+ }
+ else
+ {
+ // Slow path. BytesString is not an array. Convert memory and pass result to ToBase64String.
+ return Convert.ToBase64String(bytes.ToArray());
+ }
+#endif
+ }
+
+ ///
+ /// Constructs a from the Base64 Encoded String.
+ ///
+ public static ByteString FromBase64(string bytes)
+ {
+ // By handling the empty string explicitly, we not only optimize but we fix a
+ // problem on CF 2.0. See issue 61 for details.
+ return bytes == "" ? Empty : new ByteString(Convert.FromBase64String(bytes));
+ }
+
+ ///
+ /// Constructs a from data in the given stream, synchronously.
+ ///
+ /// If successful, will be read completely, from the position
+ /// at the start of the call.
+ /// The stream to copy into a ByteString.
+ /// A ByteString with content read from the given stream.
+ public static ByteString FromStream(Stream stream)
+ {
+ ProtoPreconditions.CheckNotNull(stream, nameof(stream));
+ int capacity = stream.CanSeek ? checked((int) (stream.Length - stream.Position)) : 0;
+ var memoryStream = new MemoryStream(capacity);
+ stream.CopyTo(memoryStream);
+#if NETSTANDARD1_1 || NETSTANDARD2_0
+ byte[] bytes = memoryStream.ToArray();
+#else
+ // Avoid an extra copy if we can.
+ byte[] bytes = memoryStream.Length == memoryStream.Capacity ? memoryStream.GetBuffer() : memoryStream.ToArray();
+#endif
+ return AttachBytes(bytes);
+ }
+
+ ///
+ /// Constructs a from data in the given stream, asynchronously.
+ ///
+ /// If successful, will be read completely, from the position
+ /// at the start of the call.
+ /// The stream to copy into a ByteString.
+ /// The cancellation token to use when reading from the stream, if any.
+ /// A ByteString with content read from the given stream.
+ public static Task FromStreamAsync(Stream stream, CancellationToken cancellationToken = default)
+ {
+ ProtoPreconditions.CheckNotNull(stream, nameof(stream));
+ return ByteStringAsync.FromStreamAsyncCore(stream, cancellationToken);
+ }
+
+ ///
+ /// Constructs a from the given array. The contents
+ /// are copied, so further modifications to the array will not
+ /// be reflected in the returned ByteString.
+ /// This method can also be invoked in ByteString.CopyFrom(0xaa, 0xbb, ...) form
+ /// which is primarily useful for testing.
+ ///
+ public static ByteString CopyFrom(params byte[] bytes)
+ {
+ return new ByteString((byte[]) bytes.Clone());
+ }
+
+ ///
+ /// Constructs a from a portion of a byte array.
+ ///
+ public static ByteString CopyFrom(byte[] bytes, int offset, int count)
+ {
+ byte[] portion = new byte[count];
+ ByteArray.Copy(bytes, offset, portion, 0, count);
+ return new ByteString(portion);
+ }
+
+ ///
+ /// Constructs a from a read only span. The contents
+ /// are copied, so further modifications to the span will not
+ /// be reflected in the returned .
+ ///
+ public static ByteString CopyFrom(ReadOnlySpan bytes)
+ {
+ return new ByteString(bytes.ToArray());
+ }
+
+ ///
+ /// Creates a new by encoding the specified text with
+ /// the given encoding.
+ ///
+ public static ByteString CopyFrom(string text, Encoding encoding)
+ {
+ return new ByteString(encoding.GetBytes(text));
+ }
+
+ ///
+ /// Creates a new by encoding the specified text in UTF-8.
+ ///
+ public static ByteString CopyFromUtf8(string text)
+ {
+ return CopyFrom(text, Encoding.UTF8);
+ }
+
+ ///
+ /// Returns the byte at the given index.
+ ///
+ public byte this[int index]
+ {
+ get { return bytes.Span[index]; }
+ }
+
+ ///
+ /// Converts this into a string by applying the given encoding.
+ ///
+ ///
+ /// This method should only be used to convert binary data which was the result of encoding
+ /// text with the given encoding.
+ ///
+ /// The encoding to use to decode the binary data into text.
+ /// The result of decoding the binary data with the given decoding.
+ public string ToString(Encoding encoding)
+ {
+ if (MemoryMarshal.TryGetArray(bytes, out ArraySegment segment))
+ {
+ // Fast path. ByteString was created with an array.
+ return encoding.GetString(segment.Array, segment.Offset, segment.Count);
+ }
+ else
+ {
+ // Slow path. BytesString is not an array. Convert memory and pass result to GetString.
+ // TODO: Consider using GetString overload that takes a pointer.
+ byte[] array = bytes.ToArray();
+ return encoding.GetString(array, 0, array.Length);
+ }
+ }
+
+ ///
+ /// Converts this into a string by applying the UTF-8 encoding.
+ ///
+ ///
+ /// This method should only be used to convert binary data which was the result of encoding
+ /// text with UTF-8.
+ ///
+ /// The result of decoding the binary data with the given decoding.
+ public string ToStringUtf8()
+ {
+ return ToString(Encoding.UTF8);
+ }
+
+ ///
+ /// Returns an iterator over the bytes in this .
+ ///
+ /// An iterator over the bytes in this object.
+ [SecuritySafeCritical]
+ public IEnumerator GetEnumerator()
+ {
+ return MemoryMarshal.ToEnumerable(bytes).GetEnumerator();
+ }
+
+ ///
+ /// Returns an iterator over the bytes in this .
+ ///
+ /// An iterator over the bytes in this object.
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return GetEnumerator();
+ }
+
+ ///
+ /// Creates a CodedInputStream from this ByteString's data.
+ ///
+ public CodedInputStream CreateCodedInput()
+ {
+ // We trust CodedInputStream not to reveal the provided byte array or modify it
+ if (MemoryMarshal.TryGetArray(bytes, out ArraySegment segment) && segment.Count == bytes.Length)
+ {
+ // Fast path. ByteString was created with a complete array.
+ return new CodedInputStream(segment.Array, segment.Offset, segment.Count);
+ }
+ else
+ {
+ // Slow path. BytesString is not an array, or is a slice of an array.
+ // Convert memory and pass result to WriteRawBytes.
+ return new CodedInputStream(bytes.ToArray());
+ }
+ }
+
+ ///
+ /// Compares two byte strings for equality.
+ ///
+ /// The first byte string to compare.
+ /// The second byte string to compare.
+ /// true if the byte strings are equal; false otherwise.
+ public static bool operator ==(ByteString lhs, ByteString rhs)
+ {
+ if (ReferenceEquals(lhs, rhs))
+ {
+ return true;
+ }
+ if (lhs is null || rhs is null)
+ {
+ return false;
+ }
+
+ return lhs.bytes.Span.SequenceEqual(rhs.bytes.Span);
+ }
+
+ ///
+ /// Compares two byte strings for inequality.
+ ///
+ /// The first byte string to compare.
+ /// The second byte string to compare.
+ /// false if the byte strings are equal; true otherwise.
+ public static bool operator !=(ByteString lhs, ByteString rhs)
+ {
+ return !(lhs == rhs);
+ }
+
+ ///
+ /// Compares this byte string with another object.
+ ///
+ /// The object to compare this with.
+ /// true if refers to an equal ; false otherwise.
+ [SecuritySafeCritical]
+ public override bool Equals(object obj)
+ {
+ return this == (obj as ByteString);
+ }
+
+ ///
+ /// Returns a hash code for this object. Two equal byte strings
+ /// will return the same hash code.
+ ///
+ /// A hash code for this object.
+ [SecuritySafeCritical]
+ public override int GetHashCode()
+ {
+ ReadOnlySpan b = bytes.Span;
+
+ int ret = 23;
+ for (int i = 0; i < b.Length; i++)
+ {
+ ret = (ret * 31) + b[i];
+ }
+ return ret;
+ }
+
+ ///
+ /// Compares this byte string with another.
+ ///
+ /// The to compare this with.
+ /// true if refers to an equal byte string; false otherwise.
+ public bool Equals(ByteString other)
+ {
+ return this == other;
+ }
+
+ ///
+ /// Copies the entire byte array to the destination array provided at the offset specified.
+ ///
+ public void CopyTo(byte[] array, int position)
+ {
+ bytes.CopyTo(array.AsMemory(position));
+ }
+
+ ///
+ /// Writes the entire byte array to the provided stream
+ ///
+ public void WriteTo(Stream outputStream)
+ {
+ if (MemoryMarshal.TryGetArray(bytes, out ArraySegment segment))
+ {
+ // Fast path. ByteString was created with an array, so pass the underlying array.
+ outputStream.Write(segment.Array, segment.Offset, segment.Count);
+ }
+ else
+ {
+ // Slow path. BytesString is not an array. Convert memory and pass result to WriteRawBytes.
+ var array = bytes.ToArray();
+ outputStream.Write(array, 0, array.Length);
+ }
+ }
+
+ private sealed class ByteStringDebugView
+ {
+ private readonly ByteString data;
+
+ public ByteStringDebugView(ByteString data)
+ {
+ this.data = data;
+ }
+
+ [DebuggerBrowsable(DebuggerBrowsableState.RootHidden)]
+ public byte[] Items => data.bytes.ToArray();
+ }
+ }
+}
\ No newline at end of file
diff --git a/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/ByteString.cs.meta b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/ByteString.cs.meta
new file mode 100644
index 00000000..3890dc66
--- /dev/null
+++ b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/ByteString.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 3bb4b452d5f4add4695a43f8802bf056
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/ByteStringAsync.cs b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/ByteStringAsync.cs
new file mode 100644
index 00000000..ade9b8d2
--- /dev/null
+++ b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/ByteStringAsync.cs
@@ -0,0 +1,39 @@
+#region Copyright notice and license
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+//
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file or at
+// https://developers.google.com/open-source/licenses/bsd
+#endregion
+
+using System;
+using System.IO;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace Google.Protobuf
+{
+ ///
+ /// SecuritySafeCritical attribute can not be placed on types with async methods.
+ /// This class has ByteString's async methods so it can be marked with SecuritySafeCritical.
+ ///
+ internal static class ByteStringAsync
+ {
+ internal static async Task FromStreamAsyncCore(Stream stream, CancellationToken cancellationToken)
+ {
+ int capacity = stream.CanSeek ? checked((int)(stream.Length - stream.Position)) : 0;
+ var memoryStream = new MemoryStream(capacity);
+ // We have to specify the buffer size here, as there's no overload accepting the cancellation token
+ // alone. But it's documented to use 81920 by default if not specified.
+ await stream.CopyToAsync(memoryStream, 81920, cancellationToken);
+#if NETSTANDARD1_1
+ byte[] bytes = memoryStream.ToArray();
+#else
+ // Avoid an extra copy if we can.
+ byte[] bytes = memoryStream.Length == memoryStream.Capacity ? memoryStream.GetBuffer() : memoryStream.ToArray();
+#endif
+ return ByteString.AttachBytes(bytes);
+ }
+ }
+}
\ No newline at end of file
diff --git a/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/ByteStringAsync.cs.meta b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/ByteStringAsync.cs.meta
new file mode 100644
index 00000000..e93fd246
--- /dev/null
+++ b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/ByteStringAsync.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: af20324293fdab64597431aa3863202e
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/CodedInputStream.cs b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/CodedInputStream.cs
new file mode 100644
index 00000000..fd4414cb
--- /dev/null
+++ b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/CodedInputStream.cs
@@ -0,0 +1,686 @@
+#region Copyright notice and license
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+//
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file or at
+// https://developers.google.com/open-source/licenses/bsd
+#endregion
+
+using Google.Protobuf.Collections;
+using System;
+using System.IO;
+using System.Security;
+
+namespace Google.Protobuf
+{
+ ///
+ /// Reads and decodes protocol message fields.
+ ///
+ ///
+ ///
+ /// This class is generally used by generated code to read appropriate
+ /// primitives from the stream. It effectively encapsulates the lowest
+ /// levels of protocol buffer format.
+ ///
+ ///
+ /// Repeated fields and map fields are not handled by this class; use
+ /// and to serialize such fields.
+ ///
+ ///
+ [SecuritySafeCritical]
+ public sealed class CodedInputStream : IDisposable
+ {
+ ///
+ /// Whether to leave the underlying stream open when disposing of this stream.
+ /// This is always true when there's no stream.
+ ///
+ private bool leaveOpen;
+
+ ///
+ /// Buffer of data read from the stream or provided at construction time.
+ ///
+ private byte[] buffer;
+
+ ///
+ /// The stream to read further input from, or null if the byte array buffer was provided
+ /// directly on construction, with no further data available.
+ ///
+ private readonly Stream input;
+
+ ///
+ /// The parser state is kept separately so that other parse implementations can reuse the same
+ /// parsing primitives.
+ ///
+ private ParserInternalState state;
+
+ internal const int DefaultRecursionLimit = 100;
+ internal const int DefaultSizeLimit = Int32.MaxValue;
+ internal const int BufferSize = 4096;
+
+ #region Construction
+
+ public CodedInputStream()
+ {
+
+ }
+
+ // Note that the checks are performed such that we don't end up checking obviously-valid things
+ // like non-null references for arrays we've just created.
+
+ ///
+ /// Creates a new CodedInputStream reading data from the given byte array.
+ ///
+ public CodedInputStream(byte[] buffer) : this(null, ProtoPreconditions.CheckNotNull(buffer, "buffer"), 0, buffer.Length, true)
+ {
+ }
+
+ ///
+ /// Creates a new that reads from the given byte array slice.
+ ///
+ public CodedInputStream(byte[] buffer, int offset, int length)
+ : this(null, ProtoPreconditions.CheckNotNull(buffer, "buffer"), offset, offset + length, true)
+ {
+ if (offset < 0 || offset > buffer.Length)
+ {
+ throw new ArgumentOutOfRangeException("offset", "Offset must be within the buffer");
+ }
+ if (length < 0 || offset + length > buffer.Length)
+ {
+ throw new ArgumentOutOfRangeException("length", "Length must be non-negative and within the buffer");
+ }
+ }
+
+ ///
+ /// Creates a new reading data from the given stream, which will be disposed
+ /// when the returned object is disposed.
+ ///
+ /// The stream to read from.
+ public CodedInputStream(Stream input) : this(input, false)
+ {
+ }
+
+ ///
+ /// Creates a new reading data from the given stream.
+ ///
+ /// The stream to read from.
+ /// true to leave open when the returned
+ /// is disposed; false to dispose of the given stream when the
+ /// returned object is disposed.
+ public CodedInputStream(Stream input, bool leaveOpen)
+ : this(ProtoPreconditions.CheckNotNull(input, "input"), new byte[BufferSize], 0, 0, leaveOpen)
+ {
+ }
+
+ ///
+ /// Creates a new CodedInputStream reading data from the given
+ /// stream and buffer, using the default limits.
+ ///
+ internal CodedInputStream(Stream input, byte[] buffer, int bufferPos, int bufferSize, bool leaveOpen)
+ {
+ this.input = input;
+ this.buffer = buffer;
+ this.state.bufferPos = bufferPos;
+ this.state.bufferSize = bufferSize;
+ this.state.sizeLimit = DefaultSizeLimit;
+ this.state.recursionLimit = DefaultRecursionLimit;
+ SegmentedBufferHelper.Initialize(this, out this.state.segmentedBufferHelper);
+ this.leaveOpen = leaveOpen;
+
+ this.state.currentLimit = int.MaxValue;
+ }
+
+ ///
+ /// Creates a new CodedInputStream reading data from the given
+ /// stream and buffer, using the specified limits.
+ ///
+ ///
+ /// This chains to the version with the default limits instead of vice versa to avoid
+ /// having to check that the default values are valid every time.
+ ///
+ internal CodedInputStream(Stream input, byte[] buffer, int bufferPos, int bufferSize, int sizeLimit, int recursionLimit, bool leaveOpen)
+ : this(input, buffer, bufferPos, bufferSize, leaveOpen)
+ {
+ if (sizeLimit <= 0)
+ {
+ throw new ArgumentOutOfRangeException("sizeLimit", "Size limit must be positive");
+ }
+ if (recursionLimit <= 0)
+ {
+ throw new ArgumentOutOfRangeException("recursionLimit!", "Recursion limit must be positive");
+ }
+ this.state.sizeLimit = sizeLimit;
+ this.state.recursionLimit = recursionLimit;
+ }
+ #endregion
+
+ ///
+ /// Creates a with the specified size and recursion limits, reading
+ /// from an input stream.
+ ///
+ ///
+ /// This method exists separately from the constructor to reduce the number of constructor overloads.
+ /// It is likely to be used considerably less frequently than the constructors, as the default limits
+ /// are suitable for most use cases.
+ ///
+ /// The input stream to read from
+ /// The total limit of data to read from the stream.
+ /// The maximum recursion depth to allow while reading.
+ /// A CodedInputStream reading from with the specified size
+ /// and recursion limits.
+ public static CodedInputStream CreateWithLimits(Stream input, int sizeLimit, int recursionLimit)
+ {
+ // Note: we may want an overload accepting leaveOpen
+ return new CodedInputStream(input, new byte[BufferSize], 0, 0, sizeLimit, recursionLimit, false);
+ }
+
+ ///
+ /// Returns the current position in the input stream, or the position in the input buffer
+ ///
+ public long Position
+ {
+ get
+ {
+ if (input != null)
+ {
+ return input.Position - ((state.bufferSize + state.bufferSizeAfterLimit) - state.bufferPos);
+ }
+ return state.bufferPos;
+ }
+ }
+
+ ///
+ /// Returns the last tag read, or 0 if no tags have been read or we've read beyond
+ /// the end of the stream.
+ ///
+ internal uint LastTag { get { return state.lastTag; } }
+
+ ///
+ /// Returns the size limit for this stream.
+ ///
+ ///
+ /// This limit is applied when reading from the underlying stream, as a sanity check. It is
+ /// not applied when reading from a byte array data source without an underlying stream.
+ /// The default value is Int32.MaxValue.
+ ///
+ ///
+ /// The size limit.
+ ///
+ public int SizeLimit { get { return state.sizeLimit; } }
+
+ ///
+ /// Returns the recursion limit for this stream. This limit is applied whilst reading messages,
+ /// to avoid maliciously-recursive data.
+ ///
+ ///
+ /// The default limit is 100.
+ ///
+ ///
+ /// The recursion limit for this stream.
+ ///
+ public int RecursionLimit { get { return state.recursionLimit; } }
+
+ ///
+ /// Internal-only property; when set to true, unknown fields will be discarded while parsing.
+ ///
+ internal bool DiscardUnknownFields
+ {
+ get { return state.DiscardUnknownFields; }
+ set { state.DiscardUnknownFields = value; }
+ }
+
+ ///
+ /// Internal-only property; provides extension identifiers to compatible messages while parsing.
+ ///
+ internal ExtensionRegistry ExtensionRegistry
+ {
+ get { return state.ExtensionRegistry; }
+ set { state.ExtensionRegistry = value; }
+ }
+
+ internal byte[] InternalBuffer => buffer;
+
+ internal Stream InternalInputStream => input;
+
+ internal ref ParserInternalState InternalState => ref state;
+
+ ///
+ /// Disposes of this instance, potentially closing any underlying stream.
+ ///
+ ///
+ /// As there is no flushing to perform here, disposing of a which
+ /// was constructed with the leaveOpen option parameter set to true (or one which
+ /// was constructed to read from a byte array) has no effect.
+ ///
+ public void Dispose()
+ {
+ if (!leaveOpen)
+ {
+ input.Dispose();
+ }
+ }
+
+ #region Validation
+ ///
+ /// Verifies that the last call to ReadTag() returned tag 0 - in other words,
+ /// we've reached the end of the stream when we expected to.
+ ///
+ /// The
+ /// tag read was not the one specified
+ internal void CheckReadEndOfStreamTag()
+ {
+ ParsingPrimitivesMessages.CheckReadEndOfStreamTag(ref state);
+ }
+ #endregion
+
+ #region Reading of tags etc
+
+ ///
+ /// Peeks at the next field tag. This is like calling , but the
+ /// tag is not consumed. (So a subsequent call to will return the
+ /// same value.)
+ ///
+ public uint PeekTag()
+ {
+ var span = new ReadOnlySpan(buffer);
+ return ParsingPrimitives.PeekTag(ref span, ref state);
+ }
+
+ ///
+ /// Reads a field tag, returning the tag of 0 for "end of stream".
+ ///
+ ///
+ /// If this method returns 0, it doesn't necessarily mean the end of all
+ /// the data in this CodedInputStream; it may be the end of the logical stream
+ /// for an embedded message, for example.
+ ///
+ /// The next field tag, or 0 for end of stream. (0 is never a valid tag.)
+ public uint ReadTag()
+ {
+ var span = new ReadOnlySpan(buffer);
+ return ParsingPrimitives.ParseTag(ref span, ref state);
+ }
+
+ ///
+ /// Skips the data for the field with the tag we've just read.
+ /// This should be called directly after , when
+ /// the caller wishes to skip an unknown field.
+ ///
+ ///
+ /// This method throws if the last-read tag was an end-group tag.
+ /// If a caller wishes to skip a group, they should skip the whole group, by calling this method after reading the
+ /// start-group tag. This behavior allows callers to call this method on any field they don't understand, correctly
+ /// resulting in an error if an end-group tag has not been paired with an earlier start-group tag.
+ ///
+ /// The last tag was an end-group tag
+ /// The last read operation read to the end of the logical stream
+ public void SkipLastField()
+ {
+ var span = new ReadOnlySpan(buffer);
+ ParsingPrimitivesMessages.SkipLastField(ref span, ref state);
+ }
+
+ ///
+ /// Skip a group.
+ ///
+ internal void SkipGroup(uint startGroupTag)
+ {
+ var span = new ReadOnlySpan(buffer);
+ ParsingPrimitivesMessages.SkipGroup(ref span, ref state, startGroupTag);
+ }
+
+ ///
+ /// Reads a double field from the stream.
+ ///
+ public double ReadDouble()
+ {
+ var span = new ReadOnlySpan(buffer);
+ return ParsingPrimitives.ParseDouble(ref span, ref state);
+ }
+
+ ///
+ /// Reads a float field from the stream.
+ ///
+ public float ReadFloat()
+ {
+ var span = new ReadOnlySpan(buffer);
+ return ParsingPrimitives.ParseFloat(ref span, ref state);
+ }
+
+ ///
+ /// Reads a uint64 field from the stream.
+ ///
+ public ulong ReadUInt64()
+ {
+ return ReadRawVarint64();
+ }
+
+ ///
+ /// Reads an int64 field from the stream.
+ ///
+ public long ReadInt64()
+ {
+ return (long) ReadRawVarint64();
+ }
+
+ ///
+ /// Reads an int32 field from the stream.
+ ///
+ public int ReadInt32()
+ {
+ return (int) ReadRawVarint32();
+ }
+
+ ///
+ /// Reads a fixed64 field from the stream.
+ ///
+ public ulong ReadFixed64()
+ {
+ return ReadRawLittleEndian64();
+ }
+
+ ///
+ /// Reads a fixed32 field from the stream.
+ ///
+ public uint ReadFixed32()
+ {
+ return ReadRawLittleEndian32();
+ }
+
+ ///
+ /// Reads a bool field from the stream.
+ ///
+ public bool ReadBool()
+ {
+ return ReadRawVarint64() != 0;
+ }
+
+ ///
+ /// Reads a string field from the stream.
+ ///
+ public string ReadString()
+ {
+ var span = new ReadOnlySpan(buffer);
+ return ParsingPrimitives.ReadString(ref span, ref state);
+ }
+
+ ///
+ /// Reads an embedded message field value from the stream.
+ ///
+ public void ReadMessage(IMessage builder)
+ {
+ // TODO: if the message doesn't implement IBufferMessage (and thus does not provide the InternalMergeFrom method),
+ // what we're doing here works fine, but could be more efficient.
+ // What happens is that we first initialize a ParseContext from the current coded input stream only to parse the length of the message, at which point
+ // we will need to switch back again to CodedInputStream-based parsing (which involves copying and storing the state) to be able to
+ // invoke the legacy MergeFrom(CodedInputStream) method.
+ // For now, this inefficiency is fine, considering this is only a backward-compatibility scenario (and regenerating the code fixes it).
+ ParseContext.Initialize(buffer.AsSpan(), ref state, out ParseContext ctx);
+ try
+ {
+ ParsingPrimitivesMessages.ReadMessage(ref ctx, builder);
+ }
+ finally
+ {
+ ctx.CopyStateTo(this);
+ }
+ }
+
+ ///
+ /// Reads an embedded group field from the stream.
+ ///
+ public void ReadGroup(IMessage builder)
+ {
+ ParseContext.Initialize(this, out ParseContext ctx);
+ try
+ {
+ ParsingPrimitivesMessages.ReadGroup(ref ctx, builder);
+ }
+ finally
+ {
+ ctx.CopyStateTo(this);
+ }
+ }
+
+ ///
+ /// Reads a bytes field value from the stream.
+ ///
+ public ByteString ReadBytes()
+ {
+ var span = new ReadOnlySpan(buffer);
+ return ParsingPrimitives.ReadBytes(ref span, ref state);
+ }
+
+ ///
+ /// Reads a uint32 field value from the stream.
+ ///
+ public uint ReadUInt32()
+ {
+ return ReadRawVarint32();
+ }
+
+ ///
+ /// Reads an enum field value from the stream.
+ ///
+ public int ReadEnum()
+ {
+ // Currently just a pass-through, but it's nice to separate it logically from WriteInt32.
+ return (int) ReadRawVarint32();
+ }
+
+ ///
+ /// Reads an sfixed32 field value from the stream.
+ ///
+ public int ReadSFixed32()
+ {
+ return (int) ReadRawLittleEndian32();
+ }
+
+ ///
+ /// Reads an sfixed64 field value from the stream.
+ ///
+ public long ReadSFixed64()
+ {
+ return (long) ReadRawLittleEndian64();
+ }
+
+ ///
+ /// Reads an sint32 field value from the stream.
+ ///
+ public int ReadSInt32()
+ {
+ return ParsingPrimitives.DecodeZigZag32(ReadRawVarint32());
+ }
+
+ ///
+ /// Reads an sint64 field value from the stream.
+ ///
+ public long ReadSInt64()
+ {
+ return ParsingPrimitives.DecodeZigZag64(ReadRawVarint64());
+ }
+
+ ///
+ /// Reads a length for length-delimited data.
+ ///
+ ///
+ /// This is internally just reading a varint, but this method exists
+ /// to make the calling code clearer.
+ ///
+ public int ReadLength()
+ {
+ var span = new ReadOnlySpan(buffer);
+ return ParsingPrimitives.ParseLength(ref span, ref state);
+ }
+
+ ///
+ /// Peeks at the next tag in the stream. If it matches ,
+ /// the tag is consumed and the method returns true; otherwise, the
+ /// stream is left in the original position and the method returns false.
+ ///
+ public bool MaybeConsumeTag(uint tag)
+ {
+ var span = new ReadOnlySpan(buffer);
+ return ParsingPrimitives.MaybeConsumeTag(ref span, ref state, tag);
+ }
+
+#endregion
+
+ #region Underlying reading primitives
+
+ ///
+ /// Reads a raw Varint from the stream. If larger than 32 bits, discard the upper bits.
+ /// This method is optimised for the case where we've got lots of data in the buffer.
+ /// That means we can check the size just once, then just read directly from the buffer
+ /// without constant rechecking of the buffer length.
+ ///
+ internal uint ReadRawVarint32()
+ {
+ var span = new ReadOnlySpan(buffer);
+ return ParsingPrimitives.ParseRawVarint32(ref span, ref state);
+ }
+
+ ///
+ /// Reads a varint from the input one byte at a time, so that it does not
+ /// read any bytes after the end of the varint. If you simply wrapped the
+ /// stream in a CodedInputStream and used ReadRawVarint32(Stream)
+ /// then you would probably end up reading past the end of the varint since
+ /// CodedInputStream buffers its input.
+ ///
+ ///
+ ///
+ internal static uint ReadRawVarint32(Stream input)
+ {
+ return ParsingPrimitives.ReadRawVarint32(input);
+ }
+
+ ///
+ /// Reads a raw varint from the stream.
+ ///
+ internal ulong ReadRawVarint64()
+ {
+ var span = new ReadOnlySpan(buffer);
+ return ParsingPrimitives.ParseRawVarint64(ref span, ref state);
+ }
+
+ ///
+ /// Reads a 32-bit little-endian integer from the stream.
+ ///
+ internal uint ReadRawLittleEndian32()
+ {
+ var span = new ReadOnlySpan(buffer);
+ return ParsingPrimitives.ParseRawLittleEndian32(ref span, ref state);
+ }
+
+ ///
+ /// Reads a 64-bit little-endian integer from the stream.
+ ///
+ internal ulong ReadRawLittleEndian64()
+ {
+ var span = new ReadOnlySpan(buffer);
+ return ParsingPrimitives.ParseRawLittleEndian64(ref span, ref state);
+ }
+ #endregion
+
+ #region Internal reading and buffer management
+
+ ///
+ /// Sets currentLimit to (current position) + byteLimit. This is called
+ /// when descending into a length-delimited embedded message. The previous
+ /// limit is returned.
+ ///
+ /// The old limit.
+ internal int PushLimit(int byteLimit)
+ {
+ return SegmentedBufferHelper.PushLimit(ref state, byteLimit);
+ }
+
+ ///
+ /// Discards the current limit, returning the previous limit.
+ ///
+ internal void PopLimit(int oldLimit)
+ {
+ SegmentedBufferHelper.PopLimit(ref state, oldLimit);
+ }
+
+ ///
+ /// Returns whether or not all the data before the limit has been read.
+ ///
+ ///
+ internal bool ReachedLimit
+ {
+ get
+ {
+ return SegmentedBufferHelper.IsReachedLimit(ref state);
+ }
+ }
+
+ ///
+ /// Returns true if the stream has reached the end of the input. This is the
+ /// case if either the end of the underlying input source has been reached or
+ /// the stream has reached a limit created using PushLimit.
+ ///
+ public bool IsAtEnd
+ {
+ get
+ {
+ var span = new ReadOnlySpan(buffer);
+ return SegmentedBufferHelper.IsAtEnd(ref span, ref state);
+ }
+ }
+
+ ///
+ /// Reads a fixed size of bytes from the input.
+ ///
+ ///
+ /// the end of the stream or the current limit was reached
+ ///
+ internal byte[] ReadRawBytes(int size)
+ {
+ var span = new ReadOnlySpan(buffer);
+ return ParsingPrimitives.ReadRawBytes(ref span, ref state, size);
+ }
+
+ ///
+ /// Reads a top-level message or a nested message after the limits for this message have been pushed.
+ /// (parser will proceed until the end of the current limit)
+ /// NOTE: this method needs to be public because it's invoked by the generated code - e.g. msg.MergeFrom(CodedInputStream input) method
+ ///
+ public void ReadRawMessage(IMessage message)
+ {
+ ParseContext.Initialize(this, out ParseContext ctx);
+ try
+ {
+ ParsingPrimitivesMessages.ReadRawMessage(ref ctx, message);
+ }
+ finally
+ {
+ ctx.CopyStateTo(this);
+ }
+ }
+
+ internal void Reset(byte[] data, int offset, int length, bool discardUnknownFields, ExtensionRegistry registry)
+ {
+ var buffer = data;
+ var bufferPos = offset;
+ var bufferSize = offset + length;
+ var leaveOpen = true;
+
+ this.buffer = buffer;
+ this.state = default;
+
+ this.state.bufferPos = bufferPos;
+ this.state.bufferSize = bufferSize;
+ this.state.sizeLimit = DefaultSizeLimit;
+ this.state.recursionLimit = DefaultRecursionLimit;
+ SegmentedBufferHelper.Initialize(this, out this.state.segmentedBufferHelper);
+ this.leaveOpen = leaveOpen;
+
+ this.state.currentLimit = int.MaxValue;
+
+ this.DiscardUnknownFields = DiscardUnknownFields;
+ this.ExtensionRegistry = registry;
+ }
+ #endregion
+ }
+}
diff --git a/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/CodedInputStream.cs.meta b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/CodedInputStream.cs.meta
new file mode 100644
index 00000000..081f1b0a
--- /dev/null
+++ b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/CodedInputStream.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 6bd391df78eafba4a9c8c037ef9deb31
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/CodedOutputStream.ComputeSize.cs b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/CodedOutputStream.ComputeSize.cs
new file mode 100644
index 00000000..68ec1362
--- /dev/null
+++ b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/CodedOutputStream.ComputeSize.cs
@@ -0,0 +1,285 @@
+#region Copyright notice and license
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+//
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file or at
+// https://developers.google.com/open-source/licenses/bsd
+#endregion
+
+using System;
+
+namespace Google.Protobuf
+{
+ // This part of CodedOutputStream provides all the static entry points that are used
+ // by generated code and internally to compute the size of messages prior to being
+ // written to an instance of CodedOutputStream.
+ public sealed partial class CodedOutputStream
+ {
+ private const int LittleEndian64Size = 8;
+ private const int LittleEndian32Size = 4;
+
+ internal const int DoubleSize = LittleEndian64Size;
+ internal const int FloatSize = LittleEndian32Size;
+ internal const int BoolSize = 1;
+
+ ///
+ /// Computes the number of bytes that would be needed to encode a
+ /// double field, including the tag.
+ ///
+ public static int ComputeDoubleSize(double value)
+ {
+ return DoubleSize;
+ }
+
+ ///
+ /// Computes the number of bytes that would be needed to encode a
+ /// float field, including the tag.
+ ///
+ public static int ComputeFloatSize(float value)
+ {
+ return FloatSize;
+ }
+
+ ///
+ /// Computes the number of bytes that would be needed to encode a
+ /// uint64 field, including the tag.
+ ///
+ public static int ComputeUInt64Size(ulong value)
+ {
+ return ComputeRawVarint64Size(value);
+ }
+
+ ///
+ /// Computes the number of bytes that would be needed to encode an
+ /// int64 field, including the tag.
+ ///
+ public static int ComputeInt64Size(long value)
+ {
+ return ComputeRawVarint64Size((ulong) value);
+ }
+
+ ///
+ /// Computes the number of bytes that would be needed to encode an
+ /// int32 field, including the tag.
+ ///
+ public static int ComputeInt32Size(int value)
+ {
+ if (value >= 0)
+ {
+ return ComputeRawVarint32Size((uint) value);
+ }
+ else
+ {
+ // Must sign-extend.
+ return 10;
+ }
+ }
+
+ ///
+ /// Computes the number of bytes that would be needed to encode a
+ /// fixed64 field, including the tag.
+ ///
+ public static int ComputeFixed64Size(ulong value)
+ {
+ return LittleEndian64Size;
+ }
+
+ ///
+ /// Computes the number of bytes that would be needed to encode a
+ /// fixed32 field, including the tag.
+ ///
+ public static int ComputeFixed32Size(uint value)
+ {
+ return LittleEndian32Size;
+ }
+
+ ///
+ /// Computes the number of bytes that would be needed to encode a
+ /// bool field, including the tag.
+ ///
+ public static int ComputeBoolSize(bool value)
+ {
+ return BoolSize;
+ }
+
+ ///
+ /// Computes the number of bytes that would be needed to encode a
+ /// string field, including the tag.
+ ///
+ public static int ComputeStringSize(String value)
+ {
+ int byteArraySize = WritingPrimitives.Utf8Encoding.GetByteCount(value);
+ return ComputeLengthSize(byteArraySize) + byteArraySize;
+ }
+
+ ///
+ /// Computes the number of bytes that would be needed to encode a
+ /// group field, including the tag.
+ ///
+ public static int ComputeGroupSize(IMessage value)
+ {
+ return value.CalculateSize();
+ }
+
+ ///
+ /// Computes the number of bytes that would be needed to encode an
+ /// embedded message field, including the tag.
+ ///
+ public static int ComputeMessageSize(IMessage value)
+ {
+ int size = value.CalculateSize();
+ return ComputeLengthSize(size) + size;
+ }
+
+ ///
+ /// Computes the number of bytes that would be needed to encode a
+ /// bytes field, including the tag.
+ ///
+ public static int ComputeBytesSize(ByteString value)
+ {
+ return ComputeLengthSize(value.Length) + value.Length;
+ }
+
+ ///
+ /// Computes the number of bytes that would be needed to encode a
+ /// uint32 field, including the tag.
+ ///
+ public static int ComputeUInt32Size(uint value)
+ {
+ return ComputeRawVarint32Size(value);
+ }
+
+ ///
+ /// Computes the number of bytes that would be needed to encode a
+ /// enum field, including the tag. The caller is responsible for
+ /// converting the enum value to its numeric value.
+ ///
+ public static int ComputeEnumSize(int value)
+ {
+ // Currently just a pass-through, but it's nice to separate it logically.
+ return ComputeInt32Size(value);
+ }
+
+ ///
+ /// Computes the number of bytes that would be needed to encode an
+ /// sfixed32 field, including the tag.
+ ///
+ public static int ComputeSFixed32Size(int value)
+ {
+ return LittleEndian32Size;
+ }
+
+ ///
+ /// Computes the number of bytes that would be needed to encode an
+ /// sfixed64 field, including the tag.
+ ///
+ public static int ComputeSFixed64Size(long value)
+ {
+ return LittleEndian64Size;
+ }
+
+ ///
+ /// Computes the number of bytes that would be needed to encode an
+ /// sint32 field, including the tag.
+ ///
+ public static int ComputeSInt32Size(int value)
+ {
+ return ComputeRawVarint32Size(WritingPrimitives.EncodeZigZag32(value));
+ }
+
+ ///
+ /// Computes the number of bytes that would be needed to encode an
+ /// sint64 field, including the tag.
+ ///
+ public static int ComputeSInt64Size(long value)
+ {
+ return ComputeRawVarint64Size(WritingPrimitives.EncodeZigZag64(value));
+ }
+
+ ///
+ /// Computes the number of bytes that would be needed to encode a length,
+ /// as written by .
+ ///
+ public static int ComputeLengthSize(int length)
+ {
+ return ComputeRawVarint32Size((uint) length);
+ }
+
+ ///
+ /// Computes the number of bytes that would be needed to encode a varint.
+ ///
+ public static int ComputeRawVarint32Size(uint value)
+ {
+ if ((value & (0xffffffff << 7)) == 0)
+ {
+ return 1;
+ }
+ if ((value & (0xffffffff << 14)) == 0)
+ {
+ return 2;
+ }
+ if ((value & (0xffffffff << 21)) == 0)
+ {
+ return 3;
+ }
+ if ((value & (0xffffffff << 28)) == 0)
+ {
+ return 4;
+ }
+ return 5;
+ }
+
+ ///
+ /// Computes the number of bytes that would be needed to encode a varint.
+ ///
+ public static int ComputeRawVarint64Size(ulong value)
+ {
+ if ((value & (0xffffffffffffffffL << 7)) == 0)
+ {
+ return 1;
+ }
+ if ((value & (0xffffffffffffffffL << 14)) == 0)
+ {
+ return 2;
+ }
+ if ((value & (0xffffffffffffffffL << 21)) == 0)
+ {
+ return 3;
+ }
+ if ((value & (0xffffffffffffffffL << 28)) == 0)
+ {
+ return 4;
+ }
+ if ((value & (0xffffffffffffffffL << 35)) == 0)
+ {
+ return 5;
+ }
+ if ((value & (0xffffffffffffffffL << 42)) == 0)
+ {
+ return 6;
+ }
+ if ((value & (0xffffffffffffffffL << 49)) == 0)
+ {
+ return 7;
+ }
+ if ((value & (0xffffffffffffffffL << 56)) == 0)
+ {
+ return 8;
+ }
+ if ((value & (0xffffffffffffffffL << 63)) == 0)
+ {
+ return 9;
+ }
+ return 10;
+ }
+
+ ///
+ /// Computes the number of bytes that would be needed to encode a tag.
+ ///
+ public static int ComputeTagSize(int fieldNumber)
+ {
+ return ComputeRawVarint32Size(WireFormat.MakeTag(fieldNumber, 0));
+ }
+ }
+}
\ No newline at end of file
diff --git a/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/CodedOutputStream.ComputeSize.cs.meta b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/CodedOutputStream.ComputeSize.cs.meta
new file mode 100644
index 00000000..c998f0d0
--- /dev/null
+++ b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/CodedOutputStream.ComputeSize.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 8f24c14bfc2490f47bc214729d14cd79
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/CodedOutputStream.cs b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/CodedOutputStream.cs
new file mode 100644
index 00000000..85586d23
--- /dev/null
+++ b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/CodedOutputStream.cs
@@ -0,0 +1,609 @@
+#region Copyright notice and license
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+//
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file or at
+// https://developers.google.com/open-source/licenses/bsd
+#endregion
+
+using System;
+using System.IO;
+using System.Security;
+
+namespace Google.Protobuf
+{
+ ///
+ /// Encodes and writes protocol message fields.
+ ///
+ ///
+ ///
+ /// This class is generally used by generated code to write appropriate
+ /// primitives to the stream. It effectively encapsulates the lowest
+ /// levels of protocol buffer format. Unlike some other implementations,
+ /// this does not include combined "write tag and value" methods. Generated
+ /// code knows the exact byte representations of the tags they're going to write,
+ /// so there's no need to re-encode them each time. Manually-written code calling
+ /// this class should just call one of the WriteTag overloads before each value.
+ ///
+ ///
+ /// Repeated fields and map fields are not handled by this class; use RepeatedField<T>
+ /// and MapField<TKey, TValue> to serialize such fields.
+ ///
+ ///
+ [SecuritySafeCritical]
+ public sealed partial class CodedOutputStream : IDisposable
+ {
+ ///
+ /// The buffer size used by CreateInstance(Stream).
+ ///
+ public static readonly int DefaultBufferSize = 4096;
+
+ private readonly bool leaveOpen;
+ private readonly byte[] buffer;
+ private WriterInternalState state;
+
+ private readonly Stream output;
+
+ #region Construction
+ ///
+ /// Creates a new CodedOutputStream that writes directly to the given
+ /// byte array. If more bytes are written than fit in the array,
+ /// OutOfSpaceException will be thrown.
+ ///
+ public CodedOutputStream(byte[] flatArray) : this(flatArray, 0, flatArray.Length)
+ {
+ }
+
+ ///
+ /// Creates a new CodedOutputStream that writes directly to the given
+ /// byte array slice. If more bytes are written than fit in the array,
+ /// OutOfSpaceException will be thrown.
+ ///
+ private CodedOutputStream(byte[] buffer, int offset, int length)
+ {
+ this.output = null;
+ this.buffer = ProtoPreconditions.CheckNotNull(buffer, nameof(buffer));
+ this.state.position = offset;
+ this.state.limit = offset + length;
+ WriteBufferHelper.Initialize(this, out this.state.writeBufferHelper);
+ leaveOpen = true; // Simple way of avoiding trying to dispose of a null reference
+ }
+
+ private CodedOutputStream(Stream output, byte[] buffer, bool leaveOpen)
+ {
+ this.output = ProtoPreconditions.CheckNotNull(output, nameof(output));
+ this.buffer = buffer;
+ this.state.position = 0;
+ this.state.limit = buffer.Length;
+ WriteBufferHelper.Initialize(this, out this.state.writeBufferHelper);
+ this.leaveOpen = leaveOpen;
+ }
+
+ ///
+ /// Creates a new which write to the given stream, and disposes of that
+ /// stream when the returned CodedOutputStream is disposed.
+ ///
+ /// The stream to write to. It will be disposed when the returned CodedOutputStream is disposed.
+ public CodedOutputStream(Stream output) : this(output, DefaultBufferSize, false)
+ {
+ }
+
+ ///
+ /// Creates a new CodedOutputStream which write to the given stream and uses
+ /// the specified buffer size.
+ ///
+ /// The stream to write to. It will be disposed when the returned CodedOutputStream is disposed.
+ /// The size of buffer to use internally.
+ public CodedOutputStream(Stream output, int bufferSize) : this(output, new byte[bufferSize], false)
+ {
+ }
+
+ ///
+ /// Creates a new CodedOutputStream which write to the given stream.
+ ///
+ /// The stream to write to.
+ /// If true, is left open when the returned CodedOutputStream is disposed;
+ /// if false, the provided stream is disposed as well.
+ public CodedOutputStream(Stream output, bool leaveOpen) : this(output, DefaultBufferSize, leaveOpen)
+ {
+ }
+
+ ///
+ /// Creates a new CodedOutputStream which write to the given stream and uses
+ /// the specified buffer size.
+ ///
+ /// The stream to write to.
+ /// The size of buffer to use internally.
+ /// If true, is left open when the returned CodedOutputStream is disposed;
+ /// if false, the provided stream is disposed as well.
+ public CodedOutputStream(Stream output, int bufferSize, bool leaveOpen) : this(output, new byte[bufferSize], leaveOpen)
+ {
+ }
+ #endregion
+
+ ///
+ /// Returns the current position in the stream, or the position in the output buffer
+ ///
+ public long Position
+ {
+ get
+ {
+ if (output != null)
+ {
+ return output.Position + state.position;
+ }
+ return state.position;
+ }
+ }
+
+ ///
+ /// Configures whether or not serialization is deterministic.
+ ///
+ ///
+ /// Deterministic serialization guarantees that for a given binary, equal messages (defined by the
+ /// equals methods in protos) will always be serialized to the same bytes. This implies:
+ ///
+ /// - Repeated serialization of a message will return the same bytes.
+ /// - Different processes of the same binary (which may be executing on different machines)
+ /// will serialize equal messages to the same bytes.
+ ///
+ /// Note the deterministic serialization is NOT canonical across languages; it is also unstable
+ /// across different builds with schema changes due to unknown fields. Users who need canonical
+ /// serialization, e.g. persistent storage in a canonical form, fingerprinting, etc, should define
+ /// their own canonicalization specification and implement the serializer using reflection APIs
+ /// rather than relying on this API.
+ /// Once set, the serializer will: (Note this is an implementation detail and may subject to
+ /// change in the future)
+ ///
+ /// - Sort map entries by keys in lexicographical order or numerical order. Note: For string
+ /// keys, the order is based on comparing the UTF-16 code unit value of each character in the strings.
+ /// The order may be different from the deterministic serialization in other languages where
+ /// maps are sorted on the lexicographical order of the UTF8 encoded keys.
+ ///
+ ///
+ public bool Deterministic { get; set; }
+
+ #region Writing of values (not including tags)
+
+ ///
+ /// Writes a double field value, without a tag, to the stream.
+ ///
+ /// The value to write
+ public void WriteDouble(double value)
+ {
+ var span = new Span(buffer);
+ WritingPrimitives.WriteDouble(ref span, ref state, value);
+ }
+
+ ///
+ /// Writes a float field value, without a tag, to the stream.
+ ///
+ /// The value to write
+ public void WriteFloat(float value)
+ {
+ var span = new Span(buffer);
+ WritingPrimitives.WriteFloat(ref span, ref state, value);
+ }
+
+ ///
+ /// Writes a uint64 field value, without a tag, to the stream.
+ ///
+ /// The value to write
+ public void WriteUInt64(ulong value)
+ {
+ var span = new Span(buffer);
+ WritingPrimitives.WriteUInt64(ref span, ref state, value);
+ }
+
+ ///
+ /// Writes an int64 field value, without a tag, to the stream.
+ ///
+ /// The value to write
+ public void WriteInt64(long value)
+ {
+ var span = new Span(buffer);
+ WritingPrimitives.WriteInt64(ref span, ref state, value);
+ }
+
+ ///
+ /// Writes an int32 field value, without a tag, to the stream.
+ ///
+ /// The value to write
+ public void WriteInt32(int value)
+ {
+ var span = new Span(buffer);
+ WritingPrimitives.WriteInt32(ref span, ref state, value);
+ }
+
+ ///
+ /// Writes a fixed64 field value, without a tag, to the stream.
+ ///
+ /// The value to write
+ public void WriteFixed64(ulong value)
+ {
+ var span = new Span(buffer);
+ WritingPrimitives.WriteFixed64(ref span, ref state, value);
+ }
+
+ ///
+ /// Writes a fixed32 field value, without a tag, to the stream.
+ ///
+ /// The value to write
+ public void WriteFixed32(uint value)
+ {
+ var span = new Span(buffer);
+ WritingPrimitives.WriteFixed32(ref span, ref state, value);
+ }
+
+ ///
+ /// Writes a bool field value, without a tag, to the stream.
+ ///
+ /// The value to write
+ public void WriteBool(bool value)
+ {
+ var span = new Span(buffer);
+ WritingPrimitives.WriteBool(ref span, ref state, value);
+ }
+
+ ///
+ /// Writes a string field value, without a tag, to the stream.
+ /// The data is length-prefixed.
+ ///
+ /// The value to write
+ public void WriteString(string value)
+ {
+ var span = new Span(buffer);
+ WritingPrimitives.WriteString(ref span, ref state, value);
+ }
+
+ ///
+ /// Writes a message, without a tag, to the stream.
+ /// The data is length-prefixed.
+ ///
+ /// The value to write
+ public void WriteMessage(IMessage value)
+ {
+ // TODO: if the message doesn't implement IBufferMessage (and thus does not provide the InternalWriteTo method),
+ // what we're doing here works fine, but could be more efficient.
+ // For now, this inefficiency is fine, considering this is only a backward-compatibility scenario (and regenerating the code fixes it).
+ var span = new Span(buffer);
+ WriteContext.Initialize(ref span, ref state, out WriteContext ctx);
+ try
+ {
+ WritingPrimitivesMessages.WriteMessage(ref ctx, value);
+ }
+ finally
+ {
+ ctx.CopyStateTo(this);
+ }
+ }
+
+ ///
+ /// Writes a message, without a tag, to the stream.
+ /// Only the message data is written, without a length-delimiter.
+ ///
+ /// The value to write
+ public void WriteRawMessage(IMessage value)
+ {
+ // TODO: if the message doesn't implement IBufferMessage (and thus does not provide the InternalWriteTo method),
+ // what we're doing here works fine, but could be more efficient.
+ // For now, this inefficiency is fine, considering this is only a backward-compatibility scenario (and regenerating the code fixes it).
+ var span = new Span(buffer);
+ WriteContext.Initialize(ref span, ref state, out WriteContext ctx);
+ try
+ {
+ WritingPrimitivesMessages.WriteRawMessage(ref ctx, value);
+ }
+ finally
+ {
+ ctx.CopyStateTo(this);
+ }
+ }
+
+ ///
+ /// Writes a group, without a tag, to the stream.
+ ///
+ /// The value to write
+ public void WriteGroup(IMessage value)
+ {
+ var span = new Span(buffer);
+ WriteContext.Initialize(ref span, ref state, out WriteContext ctx);
+ try
+ {
+ WritingPrimitivesMessages.WriteGroup(ref ctx, value);
+ }
+ finally
+ {
+ ctx.CopyStateTo(this);
+ }
+ }
+
+ ///
+ /// Write a byte string, without a tag, to the stream.
+ /// The data is length-prefixed.
+ ///
+ /// The value to write
+ public void WriteBytes(ByteString value)
+ {
+ var span = new Span(buffer);
+ WritingPrimitives.WriteBytes(ref span, ref state, value);
+ }
+
+ ///
+ /// Writes a uint32 value, without a tag, to the stream.
+ ///
+ /// The value to write
+ public void WriteUInt32(uint value)
+ {
+ var span = new Span(buffer);
+ WritingPrimitives.WriteUInt32(ref span, ref state, value);
+ }
+
+ ///
+ /// Writes an enum value, without a tag, to the stream.
+ ///
+ /// The value to write
+ public void WriteEnum(int value)
+ {
+ var span = new Span(buffer);
+ WritingPrimitives.WriteEnum(ref span, ref state, value);
+ }
+
+ ///
+ /// Writes an sfixed32 value, without a tag, to the stream.
+ ///
+ /// The value to write.
+ public void WriteSFixed32(int value)
+ {
+ var span = new Span(buffer);
+ WritingPrimitives.WriteSFixed32(ref span, ref state, value);
+ }
+
+ ///
+ /// Writes an sfixed64 value, without a tag, to the stream.
+ ///
+ /// The value to write
+ public void WriteSFixed64(long value)
+ {
+ var span = new Span(buffer);
+ WritingPrimitives.WriteSFixed64(ref span, ref state, value);
+ }
+
+ ///
+ /// Writes an sint32 value, without a tag, to the stream.
+ ///
+ /// The value to write
+ public void WriteSInt32(int value)
+ {
+ var span = new Span(buffer);
+ WritingPrimitives.WriteSInt32(ref span, ref state, value);
+ }
+
+ ///
+ /// Writes an sint64 value, without a tag, to the stream.
+ ///
+ /// The value to write
+ public void WriteSInt64(long value)
+ {
+ var span = new Span(buffer);
+ WritingPrimitives.WriteSInt64(ref span, ref state, value);
+ }
+
+ ///
+ /// Writes a length (in bytes) for length-delimited data.
+ ///
+ ///
+ /// This method simply writes a rawint, but exists for clarity in calling code.
+ ///
+ /// Length value, in bytes.
+ public void WriteLength(int length)
+ {
+ var span = new Span(buffer);
+ WritingPrimitives.WriteLength(ref span, ref state, length);
+ }
+
+ #endregion
+
+ #region Raw tag writing
+ ///
+ /// Encodes and writes a tag.
+ ///
+ /// The number of the field to write the tag for
+ /// The wire format type of the tag to write
+ public void WriteTag(int fieldNumber, WireFormat.WireType type)
+ {
+ var span = new Span(buffer);
+ WritingPrimitives.WriteTag(ref span, ref state, fieldNumber, type);
+ }
+
+ ///
+ /// Writes an already-encoded tag.
+ ///
+ /// The encoded tag
+ public void WriteTag(uint tag)
+ {
+ var span = new Span(buffer);
+ WritingPrimitives.WriteTag(ref span, ref state, tag);
+ }
+
+ ///
+ /// Writes the given single-byte tag directly to the stream.
+ ///
+ /// The encoded tag
+ public void WriteRawTag(byte b1)
+ {
+ var span = new Span(buffer);
+ WritingPrimitives.WriteRawTag(ref span, ref state, b1);
+ }
+
+ ///
+ /// Writes the given two-byte tag directly to the stream.
+ ///
+ /// The first byte of the encoded tag
+ /// The second byte of the encoded tag
+ public void WriteRawTag(byte b1, byte b2)
+ {
+ var span = new Span(buffer);
+ WritingPrimitives.WriteRawTag(ref span, ref state, b1, b2);
+ }
+
+ ///
+ /// Writes the given three-byte tag directly to the stream.
+ ///
+ /// The first byte of the encoded tag
+ /// The second byte of the encoded tag
+ /// The third byte of the encoded tag
+ public void WriteRawTag(byte b1, byte b2, byte b3)
+ {
+ var span = new Span(buffer);
+ WritingPrimitives.WriteRawTag(ref span, ref state, b1, b2, b3);
+ }
+
+ ///
+ /// Writes the given four-byte tag directly to the stream.
+ ///
+ /// The first byte of the encoded tag
+ /// The second byte of the encoded tag
+ /// The third byte of the encoded tag
+ /// The fourth byte of the encoded tag
+ public void WriteRawTag(byte b1, byte b2, byte b3, byte b4)
+ {
+ var span = new Span(buffer);
+ WritingPrimitives.WriteRawTag(ref span, ref state, b1, b2, b3, b4);
+ }
+
+ ///
+ /// Writes the given five-byte tag directly to the stream.
+ ///
+ /// The first byte of the encoded tag
+ /// The second byte of the encoded tag
+ /// The third byte of the encoded tag
+ /// The fourth byte of the encoded tag
+ /// The fifth byte of the encoded tag
+ public void WriteRawTag(byte b1, byte b2, byte b3, byte b4, byte b5)
+ {
+ var span = new Span(buffer);
+ WritingPrimitives.WriteRawTag(ref span, ref state, b1, b2, b3, b4, b5);
+ }
+ #endregion
+
+ #region Underlying writing primitives
+
+ ///
+ /// Writes a 32 bit value as a varint. The fast route is taken when
+ /// there's enough buffer space left to whizz through without checking
+ /// for each byte; otherwise, we resort to calling WriteRawByte each time.
+ ///
+ internal void WriteRawVarint32(uint value)
+ {
+ var span = new Span(buffer);
+ WritingPrimitives.WriteRawVarint32(ref span, ref state, value);
+ }
+
+ internal void WriteRawVarint64(ulong value)
+ {
+ var span = new Span(buffer);
+ WritingPrimitives.WriteRawVarint64(ref span, ref state, value);
+ }
+
+ internal void WriteRawLittleEndian32(uint value)
+ {
+ var span = new Span(buffer);
+ WritingPrimitives.WriteRawLittleEndian32(ref span, ref state, value);
+ }
+
+ internal void WriteRawLittleEndian64(ulong value)
+ {
+ var span = new Span(buffer);
+ WritingPrimitives.WriteRawLittleEndian64(ref span, ref state, value);
+ }
+
+ ///
+ /// Writes out an array of bytes.
+ ///
+ internal void WriteRawBytes(byte[] value)
+ {
+ WriteRawBytes(value, 0, value.Length);
+ }
+
+ ///
+ /// Writes out part of an array of bytes.
+ ///
+ internal void WriteRawBytes(byte[] value, int offset, int length)
+ {
+ var span = new Span(buffer);
+ WritingPrimitives.WriteRawBytes(ref span, ref state, value, offset, length);
+ }
+
+ #endregion
+
+ ///
+ /// Indicates that a CodedOutputStream wrapping a flat byte array
+ /// ran out of space.
+ ///
+ public sealed class OutOfSpaceException : IOException
+ {
+ internal OutOfSpaceException()
+ : base("CodedOutputStream was writing to a flat byte array and ran out of space.")
+ {
+ }
+ }
+
+ ///
+ /// Flushes any buffered data and optionally closes the underlying stream, if any.
+ ///
+ ///
+ ///
+ /// By default, any underlying stream is closed by this method. To configure this behaviour,
+ /// use a constructor overload with a leaveOpen parameter. If this instance does not
+ /// have an underlying stream, this method does nothing.
+ ///
+ ///
+ /// For the sake of efficiency, calling this method does not prevent future write calls - but
+ /// if a later write ends up writing to a stream which has been disposed, that is likely to
+ /// fail. It is recommend that you not call any other methods after this.
+ ///
+ ///
+ public void Dispose()
+ {
+ Flush();
+ if (!leaveOpen)
+ {
+ output.Dispose();
+ }
+ }
+
+ ///
+ /// Flushes any buffered data to the underlying stream (if there is one).
+ ///
+ public void Flush()
+ {
+ var span = new Span(buffer);
+ WriteBufferHelper.Flush(ref span, ref state);
+ }
+
+ ///
+ /// Verifies that SpaceLeft returns zero. It's common to create a byte array
+ /// that is exactly big enough to hold a message, then write to it with
+ /// a CodedOutputStream. Calling CheckNoSpaceLeft after writing verifies that
+ /// the message was actually as big as expected, which can help finding bugs.
+ ///
+ public void CheckNoSpaceLeft()
+ {
+ WriteBufferHelper.CheckNoSpaceLeft(ref state);
+ }
+
+ ///
+ /// If writing to a flat array, returns the space left in the array. Otherwise,
+ /// throws an InvalidOperationException.
+ ///
+ public int SpaceLeft => WriteBufferHelper.GetSpaceLeft(ref state);
+
+ internal byte[] InternalBuffer => buffer;
+
+ internal Stream InternalOutputStream => output;
+
+ internal ref WriterInternalState InternalState => ref state;
+ }
+}
diff --git a/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/CodedOutputStream.cs.meta b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/CodedOutputStream.cs.meta
new file mode 100644
index 00000000..d2f31445
--- /dev/null
+++ b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/CodedOutputStream.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 79ad02c5589e31e49a8c14beb07d8e01
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Collections.meta b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Collections.meta
new file mode 100644
index 00000000..18b85b25
--- /dev/null
+++ b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Collections.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 011bc81dfcaad4e4f93d75625e1fb321
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Collections/Lists.cs b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Collections/Lists.cs
new file mode 100644
index 00000000..149aeac7
--- /dev/null
+++ b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Collections/Lists.cs
@@ -0,0 +1,65 @@
+#region Copyright notice and license
+// Protocol Buffers - Google's data interchange format
+// Copyright 2017 Google Inc. All rights reserved.
+//
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file or at
+// https://developers.google.com/open-source/licenses/bsd
+#endregion
+
+using System.Collections.Generic;
+
+namespace Google.Protobuf.Collections
+{
+ ///
+ /// Utility to compare if two Lists are the same, and the hash code
+ /// of a List.
+ ///
+ public static class Lists
+ {
+ ///
+ /// Checks if two lists are equal.
+ ///
+ public static bool Equals(List left, List right)
+ {
+ if (left == right)
+ {
+ return true;
+ }
+ if (left == null || right == null)
+ {
+ return false;
+ }
+ if (left.Count != right.Count)
+ {
+ return false;
+ }
+ IEqualityComparer comparer = EqualityComparer.Default;
+ for (int i = 0; i < left.Count; i++)
+ {
+ if (!comparer.Equals(left[i], right[i]))
+ {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ ///
+ /// Gets the list's hash code.
+ ///
+ public static int GetHashCode(List list)
+ {
+ if (list == null)
+ {
+ return 0;
+ }
+ int hash = 31;
+ foreach (T element in list)
+ {
+ hash = hash * 29 + element.GetHashCode();
+ }
+ return hash;
+ }
+ }
+}
\ No newline at end of file
diff --git a/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Collections/Lists.cs.meta b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Collections/Lists.cs.meta
new file mode 100644
index 00000000..1b0d4dde
--- /dev/null
+++ b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Collections/Lists.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 59a79b6bbb50cdd4f8af299a4f934b58
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Collections/MapField.cs b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Collections/MapField.cs
new file mode 100644
index 00000000..722cc923
--- /dev/null
+++ b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Collections/MapField.cs
@@ -0,0 +1,737 @@
+#region Copyright notice and license
+// Protocol Buffers - Google's data interchange format
+// Copyright 2015 Google Inc. All rights reserved.
+//
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file or at
+// https://developers.google.com/open-source/licenses/bsd
+#endregion
+
+using Google.Protobuf.Compatibility;
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.IO;
+using System.Linq;
+using System.Security;
+
+namespace Google.Protobuf.Collections
+{
+ ///
+ /// Representation of a map field in a Protocol Buffer message.
+ ///
+ /// Key type in the map. Must be a type supported by Protocol Buffer map keys.
+ /// Value type in the map. Must be a type supported by Protocol Buffers.
+ ///
+ ///
+ /// For string keys, the equality comparison is provided by .
+ ///
+ ///
+ /// Null values are not permitted in the map, either for wrapper types or regular messages.
+ /// If a map is deserialized from a data stream and the value is missing from an entry, a default value
+ /// is created instead. For primitive types, that is the regular default value (0, the empty string and so
+ /// on); for message types, an empty instance of the message is created, as if the map entry contained a 0-length
+ /// encoded value for the field.
+ ///
+ ///
+ /// This implementation does not generally prohibit the use of key/value types which are not
+ /// supported by Protocol Buffers (e.g. using a key type of byte) but nor does it guarantee
+ /// that all operations will work in such cases.
+ ///
+ ///
+ /// The order in which entries are returned when iterating over this object is undefined, and may change
+ /// in future versions.
+ ///
+ ///
+ [DebuggerDisplay("Count = {Count}")]
+ [DebuggerTypeProxy(typeof(MapField<,>.MapFieldDebugView))]
+ public sealed class MapField : IDeepCloneable>, IDictionary, IEquatable>, IDictionary, IReadOnlyDictionary
+ {
+ private static readonly EqualityComparer ValueEqualityComparer = ProtobufEqualityComparers.GetEqualityComparer();
+ private static readonly EqualityComparer KeyEqualityComparer = ProtobufEqualityComparers.GetEqualityComparer();
+
+ // TODO: Don't create the map/list until we have an entry. (Assume many maps will be empty.)
+ private readonly Dictionary>> map = new(KeyEqualityComparer);
+ private readonly LinkedList> list = new();
+
+ ///
+ /// Creates a deep clone of this object.
+ ///
+ ///
+ /// A deep clone of this object.
+ ///
+ public MapField Clone()
+ {
+ var clone = new MapField();
+ // Keys are never cloneable. Values might be.
+ if (typeof(IDeepCloneable).IsAssignableFrom(typeof(TValue)))
+ {
+ foreach (var pair in list)
+ {
+ clone.Add(pair.Key, ((IDeepCloneable)pair.Value).Clone());
+ }
+ }
+ else
+ {
+ // Nothing is cloneable, so we don't need to worry.
+ clone.Add(this);
+ }
+ return clone;
+ }
+
+ ///
+ /// Adds the specified key/value pair to the map.
+ ///
+ ///
+ /// This operation fails if the key already exists in the map. To replace an existing entry, use the indexer.
+ ///
+ /// The key to add
+ /// The value to add.
+ /// The given key already exists in map.
+ public void Add(TKey key, TValue value)
+ {
+ // Validation of arguments happens in ContainsKey and the indexer
+ if (ContainsKey(key))
+ {
+ throw new ArgumentException("Key already exists in map", nameof(key));
+ }
+ this[key] = value;
+ }
+
+ ///
+ /// Determines whether the specified key is present in the map.
+ ///
+ /// The key to check.
+ /// true if the map contains the given key; false otherwise.
+ public bool ContainsKey(TKey key)
+ {
+ ProtoPreconditions.CheckNotNullUnconstrained(key, nameof(key));
+ return map.ContainsKey(key);
+ }
+
+ private bool ContainsValue(TValue value) =>
+ list.Any(pair => ValueEqualityComparer.Equals(pair.Value, value));
+
+ ///
+ /// Removes the entry identified by the given key from the map.
+ ///
+ /// The key indicating the entry to remove from the map.
+ /// true if the map contained the given key before the entry was removed; false otherwise.
+ public bool Remove(TKey key)
+ {
+ ProtoPreconditions.CheckNotNullUnconstrained(key, nameof(key));
+ if (map.TryGetValue(key, out LinkedListNode> node))
+ {
+ map.Remove(key);
+ node.List.Remove(node);
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+ ///
+ /// Gets the value associated with the specified key.
+ ///
+ /// The key whose value to get.
+ /// When this method returns, the value associated with the specified key, if the key is found;
+ /// otherwise, the default value for the type of the parameter.
+ /// This parameter is passed uninitialized.
+ /// true if the map contains an element with the specified key; otherwise, false.
+ public bool TryGetValue(TKey key, out TValue value)
+ {
+ if (map.TryGetValue(key, out LinkedListNode> node))
+ {
+ value = node.Value.Value;
+ return true;
+ }
+ else
+ {
+ value = default;
+ return false;
+ }
+ }
+
+ ///
+ /// Gets or sets the value associated with the specified key.
+ ///
+ /// The key of the value to get or set.
+ /// The property is retrieved and key does not exist in the collection.
+ /// The value associated with the specified key. If the specified key is not found,
+ /// a get operation throws a , and a set operation creates a new element with the specified key.
+ public TValue this[TKey key]
+ {
+ get
+ {
+ ProtoPreconditions.CheckNotNullUnconstrained(key, nameof(key));
+ if (TryGetValue(key, out TValue value))
+ {
+ return value;
+ }
+ throw new KeyNotFoundException();
+ }
+ set
+ {
+ ProtoPreconditions.CheckNotNullUnconstrained(key, nameof(key));
+ // value == null check here is redundant, but avoids boxing.
+ if (value == null)
+ {
+ ProtoPreconditions.CheckNotNullUnconstrained(value, nameof(value));
+ }
+ var pair = new KeyValuePair(key, value);
+ if (map.TryGetValue(key, out LinkedListNode> node))
+ {
+ node.Value = pair;
+ }
+ else
+ {
+ node = list.AddLast(pair);
+ map[key] = node;
+ }
+ }
+ }
+
+ ///
+ /// Gets a collection containing the keys in the map.
+ ///
+ public ICollection Keys => new MapView(this, pair => pair.Key, ContainsKey);
+
+ ///
+ /// Gets a collection containing the values in the map.
+ ///
+ public ICollection Values => new MapView(this, pair => pair.Value, ContainsValue);
+
+ ///
+ /// Adds the specified entries to the map. The keys and values are not automatically cloned.
+ ///
+ /// The entries to add to the map.
+ public void Add(IDictionary entries)
+ {
+ ProtoPreconditions.CheckNotNull(entries, nameof(entries));
+ foreach (var pair in entries)
+ {
+ Add(pair.Key, pair.Value);
+ }
+ }
+
+ ///
+ /// Adds the specified entries to the map, replacing any existing entries with the same keys.
+ /// The keys and values are not automatically cloned.
+ ///
+ /// This method primarily exists to be called from MergeFrom methods in generated classes for messages.
+ /// The entries to add to the map.
+ public void MergeFrom(IDictionary entries)
+ {
+ ProtoPreconditions.CheckNotNull(entries, nameof(entries));
+ foreach (var pair in entries)
+ {
+ this[pair.Key] = pair.Value;
+ }
+ }
+
+ ///
+ /// Returns an enumerator that iterates through the collection.
+ ///
+ ///
+ /// An enumerator that can be used to iterate through the collection.
+ ///
+ public IEnumerator> GetEnumerator() => list.GetEnumerator();
+
+ ///
+ /// Returns an enumerator that iterates through a collection.
+ ///
+ ///
+ /// An object that can be used to iterate through the collection.
+ ///
+ IEnumerator IEnumerable.GetEnumerator() => GetEnumerator();
+
+ ///
+ /// Adds the specified item to the map.
+ ///
+ /// The item to add to the map.
+ void ICollection>.Add(KeyValuePair item) => Add(item.Key, item.Value);
+
+ ///
+ /// Removes all items from the map.
+ ///
+ public void Clear()
+ {
+ list.Clear();
+ map.Clear();
+ }
+
+ ///
+ /// Determines whether map contains an entry equivalent to the given key/value pair.
+ ///
+ /// The key/value pair to find.
+ ///
+ bool ICollection>.Contains(KeyValuePair item) =>
+ TryGetValue(item.Key, out TValue value) && ValueEqualityComparer.Equals(item.Value, value);
+
+ ///
+ /// Copies the key/value pairs in this map to an array.
+ ///
+ /// The array to copy the entries into.
+ /// The index of the array at which to start copying values.
+ void ICollection>.CopyTo(KeyValuePair[] array, int arrayIndex) =>
+ list.CopyTo(array, arrayIndex);
+
+ ///
+ /// Removes the specified key/value pair from the map.
+ ///
+ /// Both the key and the value must be found for the entry to be removed.
+ /// The key/value pair to remove.
+ /// true if the key/value pair was found and removed; false otherwise.
+ bool ICollection>.Remove(KeyValuePair item)
+ {
+ if (item.Key == null)
+ {
+ throw new ArgumentException("Key is null", nameof(item));
+ }
+ if (map.TryGetValue(item.Key, out LinkedListNode> node) &&
+ EqualityComparer.Default.Equals(item.Value, node.Value.Value))
+ {
+ map.Remove(item.Key);
+ node.List.Remove(node);
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+ ///
+ /// Gets the number of elements contained in the map.
+ ///
+ public int Count => list.Count;
+
+ ///
+ /// Gets a value indicating whether the map is read-only.
+ ///
+ public bool IsReadOnly => false;
+
+ ///
+ /// Determines whether the specified , is equal to this instance.
+ ///
+ /// The to compare with this instance.
+ ///
+ /// true if the specified is equal to this instance; otherwise, false.
+ ///
+ public override bool Equals(object other) => Equals(other as MapField);
+
+ ///
+ /// Returns a hash code for this instance.
+ ///
+ ///
+ /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
+ ///
+ public override int GetHashCode()
+ {
+ var keyComparer = KeyEqualityComparer;
+ var valueComparer = ValueEqualityComparer;
+ int hash = 0;
+ foreach (var pair in list)
+ {
+ hash ^= keyComparer.GetHashCode(pair.Key) * 31 + valueComparer.GetHashCode(pair.Value);
+ }
+ return hash;
+ }
+
+ ///
+ /// Compares this map with another for equality.
+ ///
+ ///
+ /// The order of the key/value pairs in the maps is not deemed significant in this comparison.
+ ///
+ /// The map to compare this with.
+ /// true if refers to an equal map; false otherwise.
+ public bool Equals(MapField other)
+ {
+ if (other == null)
+ {
+ return false;
+ }
+ if (other == this)
+ {
+ return true;
+ }
+ if (other.Count != this.Count)
+ {
+ return false;
+ }
+ var valueComparer = ValueEqualityComparer;
+ foreach (var pair in this)
+ {
+ if (!other.TryGetValue(pair.Key, out TValue value))
+ {
+ return false;
+ }
+ if (!valueComparer.Equals(value, pair.Value))
+ {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ ///
+ /// Adds entries to the map from the given stream.
+ ///
+ ///
+ /// It is assumed that the stream is initially positioned after the tag specified by the codec.
+ /// This method will continue reading entries from the stream until the end is reached, or
+ /// a different tag is encountered.
+ ///
+ /// Stream to read from
+ /// Codec describing how the key/value pairs are encoded
+ public void AddEntriesFrom(CodedInputStream input, Codec codec)
+ {
+ ParseContext.Initialize(input, out ParseContext ctx);
+ try
+ {
+ AddEntriesFrom(ref ctx, codec);
+ }
+ finally
+ {
+ ctx.CopyStateTo(input);
+ }
+ }
+
+ ///
+ /// Adds entries to the map from the given parse context.
+ ///
+ ///
+ /// It is assumed that the input is initially positioned after the tag specified by the codec.
+ /// This method will continue reading entries from the input until the end is reached, or
+ /// a different tag is encountered.
+ ///
+ /// Input to read from
+ /// Codec describing how the key/value pairs are encoded
+ [SecuritySafeCritical]
+ public void AddEntriesFrom(ref ParseContext ctx, Codec codec)
+ {
+ do
+ {
+ KeyValuePair entry = ParsingPrimitivesMessages.ReadMapEntry(ref ctx, codec);
+ this[entry.Key] = entry.Value;
+ } while (ParsingPrimitives.MaybeConsumeTag(ref ctx.buffer, ref ctx.state, codec.MapTag));
+ }
+
+ ///
+ /// Writes the contents of this map to the given coded output stream, using the specified codec
+ /// to encode each entry.
+ ///
+ /// The output stream to write to.
+ /// The codec to use for each entry.
+ public void WriteTo(CodedOutputStream output, Codec codec)
+ {
+ WriteContext.Initialize(output, out WriteContext ctx);
+ try
+ {
+ IEnumerable> listToWrite = list;
+
+ if (output.Deterministic)
+ {
+ listToWrite = GetSortedListCopy(list);
+ }
+ WriteTo(ref ctx, codec, listToWrite);
+ }
+ finally
+ {
+ ctx.CopyStateTo(output);
+ }
+ }
+
+ internal IEnumerable> GetSortedListCopy(IEnumerable> listToSort)
+ {
+ // We can't sort the list in place, as that would invalidate the linked list.
+ // Instead, we create a new list, sort that, and then write it out.
+ var listToWrite = new List>(listToSort);
+ listToWrite.Sort((pair1, pair2) =>
+ {
+ if (typeof(TKey) == typeof(string))
+ {
+ // Use Ordinal, otherwise Comparer.Default uses StringComparer.CurrentCulture
+ return StringComparer.Ordinal.Compare(pair1.Key.ToString(), pair2.Key.ToString());
+ }
+ return Comparer.Default.Compare(pair1.Key, pair2.Key);
+ });
+ return listToWrite;
+ }
+
+ ///
+ /// Writes the contents of this map to the given write context, using the specified codec
+ /// to encode each entry.
+ ///
+ /// The write context to write to.
+ /// The codec to use for each entry.
+ [SecuritySafeCritical]
+ public void WriteTo(ref WriteContext ctx, Codec codec)
+ {
+ IEnumerable> listToWrite = list;
+ if (ctx.state.CodedOutputStream?.Deterministic ?? false)
+ {
+ listToWrite = GetSortedListCopy(list);
+ }
+ WriteTo(ref ctx, codec, listToWrite);
+ }
+
+ [SecuritySafeCritical]
+ private void WriteTo(ref WriteContext ctx, Codec codec, IEnumerable> listKvp)
+ {
+ foreach (var entry in listKvp)
+ {
+ ctx.WriteTag(codec.MapTag);
+
+ WritingPrimitives.WriteLength(ref ctx.buffer, ref ctx.state, CalculateEntrySize(codec, entry));
+ codec.KeyCodec.WriteTagAndValue(ref ctx, entry.Key);
+ codec.ValueCodec.WriteTagAndValue(ref ctx, entry.Value);
+ }
+ }
+
+ ///
+ /// Calculates the size of this map based on the given entry codec.
+ ///
+ /// The codec to use to encode each entry.
+ ///
+ public int CalculateSize(Codec codec)
+ {
+ if (Count == 0)
+ {
+ return 0;
+ }
+ int size = 0;
+ foreach (var entry in list)
+ {
+ int entrySize = CalculateEntrySize(codec, entry);
+
+ size += CodedOutputStream.ComputeRawVarint32Size(codec.MapTag);
+ size += CodedOutputStream.ComputeLengthSize(entrySize) + entrySize;
+ }
+ return size;
+ }
+
+ private static int CalculateEntrySize(Codec codec, KeyValuePair entry)
+ {
+ return codec.KeyCodec.CalculateSizeWithTag(entry.Key) + codec.ValueCodec.CalculateSizeWithTag(entry.Value);
+ }
+
+ ///
+ /// Returns a string representation of this repeated field, in the same
+ /// way as it would be represented by the default JSON formatter.
+ ///
+ public override string ToString()
+ {
+ var writer = new StringWriter();
+ JsonFormatter.Default.WriteDictionary(writer, this);
+ return writer.ToString();
+ }
+
+ #region IDictionary explicit interface implementation
+
+ void IDictionary.Add(object key, object value) => Add((TKey)key, (TValue)value);
+
+ bool IDictionary.Contains(object key) => key is TKey k && ContainsKey(k);
+
+ IDictionaryEnumerator IDictionary.GetEnumerator() => new DictionaryEnumerator(GetEnumerator());
+
+ void IDictionary.Remove(object key)
+ {
+ ProtoPreconditions.CheckNotNull(key, nameof(key));
+ if (key is TKey k)
+ {
+ Remove(k);
+ }
+ }
+
+ void ICollection.CopyTo(Array array, int index)
+ {
+ // This is ugly and slow as heck, but with any luck it will never be used anyway.
+ ICollection temp = this.Select(pair => new DictionaryEntry(pair.Key, pair.Value)).ToList();
+ temp.CopyTo(array, index);
+ }
+
+ bool IDictionary.IsFixedSize => false;
+
+ ICollection IDictionary.Keys => (ICollection)Keys;
+
+ ICollection IDictionary.Values => (ICollection)Values;
+
+ bool ICollection.IsSynchronized => false;
+
+ object ICollection.SyncRoot => this;
+
+ object IDictionary.this[object key]
+ {
+ get
+ {
+ ProtoPreconditions.CheckNotNull(key, nameof(key));
+ if (key is TKey k)
+ {
+ TryGetValue(k, out TValue value);
+ return value;
+ }
+ return null;
+ }
+
+ set
+ {
+ this[(TKey)key] = (TValue)value;
+ }
+ }
+ #endregion
+
+ #region IReadOnlyDictionary explicit interface implementation
+ IEnumerable IReadOnlyDictionary.Keys => Keys;
+ IEnumerable IReadOnlyDictionary.Values => Values;
+ #endregion
+
+ private class DictionaryEnumerator : IDictionaryEnumerator
+ {
+ private readonly IEnumerator> enumerator;
+
+ internal DictionaryEnumerator(IEnumerator> enumerator)
+ {
+ this.enumerator = enumerator;
+ }
+
+ public bool MoveNext() => enumerator.MoveNext();
+
+ public void Reset() => enumerator.Reset();
+
+ public object Current => Entry;
+ public DictionaryEntry Entry => new DictionaryEntry(Key, Value);
+ public object Key => enumerator.Current.Key;
+ public object Value => enumerator.Current.Value;
+ }
+
+ ///
+ /// A codec for a specific map field. This contains all the information required to encode and
+ /// decode the nested messages.
+ ///
+ public sealed class Codec
+ {
+ private readonly FieldCodec keyCodec;
+ private readonly FieldCodec valueCodec;
+ private readonly uint mapTag;
+
+ ///
+ /// Creates a new entry codec based on a separate key codec and value codec,
+ /// and the tag to use for each map entry.
+ ///
+ /// The key codec.
+ /// The value codec.
+ /// The map tag to use to introduce each map entry.
+ public Codec(FieldCodec keyCodec, FieldCodec valueCodec, uint mapTag)
+ {
+ this.keyCodec = keyCodec;
+ this.valueCodec = valueCodec;
+ this.mapTag = mapTag;
+ }
+
+ ///
+ /// The key codec.
+ ///
+ internal FieldCodec KeyCodec => keyCodec;
+
+ ///
+ /// The value codec.
+ ///
+ internal FieldCodec ValueCodec => valueCodec;
+
+ ///
+ /// The tag used in the enclosing message to indicate map entries.
+ ///
+ internal uint MapTag => mapTag;
+ }
+
+ private class MapView : ICollection, ICollection
+ {
+ private readonly MapField parent;
+ private readonly Func, T> projection;
+ private readonly Func containsCheck;
+
+ internal MapView(
+ MapField parent,
+ Func, T> projection,
+ Func containsCheck)
+ {
+ this.parent = parent;
+ this.projection = projection;
+ this.containsCheck = containsCheck;
+ }
+
+ public int Count => parent.Count;
+
+ public bool IsReadOnly => true;
+
+ public bool IsSynchronized => false;
+
+ public object SyncRoot => parent;
+
+ public void Add(T item) => throw new NotSupportedException();
+
+ public void Clear() => throw new NotSupportedException();
+
+ public bool Contains(T item) => containsCheck(item);
+
+ public void CopyTo(T[] array, int arrayIndex)
+ {
+ if (arrayIndex < 0)
+ {
+ throw new ArgumentOutOfRangeException(nameof(arrayIndex));
+ }
+ if (arrayIndex + Count > array.Length)
+ {
+ throw new ArgumentException("Not enough space in the array", nameof(array));
+ }
+ foreach (var item in this)
+ {
+ array[arrayIndex++] = item;
+ }
+ }
+
+ public IEnumerator GetEnumerator()
+ {
+ return parent.list.Select(projection).GetEnumerator();
+ }
+
+ public bool Remove(T item) => throw new NotSupportedException();
+
+ IEnumerator IEnumerable.GetEnumerator() => GetEnumerator();
+
+ public void CopyTo(Array array, int index)
+ {
+ if (index < 0)
+ {
+ throw new ArgumentOutOfRangeException(nameof(index));
+ }
+ if (index + Count > array.Length)
+ {
+ throw new ArgumentException("Not enough space in the array", nameof(array));
+ }
+ foreach (var item in this)
+ {
+ array.SetValue(item, index++);
+ }
+ }
+ }
+
+ private sealed class MapFieldDebugView
+ {
+ private readonly MapField map;
+
+ public MapFieldDebugView(MapField map)
+ {
+ this.map = map;
+ }
+
+ [DebuggerBrowsable(DebuggerBrowsableState.RootHidden)]
+ public KeyValuePair[] Items => map.list.ToArray();
+ }
+ }
+}
diff --git a/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Collections/MapField.cs.meta b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Collections/MapField.cs.meta
new file mode 100644
index 00000000..69c3913e
--- /dev/null
+++ b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Collections/MapField.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 2d17e06f635e50745bbffabc4e671f0c
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Collections/ProtobufEqualityComparers.cs b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Collections/ProtobufEqualityComparers.cs
new file mode 100644
index 00000000..5b851b22
--- /dev/null
+++ b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Collections/ProtobufEqualityComparers.cs
@@ -0,0 +1,107 @@
+#region Copyright notice and license
+// Protocol Buffers - Google's data interchange format
+// Copyright 2017 Google Inc. All rights reserved.
+//
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file or at
+// https://developers.google.com/open-source/licenses/bsd
+#endregion
+
+using System;
+using System.Collections.Generic;
+
+namespace Google.Protobuf.Collections
+{
+ ///
+ /// Provides a central place to implement equality comparisons, primarily for bitwise float/double equality.
+ ///
+ public static class ProtobufEqualityComparers
+ {
+ ///
+ /// Returns an equality comparer for suitable for Protobuf equality comparisons.
+ /// This is usually just the default equality comparer for the type, but floating point numbers are compared
+ /// bitwise.
+ ///
+ /// The type of equality comparer to return.
+ /// The equality comparer.
+ public static EqualityComparer GetEqualityComparer()
+ {
+ return typeof(T) == typeof(double) ? (EqualityComparer) (object) BitwiseDoubleEqualityComparer
+ : typeof(T) == typeof(float) ? (EqualityComparer) (object) BitwiseSingleEqualityComparer
+ : typeof(T) == typeof(double?) ? (EqualityComparer) (object) BitwiseNullableDoubleEqualityComparer
+ : typeof(T) == typeof(float?) ? (EqualityComparer) (object) BitwiseNullableSingleEqualityComparer
+ : EqualityComparer.Default;
+ }
+
+ ///
+ /// Returns an equality comparer suitable for comparing 64-bit floating point values, by bitwise comparison.
+ /// (NaN values are considered equal, but only when they have the same representation.)
+ ///
+ public static EqualityComparer BitwiseDoubleEqualityComparer { get; } = new BitwiseDoubleEqualityComparerImpl();
+
+ ///
+ /// Returns an equality comparer suitable for comparing 32-bit floating point values, by bitwise comparison.
+ /// (NaN values are considered equal, but only when they have the same representation.)
+ ///
+ public static EqualityComparer BitwiseSingleEqualityComparer { get; } = new BitwiseSingleEqualityComparerImpl();
+
+ ///
+ /// Returns an equality comparer suitable for comparing nullable 64-bit floating point values, by bitwise comparison.
+ /// (NaN values are considered equal, but only when they have the same representation.)
+ ///
+ public static EqualityComparer BitwiseNullableDoubleEqualityComparer { get; } = new BitwiseNullableDoubleEqualityComparerImpl();
+
+ ///
+ /// Returns an equality comparer suitable for comparing nullable 32-bit floating point values, by bitwise comparison.
+ /// (NaN values are considered equal, but only when they have the same representation.)
+ ///
+ public static EqualityComparer BitwiseNullableSingleEqualityComparer { get; } = new BitwiseNullableSingleEqualityComparerImpl();
+
+ private class BitwiseDoubleEqualityComparerImpl : EqualityComparer
+ {
+ public override bool Equals(double x, double y) =>
+ BitConverter.DoubleToInt64Bits(x) == BitConverter.DoubleToInt64Bits(y);
+
+ public override int GetHashCode(double obj) =>
+ BitConverter.DoubleToInt64Bits(obj).GetHashCode();
+ }
+
+ private class BitwiseSingleEqualityComparerImpl : EqualityComparer
+ {
+ // Just promote values to double and use BitConverter.DoubleToInt64Bits,
+ // as there's no BitConverter.SingleToInt32Bits, unfortunately.
+
+ public override bool Equals(float x, float y) =>
+ BitConverter.DoubleToInt64Bits(x) == BitConverter.DoubleToInt64Bits(y);
+
+ public override int GetHashCode(float obj) =>
+ BitConverter.DoubleToInt64Bits(obj).GetHashCode();
+ }
+
+ private class BitwiseNullableDoubleEqualityComparerImpl : EqualityComparer
+ {
+ public override bool Equals(double? x, double? y) =>
+ x == null && y == null ? true
+ : x == null || y == null ? false
+ : BitwiseDoubleEqualityComparer.Equals(x.Value, y.Value);
+
+ // The hash code for null is just a constant which is at least *unlikely* to be used
+ // elsewhere. (Compared with 0, say.)
+ public override int GetHashCode(double? obj) =>
+ obj == null ? 293864 : BitwiseDoubleEqualityComparer.GetHashCode(obj.Value);
+ }
+
+ private class BitwiseNullableSingleEqualityComparerImpl : EqualityComparer
+ {
+ public override bool Equals(float? x, float? y) =>
+ x == null && y == null ? true
+ : x == null || y == null ? false
+ : BitwiseSingleEqualityComparer.Equals(x.Value, y.Value);
+
+ // The hash code for null is just a constant which is at least *unlikely* to be used
+ // elsewhere. (Compared with 0, say.)
+ public override int GetHashCode(float? obj) =>
+ obj == null ? 293864 : BitwiseSingleEqualityComparer.GetHashCode(obj.Value);
+ }
+ }
+}
diff --git a/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Collections/ProtobufEqualityComparers.cs.meta b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Collections/ProtobufEqualityComparers.cs.meta
new file mode 100644
index 00000000..cf919fb0
--- /dev/null
+++ b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Collections/ProtobufEqualityComparers.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: fe847f0b8351a874186d0dead84866dd
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Collections/RepeatedField.cs b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Collections/RepeatedField.cs
new file mode 100644
index 00000000..8bf410aa
--- /dev/null
+++ b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Collections/RepeatedField.cs
@@ -0,0 +1,663 @@
+#region Copyright notice and license
+// Protocol Buffers - Google's data interchange format
+// Copyright 2015 Google Inc. All rights reserved.
+//
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file or at
+// https://developers.google.com/open-source/licenses/bsd
+#endregion
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.IO;
+using System.Linq;
+using System.Security;
+
+namespace Google.Protobuf.Collections
+{
+ ///
+ /// The contents of a repeated field: essentially, a collection with some extra
+ /// restrictions (no null values) and capabilities (deep cloning).
+ ///
+ ///
+ /// This implementation does not generally prohibit the use of types which are not
+ /// supported by Protocol Buffers but nor does it guarantee that all operations will work in such cases.
+ ///
+ /// The element type of the repeated field.
+ [DebuggerDisplay("Count = {Count}")]
+ [DebuggerTypeProxy(typeof(RepeatedField<>.RepeatedFieldDebugView))]
+ public sealed class RepeatedField : IList, IList, IDeepCloneable>, IEquatable>, IReadOnlyList
+ {
+ private static readonly EqualityComparer EqualityComparer = ProtobufEqualityComparers.GetEqualityComparer();
+ private static readonly T[] EmptyArray = new T[0];
+ private const int MinArraySize = 8;
+
+ private T[] array = EmptyArray;
+ private int count = 0;
+
+ ///
+ /// Creates a deep clone of this repeated field.
+ ///
+ ///
+ /// If the field type is
+ /// a message type, each element is also cloned; otherwise, it is
+ /// assumed that the field type is primitive (including string and
+ /// bytes, both of which are immutable) and so a simple copy is
+ /// equivalent to a deep clone.
+ ///
+ /// A deep clone of this repeated field.
+ public RepeatedField Clone()
+ {
+ RepeatedField clone = new RepeatedField();
+ if (array != EmptyArray)
+ {
+ clone.array = (T[])array.Clone();
+ if (clone.array is IDeepCloneable[] cloneableArray)
+ {
+ for (int i = 0; i < count; i++)
+ {
+ clone.array[i] = cloneableArray[i].Clone();
+ }
+ }
+ }
+ clone.count = count;
+ return clone;
+ }
+
+ ///
+ /// Adds the entries from the given input stream, decoding them with the specified codec.
+ ///
+ /// The input stream to read from.
+ /// The codec to use in order to read each entry.
+ public void AddEntriesFrom(CodedInputStream input, FieldCodec codec)
+ {
+ ParseContext.Initialize(input, out ParseContext ctx);
+ try
+ {
+ AddEntriesFrom(ref ctx, codec);
+ }
+ finally
+ {
+ ctx.CopyStateTo(input);
+ }
+ }
+
+ ///
+ /// Adds the entries from the given parse context, decoding them with the specified codec.
+ ///
+ /// The input to read from.
+ /// The codec to use in order to read each entry.
+ [SecuritySafeCritical]
+ public void AddEntriesFrom(ref ParseContext ctx, FieldCodec codec)
+ {
+ // TODO: Inline some of the Add code, so we can avoid checking the size on every
+ // iteration.
+ uint tag = ctx.state.lastTag;
+ var reader = codec.ValueReader;
+ // Non-nullable value types can be packed or not.
+ if (FieldCodec.IsPackedRepeatedField(tag))
+ {
+ int length = ctx.ReadLength();
+ if (length > 0)
+ {
+ int oldLimit = SegmentedBufferHelper.PushLimit(ref ctx.state, length);
+
+ // If the content is fixed size then we can calculate the length
+ // of the repeated field and pre-initialize the underlying collection.
+ //
+ // Check that the supplied length doesn't exceed the underlying buffer.
+ // That prevents a malicious length from initializing a very large collection.
+ if (codec.FixedSize > 0 && length % codec.FixedSize == 0 && ParsingPrimitives.IsDataAvailable(ref ctx.state, length))
+ {
+ EnsureSize(count + (length / codec.FixedSize));
+
+ while (!SegmentedBufferHelper.IsReachedLimit(ref ctx.state))
+ {
+ // Only FieldCodecs with a fixed size can reach here, and they are all known
+ // types that don't allow the user to specify a custom reader action.
+ // reader action will never return null.
+ array[count++] = reader(ref ctx);
+ }
+ }
+ else
+ {
+ // Content is variable size so add until we reach the limit.
+ while (!SegmentedBufferHelper.IsReachedLimit(ref ctx.state))
+ {
+ Add(reader(ref ctx));
+ }
+ }
+ SegmentedBufferHelper.PopLimit(ref ctx.state, oldLimit);
+ }
+ // Empty packed field. Odd, but valid - just ignore.
+ }
+ else
+ {
+ // Not packed... (possibly not packable)
+ do
+ {
+ Add(reader(ref ctx));
+ } while (ParsingPrimitives.MaybeConsumeTag(ref ctx.buffer, ref ctx.state, tag));
+ }
+ }
+
+ ///
+ /// Calculates the size of this collection based on the given codec.
+ ///
+ /// The codec to use when encoding each field.
+ /// The number of bytes that would be written to an output by one of the WriteTo methods,
+ /// using the same codec.
+ public int CalculateSize(FieldCodec codec)
+ {
+ if (count == 0)
+ {
+ return 0;
+ }
+ uint tag = codec.Tag;
+ if (codec.PackedRepeatedField)
+ {
+ int dataSize = CalculatePackedDataSize(codec);
+ return CodedOutputStream.ComputeRawVarint32Size(tag) +
+ CodedOutputStream.ComputeLengthSize(dataSize) +
+ dataSize;
+ }
+ else
+ {
+ var sizeCalculator = codec.ValueSizeCalculator;
+ int size = count * CodedOutputStream.ComputeRawVarint32Size(tag);
+ if (codec.EndTag != 0)
+ {
+ size += count * CodedOutputStream.ComputeRawVarint32Size(codec.EndTag);
+ }
+ for (int i = 0; i < count; i++)
+ {
+ size += sizeCalculator(array[i]);
+ }
+ return size;
+ }
+ }
+
+ private int CalculatePackedDataSize(FieldCodec codec)
+ {
+ int fixedSize = codec.FixedSize;
+ if (fixedSize == 0)
+ {
+ var calculator = codec.ValueSizeCalculator;
+ int tmp = 0;
+ for (int i = 0; i < count; i++)
+ {
+ tmp += calculator(array[i]);
+ }
+ return tmp;
+ }
+ else
+ {
+ return fixedSize * Count;
+ }
+ }
+
+ ///
+ /// Writes the contents of this collection to the given ,
+ /// encoding each value using the specified codec.
+ ///
+ /// The output stream to write to.
+ /// The codec to use when encoding each value.
+ public void WriteTo(CodedOutputStream output, FieldCodec codec)
+ {
+ WriteContext.Initialize(output, out WriteContext ctx);
+ try
+ {
+ WriteTo(ref ctx, codec);
+ }
+ finally
+ {
+ ctx.CopyStateTo(output);
+ }
+ }
+
+ ///
+ /// Writes the contents of this collection to the given write context,
+ /// encoding each value using the specified codec.
+ ///
+ /// The write context to write to.
+ /// The codec to use when encoding each value.
+ [SecuritySafeCritical]
+ public void WriteTo(ref WriteContext ctx, FieldCodec codec)
+ {
+ if (count == 0)
+ {
+ return;
+ }
+ var writer = codec.ValueWriter;
+ var tag = codec.Tag;
+ if (codec.PackedRepeatedField)
+ {
+ // Packed primitive type
+ int size = CalculatePackedDataSize(codec);
+ ctx.WriteTag(tag);
+ ctx.WriteLength(size);
+ for (int i = 0; i < count; i++)
+ {
+ writer(ref ctx, array[i]);
+ }
+ }
+ else
+ {
+ // Not packed: a simple tag/value pair for each value.
+ // Can't use codec.WriteTagAndValue, as that omits default values.
+ for (int i = 0; i < count; i++)
+ {
+ ctx.WriteTag(tag);
+ writer(ref ctx, array[i]);
+ if (codec.EndTag != 0)
+ {
+ ctx.WriteTag(codec.EndTag);
+ }
+ }
+ }
+ }
+
+ ///
+ /// Gets and sets the capacity of the RepeatedField's internal array.
+ /// When set, the internal array is reallocated to the given capacity.
+ /// The new value is less than .
+ ///
+ public int Capacity
+ {
+ get { return array.Length; }
+ set
+ {
+ if (value < count)
+ {
+ throw new ArgumentOutOfRangeException("Capacity", value,
+ $"Cannot set Capacity to a value smaller than the current item count, {count}");
+ }
+
+ if (value >= 0 && value != array.Length)
+ {
+ SetSize(value);
+ }
+ }
+ }
+
+ // May increase the size of the internal array, but will never shrink it.
+ private void EnsureSize(int size)
+ {
+ if (array.Length < size)
+ {
+ size = Math.Max(size, MinArraySize);
+ int newSize = Math.Max(array.Length * 2, size);
+ SetSize(newSize);
+ }
+ }
+
+ // Sets the internal array to an exact size.
+ private void SetSize(int size)
+ {
+ if (size != array.Length)
+ {
+ var tmp = new T[size];
+ Array.Copy(array, 0, tmp, 0, count);
+ array = tmp;
+ }
+ }
+
+ ///
+ /// Adds the specified item to the collection.
+ ///
+ /// The item to add.
+ public void Add(T item)
+ {
+ ProtoPreconditions.CheckNotNullUnconstrained(item, nameof(item));
+ EnsureSize(count + 1);
+ array[count++] = item;
+ }
+
+ ///
+ /// Removes all items from the collection.
+ ///
+ public void Clear()
+ {
+ // Clear the content of the array (so that any objects it referred to can be garbage collected)
+ // but keep the capacity the same. This allows large repeated fields to be reused without
+ // array reallocation.
+ Array.Clear(array, 0, count);
+ count = 0;
+ }
+
+ ///
+ /// Determines whether this collection contains the given item.
+ ///
+ /// The item to find.
+ /// true if this collection contains the given item; false otherwise.
+ public bool Contains(T item) => IndexOf(item) != -1;
+
+ ///
+ /// Copies this collection to the given array.
+ ///
+ /// The array to copy to.
+ /// The first index of the array to copy to.
+ public void CopyTo(T[] array, int arrayIndex)
+ {
+ Array.Copy(this.array, 0, array, arrayIndex, count);
+ }
+
+ ///
+ /// Removes the specified item from the collection
+ ///
+ /// The item to remove.
+ /// true if the item was found and removed; false otherwise.
+ public bool Remove(T item)
+ {
+ int index = IndexOf(item);
+ if (index == -1)
+ {
+ return false;
+ }
+ Array.Copy(array, index + 1, array, index, count - index - 1);
+ count--;
+ array[count] = default;
+ return true;
+ }
+
+ ///
+ /// Gets the number of elements contained in the collection.
+ ///
+ public int Count => count;
+
+ ///
+ /// Gets a value indicating whether the collection is read-only.
+ ///
+ public bool IsReadOnly => false;
+
+ ///
+ /// Adds all of the specified values into this collection.
+ ///
+ /// The values to add to this collection.
+ public void AddRange(IEnumerable values)
+ {
+ ProtoPreconditions.CheckNotNull(values, nameof(values));
+
+ // Optimization 1: If the collection we're adding is already a RepeatedField,
+ // we know the values are valid.
+ if (values is RepeatedField otherRepeatedField)
+ {
+ EnsureSize(count + otherRepeatedField.count);
+ Array.Copy(otherRepeatedField.array, 0, array, count, otherRepeatedField.count);
+ count += otherRepeatedField.count;
+ return;
+ }
+
+ // Optimization 2: The collection is an ICollection, so we can expand
+ // just once and ask the collection to copy itself into the array.
+ if (values is ICollection collection)
+ {
+ var extraCount = collection.Count;
+ // For reference types and nullable value types, we need to check that there are no nulls
+ // present. (This isn't a thread-safe approach, but we don't advertise this is thread-safe.)
+ // We expect the JITter to optimize this test to true/false, so it's effectively conditional
+ // specialization.
+ if (default(T) == null)
+ {
+ // TODO: Measure whether iterating once to check and then letting the collection copy
+ // itself is faster or slower than iterating and adding as we go. For large
+ // collections this will not be great in terms of cache usage... but the optimized
+ // copy may be significantly faster than doing it one at a time.
+ foreach (var item in collection)
+ {
+ if (item == null)
+ {
+ throw new ArgumentException("Sequence contained null element", nameof(values));
+ }
+ }
+ }
+ EnsureSize(count + extraCount);
+ collection.CopyTo(array, count);
+ count += extraCount;
+ return;
+ }
+
+ // We *could* check for ICollection as well, but very very few collections implement
+ // ICollection but not ICollection. (HashSet does, for one...)
+
+ // Fall back to a slower path of adding items one at a time.
+ foreach (T item in values)
+ {
+ Add(item);
+ }
+ }
+
+ ///
+ /// Adds all of the specified values into this collection. This method is present to
+ /// allow repeated fields to be constructed from queries within collection initializers.
+ /// Within non-collection-initializer code, consider using the equivalent
+ /// method instead for clarity.
+ ///
+ /// The values to add to this collection.
+ public void Add(IEnumerable values)
+ {
+ AddRange(values);
+ }
+
+ ///
+ /// Returns an enumerator that iterates through the collection.
+ ///
+ ///
+ /// An enumerator that can be used to iterate through the collection.
+ ///
+ public IEnumerator GetEnumerator()
+ {
+ for (int i = 0; i < count; i++)
+ {
+ yield return array[i];
+ }
+ }
+
+ ///
+ /// Determines whether the specified , is equal to this instance.
+ ///
+ /// The to compare with this instance.
+ ///
+ /// true if the specified is equal to this instance; otherwise, false.
+ ///
+ public override bool Equals(object obj) => Equals(obj as RepeatedField);
+
+ ///
+ /// Returns an enumerator that iterates through a collection.
+ ///
+ ///
+ /// An object that can be used to iterate through the collection.
+ ///
+ IEnumerator IEnumerable.GetEnumerator() => GetEnumerator();
+
+ ///
+ /// Returns a hash code for this instance.
+ ///
+ ///
+ /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
+ ///
+ public override int GetHashCode()
+ {
+ int hash = 0;
+ for (int i = 0; i < count; i++)
+ {
+ hash = hash * 31 + array[i].GetHashCode();
+ }
+ return hash;
+ }
+
+ ///
+ /// Compares this repeated field with another for equality.
+ ///
+ /// The repeated field to compare this with.
+ /// true if refers to an equal repeated field; false otherwise.
+ public bool Equals(RepeatedField other)
+ {
+ if (other is null)
+ {
+ return false;
+ }
+ if (ReferenceEquals(other, this))
+ {
+ return true;
+ }
+ if (other.Count != this.Count)
+ {
+ return false;
+ }
+ EqualityComparer comparer = EqualityComparer;
+ for (int i = 0; i < count; i++)
+ {
+ if (!comparer.Equals(array[i], other.array[i]))
+ {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ ///
+ /// Returns the index of the given item within the collection, or -1 if the item is not
+ /// present.
+ ///
+ /// The item to find in the collection.
+ /// The zero-based index of the item, or -1 if it is not found.
+ public int IndexOf(T item)
+ {
+ ProtoPreconditions.CheckNotNullUnconstrained(item, nameof(item));
+ EqualityComparer comparer = EqualityComparer;
+ for (int i = 0; i < count; i++)
+ {
+ if (comparer.Equals(array[i], item))
+ {
+ return i;
+ }
+ }
+ return -1;
+ }
+
+ ///
+ /// Inserts the given item at the specified index.
+ ///
+ /// The index at which to insert the item.
+ /// The item to insert.
+ public void Insert(int index, T item)
+ {
+ ProtoPreconditions.CheckNotNullUnconstrained(item, nameof(item));
+ if (index < 0 || index > count)
+ {
+ throw new ArgumentOutOfRangeException(nameof(index));
+ }
+ EnsureSize(count + 1);
+ Array.Copy(array, index, array, index + 1, count - index);
+ array[index] = item;
+ count++;
+ }
+
+ ///
+ /// Removes the item at the given index.
+ ///
+ /// The zero-based index of the item to remove.
+ public void RemoveAt(int index)
+ {
+ if (index < 0 || index >= count)
+ {
+ throw new ArgumentOutOfRangeException(nameof(index));
+ }
+ Array.Copy(array, index + 1, array, index, count - index - 1);
+ count--;
+ array[count] = default;
+ }
+
+ ///
+ /// Returns a string representation of this repeated field, in the same
+ /// way as it would be represented by the default JSON formatter.
+ ///
+ public override string ToString()
+ {
+ var writer = new StringWriter();
+ JsonFormatter.Default.WriteList(writer, this);
+ return writer.ToString();
+ }
+
+ ///
+ /// Gets or sets the item at the specified index.
+ ///
+ ///
+ /// The element at the specified index.
+ ///
+ /// The zero-based index of the element to get or set.
+ /// The item at the specified index.
+ public T this[int index]
+ {
+ get
+ {
+ if (index < 0 || index >= count)
+ {
+ throw new ArgumentOutOfRangeException(nameof(index));
+ }
+ return array[index];
+ }
+ set
+ {
+ if (index < 0 || index >= count)
+ {
+ throw new ArgumentOutOfRangeException(nameof(index));
+ }
+ ProtoPreconditions.CheckNotNullUnconstrained(value, nameof(value));
+ array[index] = value;
+ }
+ }
+
+ #region Explicit interface implementation for IList and ICollection.
+ bool IList.IsFixedSize => false;
+
+ void ICollection.CopyTo(Array array, int index) => Array.Copy(this.array, 0, array, index, count);
+
+ bool ICollection.IsSynchronized => false;
+
+ object ICollection.SyncRoot => this;
+
+ object IList.this[int index]
+ {
+ get => this[index];
+ set => this[index] = (T)value;
+ }
+
+ int IList.Add(object value)
+ {
+ Add((T) value);
+ return count - 1;
+ }
+
+ bool IList.Contains(object value) => (value is T t && Contains(t));
+
+ int IList.IndexOf(object value) => (value is T t) ? IndexOf(t) : -1;
+
+ void IList.Insert(int index, object value) => Insert(index, (T) value);
+
+ void IList.Remove(object value)
+ {
+ if (value is T t)
+ {
+ Remove(t);
+ }
+ }
+ #endregion
+
+ private sealed class RepeatedFieldDebugView
+ {
+ private readonly RepeatedField list;
+
+ public RepeatedFieldDebugView(RepeatedField list)
+ {
+ this.list = list;
+ }
+
+ [DebuggerBrowsable(DebuggerBrowsableState.RootHidden)]
+ public T[] Items => list.ToArray();
+ }
+ }
+}
diff --git a/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Collections/RepeatedField.cs.meta b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Collections/RepeatedField.cs.meta
new file mode 100644
index 00000000..05b05699
--- /dev/null
+++ b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Collections/RepeatedField.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 55cfb2cd3d75f4e419da148fa0ae66fd
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Compatibility.meta b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Compatibility.meta
new file mode 100644
index 00000000..f0b48df8
--- /dev/null
+++ b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Compatibility.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 583ff6b853cb72746af3c83c8629a6bb
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Compatibility/DynamicallyAccessedMemberTypes.cs b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Compatibility/DynamicallyAccessedMemberTypes.cs
new file mode 100644
index 00000000..62fdf70a
--- /dev/null
+++ b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Compatibility/DynamicallyAccessedMemberTypes.cs
@@ -0,0 +1,104 @@
+#region Copyright notice and license
+// Protocol Buffers - Google's data interchange format
+// Copyright 2015 Google Inc. All rights reserved.
+//
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file or at
+// https://developers.google.com/open-source/licenses/bsd
+#endregion
+
+#if !NET5_0_OR_GREATER
+// Copied with permission from https://github.com/dotnet/runtime/tree/8fbf206d0e518b45ca855832e8bfb391afa85972/src/libraries/System.Private.CoreLib/src/System/Diagnostics/CodeAnalysis
+namespace System.Diagnostics.CodeAnalysis
+{
+ ///
+ /// Specifies the types of members that are dynamically accessed.
+ ///
+ /// This enumeration has a attribute that allows a
+ /// bitwise combination of its member values.
+ ///
+ [Flags]
+ internal enum DynamicallyAccessedMemberTypes
+ {
+ ///
+ /// Specifies no members.
+ ///
+ None = 0,
+
+ ///
+ /// Specifies the default, parameterless public constructor.
+ ///
+ PublicParameterlessConstructor = 0x0001,
+
+ ///
+ /// Specifies all public constructors.
+ ///
+ PublicConstructors = 0x0002 | PublicParameterlessConstructor,
+
+ ///
+ /// Specifies all non-public constructors.
+ ///
+ NonPublicConstructors = 0x0004,
+
+ ///
+ /// Specifies all public methods.
+ ///
+ PublicMethods = 0x0008,
+
+ ///
+ /// Specifies all non-public methods.
+ ///
+ NonPublicMethods = 0x0010,
+
+ ///
+ /// Specifies all public fields.
+ ///
+ PublicFields = 0x0020,
+
+ ///
+ /// Specifies all non-public fields.
+ ///
+ NonPublicFields = 0x0040,
+
+ ///
+ /// Specifies all public nested types.
+ ///
+ PublicNestedTypes = 0x0080,
+
+ ///
+ /// Specifies all non-public nested types.
+ ///
+ NonPublicNestedTypes = 0x0100,
+
+ ///
+ /// Specifies all public properties.
+ ///
+ PublicProperties = 0x0200,
+
+ ///
+ /// Specifies all non-public properties.
+ ///
+ NonPublicProperties = 0x0400,
+
+ ///
+ /// Specifies all public events.
+ ///
+ PublicEvents = 0x0800,
+
+ ///
+ /// Specifies all non-public events.
+ ///
+ NonPublicEvents = 0x1000,
+
+ ///
+ /// Specifies all interfaces implemented by the type.
+ ///
+ Interfaces = 0x2000,
+
+ ///
+ /// Specifies all members.
+ ///
+ All = ~None
+ }
+}
+#endif
diff --git a/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Compatibility/DynamicallyAccessedMemberTypes.cs.meta b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Compatibility/DynamicallyAccessedMemberTypes.cs.meta
new file mode 100644
index 00000000..ea86d9e0
--- /dev/null
+++ b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Compatibility/DynamicallyAccessedMemberTypes.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: de96bce00062d994091bf37244d982b1
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Compatibility/DynamicallyAccessedMembersAttribute.cs b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Compatibility/DynamicallyAccessedMembersAttribute.cs
new file mode 100644
index 00000000..81f3dffa
--- /dev/null
+++ b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Compatibility/DynamicallyAccessedMembersAttribute.cs
@@ -0,0 +1,60 @@
+#region Copyright notice and license
+// Protocol Buffers - Google's data interchange format
+// Copyright 2015 Google Inc. All rights reserved.
+//
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file or at
+// https://developers.google.com/open-source/licenses/bsd
+#endregion
+
+#if !NET5_0_OR_GREATER
+// Copied with permission from https://github.com/dotnet/runtime/tree/8fbf206d0e518b45ca855832e8bfb391afa85972/src/libraries/System.Private.CoreLib/src/System/Diagnostics/CodeAnalysis
+namespace System.Diagnostics.CodeAnalysis
+{
+ ///
+ /// Indicates that certain members on a specified are accessed dynamically,
+ /// for example through .
+ ///
+ ///
+ /// This allows tools to understand which members are being accessed during the execution
+ /// of a program.
+ ///
+ /// This attribute is valid on members whose type is or .
+ ///
+ /// When this attribute is applied to a location of type , the assumption is
+ /// that the string represents a fully qualified type name.
+ ///
+ /// When this attribute is applied to a class, interface, or struct, the members specified
+ /// can be accessed dynamically on instances returned from calling
+ /// on instances of that class, interface, or struct.
+ ///
+ /// If the attribute is applied to a method it's treated as a special case and it implies
+ /// the attribute should be applied to the "this" parameter of the method. As such the attribute
+ /// should only be used on instance methods of types assignable to System.Type (or string, but no methods
+ /// will use it there).
+ ///
+ [AttributeUsage(
+ AttributeTargets.Field | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter |
+ AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.Method |
+ AttributeTargets.Class | AttributeTargets.Interface | AttributeTargets.Struct,
+ Inherited = false)]
+ internal sealed class DynamicallyAccessedMembersAttribute : Attribute
+ {
+ ///
+ /// Initializes a new instance of the class
+ /// with the specified member types.
+ ///
+ /// The types of members dynamically accessed.
+ public DynamicallyAccessedMembersAttribute(DynamicallyAccessedMemberTypes memberTypes)
+ {
+ MemberTypes = memberTypes;
+ }
+
+ ///
+ /// Gets the which specifies the type
+ /// of members dynamically accessed.
+ ///
+ public DynamicallyAccessedMemberTypes MemberTypes { get; }
+ }
+}
+#endif
diff --git a/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Compatibility/DynamicallyAccessedMembersAttribute.cs.meta b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Compatibility/DynamicallyAccessedMembersAttribute.cs.meta
new file mode 100644
index 00000000..e79eb953
--- /dev/null
+++ b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Compatibility/DynamicallyAccessedMembersAttribute.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 9f420c540cf43774cbea2746e7afaeb2
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Compatibility/PropertyInfoExtensions.cs b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Compatibility/PropertyInfoExtensions.cs
new file mode 100644
index 00000000..fcbcc740
--- /dev/null
+++ b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Compatibility/PropertyInfoExtensions.cs
@@ -0,0 +1,41 @@
+#region Copyright notice and license
+// Protocol Buffers - Google's data interchange format
+// Copyright 2015 Google Inc. All rights reserved.
+//
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file or at
+// https://developers.google.com/open-source/licenses/bsd
+#endregion
+
+using System.Reflection;
+
+namespace Google.Protobuf.Compatibility
+{
+ ///
+ /// Extension methods for , effectively providing
+ /// the familiar members from previous desktop framework versions while
+ /// targeting the newer releases, .NET Core etc.
+ ///
+ internal static class PropertyInfoExtensions
+ {
+ ///
+ /// Returns the public getter of a property, or null if there is no such getter
+ /// (either because it's read-only, or the getter isn't public).
+ ///
+ internal static MethodInfo GetGetMethod(this PropertyInfo target)
+ {
+ var method = target.GetMethod;
+ return method != null && method.IsPublic ? method : null;
+ }
+
+ ///
+ /// Returns the public setter of a property, or null if there is no such setter
+ /// (either because it's write-only, or the setter isn't public).
+ ///
+ internal static MethodInfo GetSetMethod(this PropertyInfo target)
+ {
+ var method = target.SetMethod;
+ return method != null && method.IsPublic ? method : null;
+ }
+ }
+}
diff --git a/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Compatibility/PropertyInfoExtensions.cs.meta b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Compatibility/PropertyInfoExtensions.cs.meta
new file mode 100644
index 00000000..f46fadcb
--- /dev/null
+++ b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Compatibility/PropertyInfoExtensions.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 7002cae484f81924ea0a42e4ff99e150
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Compatibility/RequiresUnreferencedCodeAttribute.cs b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Compatibility/RequiresUnreferencedCodeAttribute.cs
new file mode 100644
index 00000000..6a262591
--- /dev/null
+++ b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Compatibility/RequiresUnreferencedCodeAttribute.cs
@@ -0,0 +1,49 @@
+#region Copyright notice and license
+// Protocol Buffers - Google's data interchange format
+// Copyright 2015 Google Inc. All rights reserved.
+//
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file or at
+// https://developers.google.com/open-source/licenses/bsd
+#endregion
+
+#if !NET5_0_OR_GREATER
+// Copied with permission from https://github.com/dotnet/runtime/tree/8fbf206d0e518b45ca855832e8bfb391afa85972/src/libraries/System.Private.CoreLib/src/System/Diagnostics/CodeAnalysis
+namespace System.Diagnostics.CodeAnalysis
+{
+ ///
+ /// Indicates that the specified method requires dynamic access to code that is not referenced
+ /// statically, for example through .
+ ///
+ ///
+ /// This allows tools to understand which methods are unsafe to call when removing unreferenced
+ /// code from an application.
+ ///
+ [AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor | AttributeTargets.Class, Inherited = false)]
+ internal sealed class RequiresUnreferencedCodeAttribute : Attribute
+ {
+ ///
+ /// Initializes a new instance of the class
+ /// with the specified message.
+ ///
+ ///
+ /// A message that contains information about the usage of unreferenced code.
+ ///
+ public RequiresUnreferencedCodeAttribute(string message)
+ {
+ Message = message;
+ }
+
+ ///
+ /// Gets a message that contains information about the usage of unreferenced code.
+ ///
+ public string Message { get; }
+
+ ///
+ /// Gets or sets an optional URL that contains more information about the method,
+ /// why it requires unreferenced code, and what options a consumer has to deal with it.
+ ///
+ public string Url { get; set; }
+ }
+}
+#endif
diff --git a/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Compatibility/RequiresUnreferencedCodeAttribute.cs.meta b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Compatibility/RequiresUnreferencedCodeAttribute.cs.meta
new file mode 100644
index 00000000..44337b52
--- /dev/null
+++ b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Compatibility/RequiresUnreferencedCodeAttribute.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 94243b97ba117154f8bcbaddfe4cac52
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Compatibility/TypeExtensions.cs b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Compatibility/TypeExtensions.cs
new file mode 100644
index 00000000..98de3401
--- /dev/null
+++ b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Compatibility/TypeExtensions.cs
@@ -0,0 +1,90 @@
+#region Copyright notice and license
+// Protocol Buffers - Google's data interchange format
+// Copyright 2015 Google Inc. All rights reserved.
+//
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file or at
+// https://developers.google.com/open-source/licenses/bsd
+#endregion
+
+using System;
+using System.Diagnostics.CodeAnalysis;
+using System.Reflection;
+
+namespace Google.Protobuf.Compatibility
+{
+ ///
+ /// Provides extension methods on Type that just proxy to TypeInfo.
+ /// These are used to support the new type system from .NET 4.5, without
+ /// having calls to GetTypeInfo all over the place. While the methods here are meant to be
+ /// broadly compatible with the desktop framework, there are some subtle differences in behaviour - but
+ /// they're not expected to affect our use cases. While the class is internal, that should be fine: we can
+ /// evaluate each new use appropriately.
+ ///
+ internal static class TypeExtensions
+ {
+ ///
+ /// See https://msdn.microsoft.com/en-us/library/system.type.isassignablefrom
+ ///
+ internal static bool IsAssignableFrom(this Type target, Type c)
+ {
+ return target.GetTypeInfo().IsAssignableFrom(c.GetTypeInfo());
+ }
+
+ ///
+ /// Returns a representation of the public property associated with the given name in the given type,
+ /// including inherited properties or null if there is no such public property.
+ /// Here, "public property" means a property where either the getter, or the setter, or both, is public.
+ ///
+ [UnconditionalSuppressMessage("Trimming", "IL2072",
+ Justification = "The BaseType of the target will have all properties because of the annotation.")]
+ internal static PropertyInfo GetProperty(
+ [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties)]
+ this Type target, string name)
+ {
+ // GetDeclaredProperty only returns properties declared in the given type, so we need to recurse.
+ while (target != null)
+ {
+ var typeInfo = target.GetTypeInfo();
+ var ret = typeInfo.GetDeclaredProperty(name);
+ if (ret != null && ((ret.CanRead && ret.GetMethod.IsPublic) || (ret.CanWrite && ret.SetMethod.IsPublic)))
+ {
+ return ret;
+ }
+ target = typeInfo.BaseType;
+ }
+ return null;
+ }
+
+ ///
+ /// Returns a representation of the public method associated with the given name in the given type,
+ /// including inherited methods.
+ ///
+ ///
+ /// This has a few differences compared with Type.GetMethod in the desktop framework. It will throw
+ /// if there is an ambiguous match even between a private method and a public one, but it *won't* throw
+ /// if there are two overloads at different levels in the type hierarchy (e.g. class Base declares public void Foo(int) and
+ /// class Child : Base declares public void Foo(long)).
+ ///
+ /// One type in the hierarchy declared more than one method with the same name
+ [UnconditionalSuppressMessage("Trimming", "IL2072",
+ Justification = "The BaseType of the target will have all properties because of the annotation.")]
+ internal static MethodInfo GetMethod(
+ [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods | DynamicallyAccessedMemberTypes.NonPublicMethods)]
+ this Type target, string name)
+ {
+ // GetDeclaredMethod only returns methods declared in the given type, so we need to recurse.
+ while (target != null)
+ {
+ var typeInfo = target.GetTypeInfo();
+ var ret = typeInfo.GetDeclaredMethod(name);
+ if (ret != null && ret.IsPublic)
+ {
+ return ret;
+ }
+ target = typeInfo.BaseType;
+ }
+ return null;
+ }
+ }
+}
diff --git a/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Compatibility/TypeExtensions.cs.meta b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Compatibility/TypeExtensions.cs.meta
new file mode 100644
index 00000000..a2d768b2
--- /dev/null
+++ b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Compatibility/TypeExtensions.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: f34d571813f30754dbd5039e75c3e61d
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Compatibility/UnconditionalSuppressMessageAttribute.cs b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Compatibility/UnconditionalSuppressMessageAttribute.cs
new file mode 100644
index 00000000..3f58e27f
--- /dev/null
+++ b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Compatibility/UnconditionalSuppressMessageAttribute.cs
@@ -0,0 +1,94 @@
+#region Copyright notice and license
+// Protocol Buffers - Google's data interchange format
+// Copyright 2015 Google Inc. All rights reserved.
+//
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file or at
+// https://developers.google.com/open-source/licenses/bsd
+#endregion
+
+#if !NET5_0_OR_GREATER
+// Copied with permission from https://github.com/dotnet/runtime/tree/8fbf206d0e518b45ca855832e8bfb391afa85972/src/libraries/System.Private.CoreLib/src/System/Diagnostics/CodeAnalysis
+namespace System.Diagnostics.CodeAnalysis
+{
+ ///
+ /// Suppresses reporting of a specific rule violation, allowing multiple suppressions on a
+ /// single code artifact.
+ ///
+ ///
+ /// is different than
+ /// in that it doesn't have a
+ /// . So it is always preserved in the compiled assembly.
+ ///
+ [AttributeUsage(AttributeTargets.All, Inherited = false, AllowMultiple = true)]
+ internal sealed class UnconditionalSuppressMessageAttribute : Attribute
+ {
+ ///
+ /// Initializes a new instance of the
+ /// class, specifying the category of the tool and the identifier for an analysis rule.
+ ///
+ /// The category for the attribute.
+ /// The identifier of the analysis rule the attribute applies to.
+ public UnconditionalSuppressMessageAttribute(string category, string checkId)
+ {
+ Category = category;
+ CheckId = checkId;
+ }
+
+ ///
+ /// Gets the category identifying the classification of the attribute.
+ ///
+ ///
+ /// The property describes the tool or tool analysis category
+ /// for which a message suppression attribute applies.
+ ///
+ public string Category { get; }
+
+ ///
+ /// Gets the identifier of the analysis tool rule to be suppressed.
+ ///
+ ///
+ /// Concatenated together, the and
+ /// properties form a unique check identifier.
+ ///
+ public string CheckId { get; }
+
+ ///
+ /// Gets or sets the scope of the code that is relevant for the attribute.
+ ///
+ ///
+ /// The Scope property is an optional argument that specifies the metadata scope for which
+ /// the attribute is relevant.
+ ///
+ public string Scope { get; set; }
+
+ ///
+ /// Gets or sets a fully qualified path that represents the target of the attribute.
+ ///
+ ///
+ /// The property is an optional argument identifying the analysis target
+ /// of the attribute. An example value is "System.IO.Stream.ctor():System.Void".
+ /// Because it is fully qualified, it can be long, particularly for targets such as parameters.
+ /// The analysis tool user interface should be capable of automatically formatting the parameter.
+ ///
+ public string Target { get; set; }
+
+ ///
+ /// Gets or sets an optional argument expanding on exclusion criteria.
+ ///
+ ///
+ /// The property is an optional argument that specifies additional
+ /// exclusion where the literal metadata target is not sufficiently precise. For example,
+ /// the cannot be applied within a method,
+ /// and it may be desirable to suppress a violation against a statement in the method that will
+ /// give a rule violation, but not against all statements in the method.
+ ///
+ public string MessageId { get; set; }
+
+ ///
+ /// Gets or sets the justification for suppressing the code analysis message.
+ ///
+ public string Justification { get; set; }
+ }
+}
+#endif
diff --git a/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Compatibility/UnconditionalSuppressMessageAttribute.cs.meta b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Compatibility/UnconditionalSuppressMessageAttribute.cs.meta
new file mode 100644
index 00000000..12dfa788
--- /dev/null
+++ b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Compatibility/UnconditionalSuppressMessageAttribute.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: feb4123b3282a414c90d6681fae27237
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Compiler.meta b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Compiler.meta
new file mode 100644
index 00000000..7e1893f4
--- /dev/null
+++ b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Compiler.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 90b05e59ab60a3c45ac3cd31a020e94d
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Compiler/Plugin.pb.cs b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Compiler/Plugin.pb.cs
new file mode 100644
index 00000000..55d7f2eb
--- /dev/null
+++ b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Compiler/Plugin.pb.cs
@@ -0,0 +1,1683 @@
+//
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/protobuf/compiler/plugin.proto
+//
+#pragma warning disable 1591, 0612, 3021, 8981
+#region Designer generated code
+
+using pb = global::Google.Protobuf;
+using pbc = global::Google.Protobuf.Collections;
+using pbr = global::Google.Protobuf.Reflection;
+using scg = global::System.Collections.Generic;
+namespace Google.Protobuf.Compiler {
+
+ /// Holder for reflection information generated from google/protobuf/compiler/plugin.proto
+ public static partial class PluginReflection {
+
+ #region Descriptor
+ /// File descriptor for google/protobuf/compiler/plugin.proto
+ public static pbr::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbr::FileDescriptor descriptor;
+
+ static PluginReflection() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "CiVnb29nbGUvcHJvdG9idWYvY29tcGlsZXIvcGx1Z2luLnByb3RvEhhnb29n",
+ "bGUucHJvdG9idWYuY29tcGlsZXIaIGdvb2dsZS9wcm90b2J1Zi9kZXNjcmlw",
+ "dG9yLnByb3RvIkYKB1ZlcnNpb24SDQoFbWFqb3IYASABKAUSDQoFbWlub3IY",
+ "AiABKAUSDQoFcGF0Y2gYAyABKAUSDgoGc3VmZml4GAQgASgJIoECChRDb2Rl",
+ "R2VuZXJhdG9yUmVxdWVzdBIYChBmaWxlX3RvX2dlbmVyYXRlGAEgAygJEhEK",
+ "CXBhcmFtZXRlchgCIAEoCRI4Cgpwcm90b19maWxlGA8gAygLMiQuZ29vZ2xl",
+ "LnByb3RvYnVmLkZpbGVEZXNjcmlwdG9yUHJvdG8SRQoXc291cmNlX2ZpbGVf",
+ "ZGVzY3JpcHRvcnMYESADKAsyJC5nb29nbGUucHJvdG9idWYuRmlsZURlc2Ny",
+ "aXB0b3JQcm90bxI7ChBjb21waWxlcl92ZXJzaW9uGAMgASgLMiEuZ29vZ2xl",
+ "LnByb3RvYnVmLmNvbXBpbGVyLlZlcnNpb24ikgMKFUNvZGVHZW5lcmF0b3JS",
+ "ZXNwb25zZRINCgVlcnJvchgBIAEoCRIaChJzdXBwb3J0ZWRfZmVhdHVyZXMY",
+ "AiABKAQSFwoPbWluaW11bV9lZGl0aW9uGAMgASgFEhcKD21heGltdW1fZWRp",
+ "dGlvbhgEIAEoBRJCCgRmaWxlGA8gAygLMjQuZ29vZ2xlLnByb3RvYnVmLmNv",
+ "bXBpbGVyLkNvZGVHZW5lcmF0b3JSZXNwb25zZS5GaWxlGn8KBEZpbGUSDAoE",
+ "bmFtZRgBIAEoCRIXCg9pbnNlcnRpb25fcG9pbnQYAiABKAkSDwoHY29udGVu",
+ "dBgPIAEoCRI/ChNnZW5lcmF0ZWRfY29kZV9pbmZvGBAgASgLMiIuZ29vZ2xl",
+ "LnByb3RvYnVmLkdlbmVyYXRlZENvZGVJbmZvIlcKB0ZlYXR1cmUSEAoMRkVB",
+ "VFVSRV9OT05FEAASGwoXRkVBVFVSRV9QUk9UTzNfT1BUSU9OQUwQARIdChlG",
+ "RUFUVVJFX1NVUFBPUlRTX0VESVRJT05TEAJCcgocY29tLmdvb2dsZS5wcm90",
+ "b2J1Zi5jb21waWxlckIMUGx1Z2luUHJvdG9zWilnb29nbGUuZ29sYW5nLm9y",
+ "Zy9wcm90b2J1Zi90eXBlcy9wbHVnaW5wYqoCGEdvb2dsZS5Qcm90b2J1Zi5D",
+ "b21waWxlcg=="));
+ descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
+ new pbr::FileDescriptor[] { global::Google.Protobuf.Reflection.DescriptorReflection.Descriptor, },
+ new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Compiler.Version), global::Google.Protobuf.Compiler.Version.Parser, new[]{ "Major", "Minor", "Patch", "Suffix" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Compiler.CodeGeneratorRequest), global::Google.Protobuf.Compiler.CodeGeneratorRequest.Parser, new[]{ "FileToGenerate", "Parameter", "ProtoFile", "SourceFileDescriptors", "CompilerVersion" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Compiler.CodeGeneratorResponse), global::Google.Protobuf.Compiler.CodeGeneratorResponse.Parser, new[]{ "Error", "SupportedFeatures", "MinimumEdition", "MaximumEdition", "File" }, null, new[]{ typeof(global::Google.Protobuf.Compiler.CodeGeneratorResponse.Types.Feature) }, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Compiler.CodeGeneratorResponse.Types.File), global::Google.Protobuf.Compiler.CodeGeneratorResponse.Types.File.Parser, new[]{ "Name", "InsertionPoint", "Content", "GeneratedCodeInfo" }, null, null, null, null)})
+ }));
+ }
+ #endregion
+
+ }
+ #region Messages
+ ///
+ /// The version number of protocol compiler.
+ ///
+ [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
+ public sealed partial class Version : pb::IMessage
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ , pb::IBufferMessage
+ #endif
+ {
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Version());
+ private pb::UnknownFieldSet _unknownFields;
+ private int _hasBits0;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public static pb::MessageParser Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.Compiler.PluginReflection.Descriptor.MessageTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public Version() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public Version(Version other) : this() {
+ _hasBits0 = other._hasBits0;
+ major_ = other.major_;
+ minor_ = other.minor_;
+ patch_ = other.patch_;
+ suffix_ = other.suffix_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public Version Clone() {
+ return new Version(this);
+ }
+
+ /// Field number for the "major" field.
+ public const int MajorFieldNumber = 1;
+ private readonly static int MajorDefaultValue = 0;
+
+ private int major_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public int Major {
+ get { if ((_hasBits0 & 1) != 0) { return major_; } else { return MajorDefaultValue; } }
+ set {
+ _hasBits0 |= 1;
+ major_ = value;
+ }
+ }
+ /// Gets whether the "major" field is set
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool HasMajor {
+ get { return (_hasBits0 & 1) != 0; }
+ }
+ /// Clears the value of the "major" field
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void ClearMajor() {
+ _hasBits0 &= ~1;
+ }
+
+ /// Field number for the "minor" field.
+ public const int MinorFieldNumber = 2;
+ private readonly static int MinorDefaultValue = 0;
+
+ private int minor_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public int Minor {
+ get { if ((_hasBits0 & 2) != 0) { return minor_; } else { return MinorDefaultValue; } }
+ set {
+ _hasBits0 |= 2;
+ minor_ = value;
+ }
+ }
+ /// Gets whether the "minor" field is set
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool HasMinor {
+ get { return (_hasBits0 & 2) != 0; }
+ }
+ /// Clears the value of the "minor" field
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void ClearMinor() {
+ _hasBits0 &= ~2;
+ }
+
+ /// Field number for the "patch" field.
+ public const int PatchFieldNumber = 3;
+ private readonly static int PatchDefaultValue = 0;
+
+ private int patch_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public int Patch {
+ get { if ((_hasBits0 & 4) != 0) { return patch_; } else { return PatchDefaultValue; } }
+ set {
+ _hasBits0 |= 4;
+ patch_ = value;
+ }
+ }
+ /// Gets whether the "patch" field is set
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool HasPatch {
+ get { return (_hasBits0 & 4) != 0; }
+ }
+ /// Clears the value of the "patch" field
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void ClearPatch() {
+ _hasBits0 &= ~4;
+ }
+
+ /// Field number for the "suffix" field.
+ public const int SuffixFieldNumber = 4;
+ private readonly static string SuffixDefaultValue = "";
+
+ private string suffix_;
+ ///
+ /// A suffix for alpha, beta or rc release, e.g., "alpha-1", "rc2". It should
+ /// be empty for mainline stable releases.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public string Suffix {
+ get { return suffix_ ?? SuffixDefaultValue; }
+ set {
+ suffix_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+ /// Gets whether the "suffix" field is set
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool HasSuffix {
+ get { return suffix_ != null; }
+ }
+ /// Clears the value of the "suffix" field
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void ClearSuffix() {
+ suffix_ = null;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override bool Equals(object other) {
+ return Equals(other as Version);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool Equals(Version other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (Major != other.Major) return false;
+ if (Minor != other.Minor) return false;
+ if (Patch != other.Patch) return false;
+ if (Suffix != other.Suffix) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasMajor) hash ^= Major.GetHashCode();
+ if (HasMinor) hash ^= Minor.GetHashCode();
+ if (HasPatch) hash ^= Patch.GetHashCode();
+ if (HasSuffix) hash ^= Suffix.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void WriteTo(pb::CodedOutputStream output) {
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ output.WriteRawMessage(this);
+ #else
+ if (HasMajor) {
+ output.WriteRawTag(8);
+ output.WriteInt32(Major);
+ }
+ if (HasMinor) {
+ output.WriteRawTag(16);
+ output.WriteInt32(Minor);
+ }
+ if (HasPatch) {
+ output.WriteRawTag(24);
+ output.WriteInt32(Patch);
+ }
+ if (HasSuffix) {
+ output.WriteRawTag(34);
+ output.WriteString(Suffix);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ #endif
+ }
+
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
+ if (HasMajor) {
+ output.WriteRawTag(8);
+ output.WriteInt32(Major);
+ }
+ if (HasMinor) {
+ output.WriteRawTag(16);
+ output.WriteInt32(Minor);
+ }
+ if (HasPatch) {
+ output.WriteRawTag(24);
+ output.WriteInt32(Patch);
+ }
+ if (HasSuffix) {
+ output.WriteRawTag(34);
+ output.WriteString(Suffix);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(ref output);
+ }
+ }
+ #endif
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasMajor) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(Major);
+ }
+ if (HasMinor) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(Minor);
+ }
+ if (HasPatch) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(Patch);
+ }
+ if (HasSuffix) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(Suffix);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void MergeFrom(Version other) {
+ if (other == null) {
+ return;
+ }
+ if (other.HasMajor) {
+ Major = other.Major;
+ }
+ if (other.HasMinor) {
+ Minor = other.Minor;
+ }
+ if (other.HasPatch) {
+ Patch = other.Patch;
+ }
+ if (other.HasSuffix) {
+ Suffix = other.Suffix;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void MergeFrom(pb::CodedInputStream input) {
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ input.ReadRawMessage(this);
+ #else
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ if ((tag & 7) == 4) {
+ // Abort on any end group tag.
+ return;
+ }
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 8: {
+ Major = input.ReadInt32();
+ break;
+ }
+ case 16: {
+ Minor = input.ReadInt32();
+ break;
+ }
+ case 24: {
+ Patch = input.ReadInt32();
+ break;
+ }
+ case 34: {
+ Suffix = input.ReadString();
+ break;
+ }
+ }
+ }
+ #endif
+ }
+
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ if ((tag & 7) == 4) {
+ // Abort on any end group tag.
+ return;
+ }
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
+ break;
+ case 8: {
+ Major = input.ReadInt32();
+ break;
+ }
+ case 16: {
+ Minor = input.ReadInt32();
+ break;
+ }
+ case 24: {
+ Patch = input.ReadInt32();
+ break;
+ }
+ case 34: {
+ Suffix = input.ReadString();
+ break;
+ }
+ }
+ }
+ }
+ #endif
+
+ }
+
+ ///
+ /// An encoded CodeGeneratorRequest is written to the plugin's stdin.
+ ///
+ [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
+ public sealed partial class CodeGeneratorRequest : pb::IMessage
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ , pb::IBufferMessage
+ #endif
+ {
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new CodeGeneratorRequest());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public static pb::MessageParser Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.Compiler.PluginReflection.Descriptor.MessageTypes[1]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public CodeGeneratorRequest() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public CodeGeneratorRequest(CodeGeneratorRequest other) : this() {
+ fileToGenerate_ = other.fileToGenerate_.Clone();
+ parameter_ = other.parameter_;
+ protoFile_ = other.protoFile_.Clone();
+ sourceFileDescriptors_ = other.sourceFileDescriptors_.Clone();
+ compilerVersion_ = other.compilerVersion_ != null ? other.compilerVersion_.Clone() : null;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public CodeGeneratorRequest Clone() {
+ return new CodeGeneratorRequest(this);
+ }
+
+ /// Field number for the "file_to_generate" field.
+ public const int FileToGenerateFieldNumber = 1;
+ private static readonly pb::FieldCodec _repeated_fileToGenerate_codec
+ = pb::FieldCodec.ForString(10);
+ private readonly pbc::RepeatedField fileToGenerate_ = new pbc::RepeatedField();
+ ///
+ /// The .proto files that were explicitly listed on the command-line. The
+ /// code generator should generate code only for these files. Each file's
+ /// descriptor will be included in proto_file, below.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public pbc::RepeatedField FileToGenerate {
+ get { return fileToGenerate_; }
+ }
+
+ /// Field number for the "parameter" field.
+ public const int ParameterFieldNumber = 2;
+ private readonly static string ParameterDefaultValue = "";
+
+ private string parameter_;
+ ///
+ /// The generator parameter passed on the command-line.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public string Parameter {
+ get { return parameter_ ?? ParameterDefaultValue; }
+ set {
+ parameter_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+ /// Gets whether the "parameter" field is set
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool HasParameter {
+ get { return parameter_ != null; }
+ }
+ /// Clears the value of the "parameter" field
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void ClearParameter() {
+ parameter_ = null;
+ }
+
+ /// Field number for the "proto_file" field.
+ public const int ProtoFileFieldNumber = 15;
+ private static readonly pb::FieldCodec _repeated_protoFile_codec
+ = pb::FieldCodec.ForMessage(122, global::Google.Protobuf.Reflection.FileDescriptorProto.Parser);
+ private readonly pbc::RepeatedField protoFile_ = new pbc::RepeatedField();
+ ///
+ /// FileDescriptorProtos for all files in files_to_generate and everything
+ /// they import. The files will appear in topological order, so each file
+ /// appears before any file that imports it.
+ ///
+ /// Note: the files listed in files_to_generate will include runtime-retention
+ /// options only, but all other files will include source-retention options.
+ /// The source_file_descriptors field below is available in case you need
+ /// source-retention options for files_to_generate.
+ ///
+ /// protoc guarantees that all proto_files will be written after
+ /// the fields above, even though this is not technically guaranteed by the
+ /// protobuf wire format. This theoretically could allow a plugin to stream
+ /// in the FileDescriptorProtos and handle them one by one rather than read
+ /// the entire set into memory at once. However, as of this writing, this
+ /// is not similarly optimized on protoc's end -- it will store all fields in
+ /// memory at once before sending them to the plugin.
+ ///
+ /// Type names of fields and extensions in the FileDescriptorProto are always
+ /// fully qualified.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public pbc::RepeatedField ProtoFile {
+ get { return protoFile_; }
+ }
+
+ /// Field number for the "source_file_descriptors" field.
+ public const int SourceFileDescriptorsFieldNumber = 17;
+ private static readonly pb::FieldCodec _repeated_sourceFileDescriptors_codec
+ = pb::FieldCodec.ForMessage(138, global::Google.Protobuf.Reflection.FileDescriptorProto.Parser);
+ private readonly pbc::RepeatedField sourceFileDescriptors_ = new pbc::RepeatedField();
+ ///
+ /// File descriptors with all options, including source-retention options.
+ /// These descriptors are only provided for the files listed in
+ /// files_to_generate.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public pbc::RepeatedField SourceFileDescriptors {
+ get { return sourceFileDescriptors_; }
+ }
+
+ /// Field number for the "compiler_version" field.
+ public const int CompilerVersionFieldNumber = 3;
+ private global::Google.Protobuf.Compiler.Version compilerVersion_;
+ ///
+ /// The version number of protocol compiler.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public global::Google.Protobuf.Compiler.Version CompilerVersion {
+ get { return compilerVersion_; }
+ set {
+ compilerVersion_ = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override bool Equals(object other) {
+ return Equals(other as CodeGeneratorRequest);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool Equals(CodeGeneratorRequest other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if(!fileToGenerate_.Equals(other.fileToGenerate_)) return false;
+ if (Parameter != other.Parameter) return false;
+ if(!protoFile_.Equals(other.protoFile_)) return false;
+ if(!sourceFileDescriptors_.Equals(other.sourceFileDescriptors_)) return false;
+ if (!object.Equals(CompilerVersion, other.CompilerVersion)) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override int GetHashCode() {
+ int hash = 1;
+ hash ^= fileToGenerate_.GetHashCode();
+ if (HasParameter) hash ^= Parameter.GetHashCode();
+ hash ^= protoFile_.GetHashCode();
+ hash ^= sourceFileDescriptors_.GetHashCode();
+ if (compilerVersion_ != null) hash ^= CompilerVersion.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void WriteTo(pb::CodedOutputStream output) {
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ output.WriteRawMessage(this);
+ #else
+ fileToGenerate_.WriteTo(output, _repeated_fileToGenerate_codec);
+ if (HasParameter) {
+ output.WriteRawTag(18);
+ output.WriteString(Parameter);
+ }
+ if (compilerVersion_ != null) {
+ output.WriteRawTag(26);
+ output.WriteMessage(CompilerVersion);
+ }
+ protoFile_.WriteTo(output, _repeated_protoFile_codec);
+ sourceFileDescriptors_.WriteTo(output, _repeated_sourceFileDescriptors_codec);
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ #endif
+ }
+
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
+ fileToGenerate_.WriteTo(ref output, _repeated_fileToGenerate_codec);
+ if (HasParameter) {
+ output.WriteRawTag(18);
+ output.WriteString(Parameter);
+ }
+ if (compilerVersion_ != null) {
+ output.WriteRawTag(26);
+ output.WriteMessage(CompilerVersion);
+ }
+ protoFile_.WriteTo(ref output, _repeated_protoFile_codec);
+ sourceFileDescriptors_.WriteTo(ref output, _repeated_sourceFileDescriptors_codec);
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(ref output);
+ }
+ }
+ #endif
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public int CalculateSize() {
+ int size = 0;
+ size += fileToGenerate_.CalculateSize(_repeated_fileToGenerate_codec);
+ if (HasParameter) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(Parameter);
+ }
+ size += protoFile_.CalculateSize(_repeated_protoFile_codec);
+ size += sourceFileDescriptors_.CalculateSize(_repeated_sourceFileDescriptors_codec);
+ if (compilerVersion_ != null) {
+ size += 1 + pb::CodedOutputStream.ComputeMessageSize(CompilerVersion);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void MergeFrom(CodeGeneratorRequest other) {
+ if (other == null) {
+ return;
+ }
+ fileToGenerate_.Add(other.fileToGenerate_);
+ if (other.HasParameter) {
+ Parameter = other.Parameter;
+ }
+ protoFile_.Add(other.protoFile_);
+ sourceFileDescriptors_.Add(other.sourceFileDescriptors_);
+ if (other.compilerVersion_ != null) {
+ if (compilerVersion_ == null) {
+ CompilerVersion = new global::Google.Protobuf.Compiler.Version();
+ }
+ CompilerVersion.MergeFrom(other.CompilerVersion);
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void MergeFrom(pb::CodedInputStream input) {
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ input.ReadRawMessage(this);
+ #else
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ if ((tag & 7) == 4) {
+ // Abort on any end group tag.
+ return;
+ }
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 10: {
+ fileToGenerate_.AddEntriesFrom(input, _repeated_fileToGenerate_codec);
+ break;
+ }
+ case 18: {
+ Parameter = input.ReadString();
+ break;
+ }
+ case 26: {
+ if (compilerVersion_ == null) {
+ CompilerVersion = new global::Google.Protobuf.Compiler.Version();
+ }
+ input.ReadMessage(CompilerVersion);
+ break;
+ }
+ case 122: {
+ protoFile_.AddEntriesFrom(input, _repeated_protoFile_codec);
+ break;
+ }
+ case 138: {
+ sourceFileDescriptors_.AddEntriesFrom(input, _repeated_sourceFileDescriptors_codec);
+ break;
+ }
+ }
+ }
+ #endif
+ }
+
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ if ((tag & 7) == 4) {
+ // Abort on any end group tag.
+ return;
+ }
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
+ break;
+ case 10: {
+ fileToGenerate_.AddEntriesFrom(ref input, _repeated_fileToGenerate_codec);
+ break;
+ }
+ case 18: {
+ Parameter = input.ReadString();
+ break;
+ }
+ case 26: {
+ if (compilerVersion_ == null) {
+ CompilerVersion = new global::Google.Protobuf.Compiler.Version();
+ }
+ input.ReadMessage(CompilerVersion);
+ break;
+ }
+ case 122: {
+ protoFile_.AddEntriesFrom(ref input, _repeated_protoFile_codec);
+ break;
+ }
+ case 138: {
+ sourceFileDescriptors_.AddEntriesFrom(ref input, _repeated_sourceFileDescriptors_codec);
+ break;
+ }
+ }
+ }
+ }
+ #endif
+
+ }
+
+ ///
+ /// The plugin writes an encoded CodeGeneratorResponse to stdout.
+ ///
+ [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
+ public sealed partial class CodeGeneratorResponse : pb::IMessage
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ , pb::IBufferMessage
+ #endif
+ {
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new CodeGeneratorResponse());
+ private pb::UnknownFieldSet _unknownFields;
+ private int _hasBits0;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public static pb::MessageParser Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.Compiler.PluginReflection.Descriptor.MessageTypes[2]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public CodeGeneratorResponse() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public CodeGeneratorResponse(CodeGeneratorResponse other) : this() {
+ _hasBits0 = other._hasBits0;
+ error_ = other.error_;
+ supportedFeatures_ = other.supportedFeatures_;
+ minimumEdition_ = other.minimumEdition_;
+ maximumEdition_ = other.maximumEdition_;
+ file_ = other.file_.Clone();
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public CodeGeneratorResponse Clone() {
+ return new CodeGeneratorResponse(this);
+ }
+
+ /// Field number for the "error" field.
+ public const int ErrorFieldNumber = 1;
+ private readonly static string ErrorDefaultValue = "";
+
+ private string error_;
+ ///
+ /// Error message. If non-empty, code generation failed. The plugin process
+ /// should exit with status code zero even if it reports an error in this way.
+ ///
+ /// This should be used to indicate errors in .proto files which prevent the
+ /// code generator from generating correct code. Errors which indicate a
+ /// problem in protoc itself -- such as the input CodeGeneratorRequest being
+ /// unparseable -- should be reported by writing a message to stderr and
+ /// exiting with a non-zero status code.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public string Error {
+ get { return error_ ?? ErrorDefaultValue; }
+ set {
+ error_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+ /// Gets whether the "error" field is set
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool HasError {
+ get { return error_ != null; }
+ }
+ /// Clears the value of the "error" field
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void ClearError() {
+ error_ = null;
+ }
+
+ /// Field number for the "supported_features" field.
+ public const int SupportedFeaturesFieldNumber = 2;
+ private readonly static ulong SupportedFeaturesDefaultValue = 0UL;
+
+ private ulong supportedFeatures_;
+ ///
+ /// A bitmask of supported features that the code generator supports.
+ /// This is a bitwise "or" of values from the Feature enum.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public ulong SupportedFeatures {
+ get { if ((_hasBits0 & 1) != 0) { return supportedFeatures_; } else { return SupportedFeaturesDefaultValue; } }
+ set {
+ _hasBits0 |= 1;
+ supportedFeatures_ = value;
+ }
+ }
+ /// Gets whether the "supported_features" field is set
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool HasSupportedFeatures {
+ get { return (_hasBits0 & 1) != 0; }
+ }
+ /// Clears the value of the "supported_features" field
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void ClearSupportedFeatures() {
+ _hasBits0 &= ~1;
+ }
+
+ /// Field number for the "minimum_edition" field.
+ public const int MinimumEditionFieldNumber = 3;
+ private readonly static int MinimumEditionDefaultValue = 0;
+
+ private int minimumEdition_;
+ ///
+ /// The minimum edition this plugin supports. This will be treated as an
+ /// Edition enum, but we want to allow unknown values. It should be specified
+ /// according the edition enum value, *not* the edition number. Only takes
+ /// effect for plugins that have FEATURE_SUPPORTS_EDITIONS set.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public int MinimumEdition {
+ get { if ((_hasBits0 & 2) != 0) { return minimumEdition_; } else { return MinimumEditionDefaultValue; } }
+ set {
+ _hasBits0 |= 2;
+ minimumEdition_ = value;
+ }
+ }
+ /// Gets whether the "minimum_edition" field is set
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool HasMinimumEdition {
+ get { return (_hasBits0 & 2) != 0; }
+ }
+ /// Clears the value of the "minimum_edition" field
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void ClearMinimumEdition() {
+ _hasBits0 &= ~2;
+ }
+
+ /// Field number for the "maximum_edition" field.
+ public const int MaximumEditionFieldNumber = 4;
+ private readonly static int MaximumEditionDefaultValue = 0;
+
+ private int maximumEdition_;
+ ///
+ /// The maximum edition this plugin supports. This will be treated as an
+ /// Edition enum, but we want to allow unknown values. It should be specified
+ /// according the edition enum value, *not* the edition number. Only takes
+ /// effect for plugins that have FEATURE_SUPPORTS_EDITIONS set.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public int MaximumEdition {
+ get { if ((_hasBits0 & 4) != 0) { return maximumEdition_; } else { return MaximumEditionDefaultValue; } }
+ set {
+ _hasBits0 |= 4;
+ maximumEdition_ = value;
+ }
+ }
+ /// Gets whether the "maximum_edition" field is set
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool HasMaximumEdition {
+ get { return (_hasBits0 & 4) != 0; }
+ }
+ /// Clears the value of the "maximum_edition" field
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void ClearMaximumEdition() {
+ _hasBits0 &= ~4;
+ }
+
+ /// Field number for the "file" field.
+ public const int FileFieldNumber = 15;
+ private static readonly pb::FieldCodec _repeated_file_codec
+ = pb::FieldCodec.ForMessage(122, global::Google.Protobuf.Compiler.CodeGeneratorResponse.Types.File.Parser);
+ private readonly pbc::RepeatedField file_ = new pbc::RepeatedField();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public pbc::RepeatedField File {
+ get { return file_; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override bool Equals(object other) {
+ return Equals(other as CodeGeneratorResponse);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool Equals(CodeGeneratorResponse other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (Error != other.Error) return false;
+ if (SupportedFeatures != other.SupportedFeatures) return false;
+ if (MinimumEdition != other.MinimumEdition) return false;
+ if (MaximumEdition != other.MaximumEdition) return false;
+ if(!file_.Equals(other.file_)) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasError) hash ^= Error.GetHashCode();
+ if (HasSupportedFeatures) hash ^= SupportedFeatures.GetHashCode();
+ if (HasMinimumEdition) hash ^= MinimumEdition.GetHashCode();
+ if (HasMaximumEdition) hash ^= MaximumEdition.GetHashCode();
+ hash ^= file_.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void WriteTo(pb::CodedOutputStream output) {
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ output.WriteRawMessage(this);
+ #else
+ if (HasError) {
+ output.WriteRawTag(10);
+ output.WriteString(Error);
+ }
+ if (HasSupportedFeatures) {
+ output.WriteRawTag(16);
+ output.WriteUInt64(SupportedFeatures);
+ }
+ if (HasMinimumEdition) {
+ output.WriteRawTag(24);
+ output.WriteInt32(MinimumEdition);
+ }
+ if (HasMaximumEdition) {
+ output.WriteRawTag(32);
+ output.WriteInt32(MaximumEdition);
+ }
+ file_.WriteTo(output, _repeated_file_codec);
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ #endif
+ }
+
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
+ if (HasError) {
+ output.WriteRawTag(10);
+ output.WriteString(Error);
+ }
+ if (HasSupportedFeatures) {
+ output.WriteRawTag(16);
+ output.WriteUInt64(SupportedFeatures);
+ }
+ if (HasMinimumEdition) {
+ output.WriteRawTag(24);
+ output.WriteInt32(MinimumEdition);
+ }
+ if (HasMaximumEdition) {
+ output.WriteRawTag(32);
+ output.WriteInt32(MaximumEdition);
+ }
+ file_.WriteTo(ref output, _repeated_file_codec);
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(ref output);
+ }
+ }
+ #endif
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasError) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(Error);
+ }
+ if (HasSupportedFeatures) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt64Size(SupportedFeatures);
+ }
+ if (HasMinimumEdition) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(MinimumEdition);
+ }
+ if (HasMaximumEdition) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(MaximumEdition);
+ }
+ size += file_.CalculateSize(_repeated_file_codec);
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void MergeFrom(CodeGeneratorResponse other) {
+ if (other == null) {
+ return;
+ }
+ if (other.HasError) {
+ Error = other.Error;
+ }
+ if (other.HasSupportedFeatures) {
+ SupportedFeatures = other.SupportedFeatures;
+ }
+ if (other.HasMinimumEdition) {
+ MinimumEdition = other.MinimumEdition;
+ }
+ if (other.HasMaximumEdition) {
+ MaximumEdition = other.MaximumEdition;
+ }
+ file_.Add(other.file_);
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void MergeFrom(pb::CodedInputStream input) {
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ input.ReadRawMessage(this);
+ #else
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ if ((tag & 7) == 4) {
+ // Abort on any end group tag.
+ return;
+ }
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 10: {
+ Error = input.ReadString();
+ break;
+ }
+ case 16: {
+ SupportedFeatures = input.ReadUInt64();
+ break;
+ }
+ case 24: {
+ MinimumEdition = input.ReadInt32();
+ break;
+ }
+ case 32: {
+ MaximumEdition = input.ReadInt32();
+ break;
+ }
+ case 122: {
+ file_.AddEntriesFrom(input, _repeated_file_codec);
+ break;
+ }
+ }
+ }
+ #endif
+ }
+
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ if ((tag & 7) == 4) {
+ // Abort on any end group tag.
+ return;
+ }
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
+ break;
+ case 10: {
+ Error = input.ReadString();
+ break;
+ }
+ case 16: {
+ SupportedFeatures = input.ReadUInt64();
+ break;
+ }
+ case 24: {
+ MinimumEdition = input.ReadInt32();
+ break;
+ }
+ case 32: {
+ MaximumEdition = input.ReadInt32();
+ break;
+ }
+ case 122: {
+ file_.AddEntriesFrom(ref input, _repeated_file_codec);
+ break;
+ }
+ }
+ }
+ }
+ #endif
+
+ #region Nested types
+ /// Container for nested types declared in the CodeGeneratorResponse message type.
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public static partial class Types {
+ ///
+ /// Sync with code_generator.h.
+ ///
+ public enum Feature {
+ [pbr::OriginalName("FEATURE_NONE")] None = 0,
+ [pbr::OriginalName("FEATURE_PROTO3_OPTIONAL")] Proto3Optional = 1,
+ [pbr::OriginalName("FEATURE_SUPPORTS_EDITIONS")] SupportsEditions = 2,
+ }
+
+ ///
+ /// Represents a single generated file.
+ ///
+ [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
+ public sealed partial class File : pb::IMessage
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ , pb::IBufferMessage
+ #endif
+ {
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new File());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public static pb::MessageParser Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.Compiler.CodeGeneratorResponse.Descriptor.NestedTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public File() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public File(File other) : this() {
+ name_ = other.name_;
+ insertionPoint_ = other.insertionPoint_;
+ content_ = other.content_;
+ generatedCodeInfo_ = other.generatedCodeInfo_ != null ? other.generatedCodeInfo_.Clone() : null;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public File Clone() {
+ return new File(this);
+ }
+
+ /// Field number for the "name" field.
+ public const int NameFieldNumber = 1;
+ private readonly static string NameDefaultValue = "";
+
+ private string name_;
+ ///
+ /// The file name, relative to the output directory. The name must not
+ /// contain "." or ".." components and must be relative, not be absolute (so,
+ /// the file cannot lie outside the output directory). "/" must be used as
+ /// the path separator, not "\".
+ ///
+ /// If the name is omitted, the content will be appended to the previous
+ /// file. This allows the generator to break large files into small chunks,
+ /// and allows the generated text to be streamed back to protoc so that large
+ /// files need not reside completely in memory at one time. Note that as of
+ /// this writing protoc does not optimize for this -- it will read the entire
+ /// CodeGeneratorResponse before writing files to disk.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public string Name {
+ get { return name_ ?? NameDefaultValue; }
+ set {
+ name_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+ /// Gets whether the "name" field is set
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool HasName {
+ get { return name_ != null; }
+ }
+ /// Clears the value of the "name" field
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void ClearName() {
+ name_ = null;
+ }
+
+ /// Field number for the "insertion_point" field.
+ public const int InsertionPointFieldNumber = 2;
+ private readonly static string InsertionPointDefaultValue = "";
+
+ private string insertionPoint_;
+ ///
+ /// If non-empty, indicates that the named file should already exist, and the
+ /// content here is to be inserted into that file at a defined insertion
+ /// point. This feature allows a code generator to extend the output
+ /// produced by another code generator. The original generator may provide
+ /// insertion points by placing special annotations in the file that look
+ /// like:
+ /// @@protoc_insertion_point(NAME)
+ /// The annotation can have arbitrary text before and after it on the line,
+ /// which allows it to be placed in a comment. NAME should be replaced with
+ /// an identifier naming the point -- this is what other generators will use
+ /// as the insertion_point. Code inserted at this point will be placed
+ /// immediately above the line containing the insertion point (thus multiple
+ /// insertions to the same point will come out in the order they were added).
+ /// The double-@ is intended to make it unlikely that the generated code
+ /// could contain things that look like insertion points by accident.
+ ///
+ /// For example, the C++ code generator places the following line in the
+ /// .pb.h files that it generates:
+ /// // @@protoc_insertion_point(namespace_scope)
+ /// This line appears within the scope of the file's package namespace, but
+ /// outside of any particular class. Another plugin can then specify the
+ /// insertion_point "namespace_scope" to generate additional classes or
+ /// other declarations that should be placed in this scope.
+ ///
+ /// Note that if the line containing the insertion point begins with
+ /// whitespace, the same whitespace will be added to every line of the
+ /// inserted text. This is useful for languages like Python, where
+ /// indentation matters. In these languages, the insertion point comment
+ /// should be indented the same amount as any inserted code will need to be
+ /// in order to work correctly in that context.
+ ///
+ /// The code generator that generates the initial file and the one which
+ /// inserts into it must both run as part of a single invocation of protoc.
+ /// Code generators are executed in the order in which they appear on the
+ /// command line.
+ ///
+ /// If |insertion_point| is present, |name| must also be present.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public string InsertionPoint {
+ get { return insertionPoint_ ?? InsertionPointDefaultValue; }
+ set {
+ insertionPoint_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+ /// Gets whether the "insertion_point" field is set
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool HasInsertionPoint {
+ get { return insertionPoint_ != null; }
+ }
+ /// Clears the value of the "insertion_point" field
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void ClearInsertionPoint() {
+ insertionPoint_ = null;
+ }
+
+ /// Field number for the "content" field.
+ public const int ContentFieldNumber = 15;
+ private readonly static string ContentDefaultValue = "";
+
+ private string content_;
+ ///
+ /// The file contents.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public string Content {
+ get { return content_ ?? ContentDefaultValue; }
+ set {
+ content_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+ /// Gets whether the "content" field is set
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool HasContent {
+ get { return content_ != null; }
+ }
+ /// Clears the value of the "content" field
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void ClearContent() {
+ content_ = null;
+ }
+
+ /// Field number for the "generated_code_info" field.
+ public const int GeneratedCodeInfoFieldNumber = 16;
+ private global::Google.Protobuf.Reflection.GeneratedCodeInfo generatedCodeInfo_;
+ ///
+ /// Information describing the file content being inserted. If an insertion
+ /// point is used, this information will be appropriately offset and inserted
+ /// into the code generation metadata for the generated files.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public global::Google.Protobuf.Reflection.GeneratedCodeInfo GeneratedCodeInfo {
+ get { return generatedCodeInfo_; }
+ set {
+ generatedCodeInfo_ = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override bool Equals(object other) {
+ return Equals(other as File);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool Equals(File other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (Name != other.Name) return false;
+ if (InsertionPoint != other.InsertionPoint) return false;
+ if (Content != other.Content) return false;
+ if (!object.Equals(GeneratedCodeInfo, other.GeneratedCodeInfo)) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasName) hash ^= Name.GetHashCode();
+ if (HasInsertionPoint) hash ^= InsertionPoint.GetHashCode();
+ if (HasContent) hash ^= Content.GetHashCode();
+ if (generatedCodeInfo_ != null) hash ^= GeneratedCodeInfo.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void WriteTo(pb::CodedOutputStream output) {
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ output.WriteRawMessage(this);
+ #else
+ if (HasName) {
+ output.WriteRawTag(10);
+ output.WriteString(Name);
+ }
+ if (HasInsertionPoint) {
+ output.WriteRawTag(18);
+ output.WriteString(InsertionPoint);
+ }
+ if (HasContent) {
+ output.WriteRawTag(122);
+ output.WriteString(Content);
+ }
+ if (generatedCodeInfo_ != null) {
+ output.WriteRawTag(130, 1);
+ output.WriteMessage(GeneratedCodeInfo);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ #endif
+ }
+
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
+ if (HasName) {
+ output.WriteRawTag(10);
+ output.WriteString(Name);
+ }
+ if (HasInsertionPoint) {
+ output.WriteRawTag(18);
+ output.WriteString(InsertionPoint);
+ }
+ if (HasContent) {
+ output.WriteRawTag(122);
+ output.WriteString(Content);
+ }
+ if (generatedCodeInfo_ != null) {
+ output.WriteRawTag(130, 1);
+ output.WriteMessage(GeneratedCodeInfo);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(ref output);
+ }
+ }
+ #endif
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasName) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(Name);
+ }
+ if (HasInsertionPoint) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(InsertionPoint);
+ }
+ if (HasContent) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(Content);
+ }
+ if (generatedCodeInfo_ != null) {
+ size += 2 + pb::CodedOutputStream.ComputeMessageSize(GeneratedCodeInfo);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void MergeFrom(File other) {
+ if (other == null) {
+ return;
+ }
+ if (other.HasName) {
+ Name = other.Name;
+ }
+ if (other.HasInsertionPoint) {
+ InsertionPoint = other.InsertionPoint;
+ }
+ if (other.HasContent) {
+ Content = other.Content;
+ }
+ if (other.generatedCodeInfo_ != null) {
+ if (generatedCodeInfo_ == null) {
+ GeneratedCodeInfo = new global::Google.Protobuf.Reflection.GeneratedCodeInfo();
+ }
+ GeneratedCodeInfo.MergeFrom(other.GeneratedCodeInfo);
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void MergeFrom(pb::CodedInputStream input) {
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ input.ReadRawMessage(this);
+ #else
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ if ((tag & 7) == 4) {
+ // Abort on any end group tag.
+ return;
+ }
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 10: {
+ Name = input.ReadString();
+ break;
+ }
+ case 18: {
+ InsertionPoint = input.ReadString();
+ break;
+ }
+ case 122: {
+ Content = input.ReadString();
+ break;
+ }
+ case 130: {
+ if (generatedCodeInfo_ == null) {
+ GeneratedCodeInfo = new global::Google.Protobuf.Reflection.GeneratedCodeInfo();
+ }
+ input.ReadMessage(GeneratedCodeInfo);
+ break;
+ }
+ }
+ }
+ #endif
+ }
+
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ if ((tag & 7) == 4) {
+ // Abort on any end group tag.
+ return;
+ }
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
+ break;
+ case 10: {
+ Name = input.ReadString();
+ break;
+ }
+ case 18: {
+ InsertionPoint = input.ReadString();
+ break;
+ }
+ case 122: {
+ Content = input.ReadString();
+ break;
+ }
+ case 130: {
+ if (generatedCodeInfo_ == null) {
+ GeneratedCodeInfo = new global::Google.Protobuf.Reflection.GeneratedCodeInfo();
+ }
+ input.ReadMessage(GeneratedCodeInfo);
+ break;
+ }
+ }
+ }
+ }
+ #endif
+
+ }
+
+ }
+ #endregion
+
+ }
+
+ #endregion
+
+}
+
+#endregion Designer generated code
diff --git a/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Compiler/Plugin.pb.cs.meta b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Compiler/Plugin.pb.cs.meta
new file mode 100644
index 00000000..be8a3aff
--- /dev/null
+++ b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Compiler/Plugin.pb.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 4a3c61a5c6e34a04eb99c780ac05b978
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Extension.cs b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Extension.cs
new file mode 100644
index 00000000..31522a93
--- /dev/null
+++ b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Extension.cs
@@ -0,0 +1,96 @@
+#region Copyright notice and license
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+//
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file or at
+// https://developers.google.com/open-source/licenses/bsd
+#endregion
+
+using System;
+
+namespace Google.Protobuf
+{
+ ///
+ /// Represents a non-generic extension definition. This API is experimental and subject to change.
+ ///
+ public abstract class Extension
+ {
+ internal abstract Type TargetType { get; }
+
+ ///
+ /// Internal use. Creates a new extension with the specified field number.
+ ///
+ protected Extension(int fieldNumber)
+ {
+ FieldNumber = fieldNumber;
+ }
+
+ internal abstract IExtensionValue CreateValue();
+
+ ///
+ /// Gets the field number of this extension
+ ///
+ public int FieldNumber { get; }
+
+ internal abstract bool IsRepeated { get; }
+ }
+
+ ///
+ /// Represents a type-safe extension identifier used for getting and setting single extension values in instances.
+ /// This API is experimental and subject to change.
+ ///
+ /// The message type this field applies to
+ /// The field value type of this extension
+ public sealed class Extension : Extension where TTarget : IExtendableMessage
+ {
+ private readonly FieldCodec codec;
+
+ ///
+ /// Creates a new extension identifier with the specified field number and codec
+ ///
+ public Extension(int fieldNumber, FieldCodec codec) : base(fieldNumber)
+ {
+ this.codec = codec;
+ }
+
+ internal TValue DefaultValue => codec != null ? codec.DefaultValue : default;
+
+ internal override Type TargetType => typeof(TTarget);
+
+ internal override bool IsRepeated => false;
+
+ internal override IExtensionValue CreateValue()
+ {
+ return new ExtensionValue(codec);
+ }
+ }
+
+ ///
+ /// Represents a type-safe extension identifier used for getting repeated extension values in instances.
+ /// This API is experimental and subject to change.
+ ///
+ /// The message type this field applies to
+ /// The repeated field value type of this extension
+ public sealed class RepeatedExtension : Extension where TTarget : IExtendableMessage
+ {
+ private readonly FieldCodec codec;
+
+ ///
+ /// Creates a new repeated extension identifier with the specified field number and codec
+ ///
+ public RepeatedExtension(int fieldNumber, FieldCodec codec) : base(fieldNumber)
+ {
+ this.codec = codec;
+ }
+
+ internal override Type TargetType => typeof(TTarget);
+
+ internal override bool IsRepeated => true;
+
+ internal override IExtensionValue CreateValue()
+ {
+ return new RepeatedExtensionValue(codec);
+ }
+ }
+}
diff --git a/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Extension.cs.meta b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Extension.cs.meta
new file mode 100644
index 00000000..89241975
--- /dev/null
+++ b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/Extension.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: c0f4f2e1ac71991488403d126ab9954f
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/ExtensionRegistry.cs b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/ExtensionRegistry.cs
new file mode 100644
index 00000000..9c02c2e3
--- /dev/null
+++ b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/ExtensionRegistry.cs
@@ -0,0 +1,161 @@
+#region Copyright notice and license
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+//
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file or at
+// https://developers.google.com/open-source/licenses/bsd
+#endregion
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace Google.Protobuf
+{
+ ///
+ /// Provides extensions to messages while parsing. This API is experimental and subject to change.
+ ///
+ public sealed class ExtensionRegistry : ICollection, IDeepCloneable
+ {
+ internal sealed class ExtensionComparer : IEqualityComparer
+ {
+ public bool Equals(Extension a, Extension b)
+ {
+ return new ObjectIntPair(a.TargetType, a.FieldNumber).Equals(new ObjectIntPair(b.TargetType, b.FieldNumber));
+ }
+ public int GetHashCode(Extension a)
+ {
+ return new ObjectIntPair(a.TargetType, a.FieldNumber).GetHashCode();
+ }
+
+ internal static ExtensionComparer Instance = new ExtensionComparer();
+ }
+ private readonly IDictionary, Extension> extensions;
+
+ ///
+ /// Creates a new empty extension registry
+ ///
+ public ExtensionRegistry()
+ {
+ extensions = new Dictionary, Extension>();
+ }
+
+ private ExtensionRegistry(IDictionary, Extension> collection)
+ {
+ extensions = collection.ToDictionary(k => k.Key, v => v.Value);
+ }
+
+ ///
+ /// Gets the total number of extensions in this extension registry
+ ///
+ public int Count => extensions.Count;
+
+ ///
+ /// Returns whether the registry is readonly
+ ///
+ bool ICollection.IsReadOnly => false;
+
+ internal bool ContainsInputField(uint lastTag, Type target, out Extension extension)
+ {
+ return extensions.TryGetValue(new ObjectIntPair(target, WireFormat.GetTagFieldNumber(lastTag)), out extension);
+ }
+
+ ///
+ /// Adds the specified extension to the registry
+ ///
+ public void Add(Extension extension)
+ {
+ ProtoPreconditions.CheckNotNull(extension, nameof(extension));
+
+ extensions.Add(new ObjectIntPair(extension.TargetType, extension.FieldNumber), extension);
+ }
+
+ ///
+ /// Adds the specified extensions to the registry
+ ///
+ public void AddRange(IEnumerable extensions)
+ {
+ ProtoPreconditions.CheckNotNull(extensions, nameof(extensions));
+
+ foreach (var extension in extensions)
+ {
+ Add(extension);
+ }
+ }
+
+ ///
+ /// Clears the registry of all values
+ ///
+ public void Clear()
+ {
+ extensions.Clear();
+ }
+
+ ///
+ /// Gets whether the extension registry contains the specified extension
+ ///
+ public bool Contains(Extension item)
+ {
+ ProtoPreconditions.CheckNotNull(item, nameof(item));
+
+ return extensions.ContainsKey(new ObjectIntPair(item.TargetType, item.FieldNumber));
+ }
+
+ ///
+ /// Copies the arrays in the registry set to the specified array at the specified index
+ ///
+ /// The array to copy to
+ /// The array index to start at
+ void ICollection.CopyTo(Extension[] array, int arrayIndex)
+ {
+ ProtoPreconditions.CheckNotNull(array, nameof(array));
+ if (arrayIndex < 0 || arrayIndex >= array.Length)
+ {
+ throw new ArgumentOutOfRangeException(nameof(arrayIndex));
+ }
+ if (array.Length - arrayIndex < Count)
+ {
+ throw new ArgumentException("The provided array is shorter than the number of elements in the registry");
+ }
+
+ for (int i = 0; i < array.Length; i++)
+ {
+ Extension extension = array[i];
+ extensions.Add(new ObjectIntPair(extension.TargetType, extension.FieldNumber), extension);
+ }
+ }
+
+ ///
+ /// Returns an enumerator to enumerate through the items in the registry
+ ///
+ /// Returns an enumerator for the extensions in this registry
+ public IEnumerator GetEnumerator()
+ {
+ return extensions.Values.GetEnumerator();
+ }
+
+ ///
+ /// Removes the specified extension from the set
+ ///
+ /// The extension
+ /// true if the extension was removed, otherwise false
+ public bool Remove(Extension item)
+ {
+ ProtoPreconditions.CheckNotNull(item, nameof(item));
+
+ return extensions.Remove(new ObjectIntPair(item.TargetType, item.FieldNumber));
+ }
+
+ IEnumerator IEnumerable.GetEnumerator() => GetEnumerator();
+
+ ///
+ /// Clones the registry into a new registry
+ ///
+ public ExtensionRegistry Clone()
+ {
+ return new ExtensionRegistry(extensions);
+ }
+ }
+}
diff --git a/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/ExtensionRegistry.cs.meta b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/ExtensionRegistry.cs.meta
new file mode 100644
index 00000000..257a1af6
--- /dev/null
+++ b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/ExtensionRegistry.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: ef4f85bd14338fd4cbaf283ca0f4a48e
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/ExtensionSet.cs b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/ExtensionSet.cs
new file mode 100644
index 00000000..aaae121f
--- /dev/null
+++ b/AxibugEmuOnline.Client/Assets/Plugins/Google.Protobuf/ExtensionSet.cs
@@ -0,0 +1,398 @@
+#region Copyright notice and license
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+//
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file or at
+// https://developers.google.com/open-source/licenses/bsd
+#endregion
+
+using Google.Protobuf.Collections;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Reflection;
+using System.Security;
+
+namespace Google.Protobuf
+{
+ ///
+ /// Methods for managing s with null checking.
+ ///
+ /// Most users will not use this class directly and its API is experimental and subject to change.
+ ///
+ public static class ExtensionSet
+ {
+ private static bool TryGetValue(ref ExtensionSet set, Extension extension, out IExtensionValue value) where TTarget : IExtendableMessage
+ {
+ if (set == null)
+ {
+ value = null;
+ return false;
+ }
+ return set.ValuesByNumber.TryGetValue(extension.FieldNumber, out value);
+ }
+
+ ///