Przeglądaj źródła

Unity中加入Mongo驱动,方便集成服务端的时候能使用mongodb,发布手机版的时候又可以不包含mongo驱动,非常方便

tanghai 3 lat temu
rodzic
commit
215b992a5e
100 zmienionych plików z 1521 dodań i 4695 usunięć
  1. 0 1
      DotNet/App/Init.cs
  2. 1 1
      DotNet/ThirdParty/DotNet.ThirdParty.csproj
  3. 1 1
      Unity/Assets/Plugins/MongoDB.meta
  4. BIN
      Unity/Assets/Plugins/MongoDB/DnsClient.dll
  5. 86 0
      Unity/Assets/Plugins/MongoDB/DnsClient.dll.meta
  6. BIN
      Unity/Assets/Plugins/MongoDB/MongoDB.Bson.dll
  7. 86 0
      Unity/Assets/Plugins/MongoDB/MongoDB.Bson.dll.meta
  8. BIN
      Unity/Assets/Plugins/MongoDB/MongoDB.Driver.Core.dll
  9. 86 0
      Unity/Assets/Plugins/MongoDB/MongoDB.Driver.Core.dll.meta
  10. BIN
      Unity/Assets/Plugins/MongoDB/MongoDB.Driver.dll
  11. 86 0
      Unity/Assets/Plugins/MongoDB/MongoDB.Driver.dll.meta
  12. BIN
      Unity/Assets/Plugins/MongoDB/MongoDB.Libmongocrypt.dll
  13. 86 0
      Unity/Assets/Plugins/MongoDB/MongoDB.Libmongocrypt.dll.meta
  14. BIN
      Unity/Assets/Plugins/MongoDB/SharpCompress.dll
  15. 86 0
      Unity/Assets/Plugins/MongoDB/SharpCompress.dll.meta
  16. BIN
      Unity/Assets/Plugins/MongoDB/System.Buffers.dll
  17. 86 0
      Unity/Assets/Plugins/MongoDB/System.Buffers.dll.meta
  18. BIN
      Unity/Assets/Plugins/MongoDB/System.Runtime.CompilerServices.Unsafe.dll
  19. 86 0
      Unity/Assets/Plugins/MongoDB/System.Runtime.CompilerServices.Unsafe.dll.meta
  20. BIN
      Unity/Assets/Plugins/MongoDB/System.Text.Encoding.CodePages.dll
  21. 86 0
      Unity/Assets/Plugins/MongoDB/System.Text.Encoding.CodePages.dll.meta
  22. 1 1
      Unity/Assets/Plugins/MongoDB/runtimes.meta
  23. 1 1
      Unity/Assets/Plugins/MongoDB/runtimes/linux.meta
  24. 1 1
      Unity/Assets/Plugins/MongoDB/runtimes/linux/native.meta
  25. BIN
      Unity/Assets/Plugins/MongoDB/runtimes/linux/native/libmongocrypt.so
  26. 63 0
      Unity/Assets/Plugins/MongoDB/runtimes/linux/native/libmongocrypt.so.meta
  27. BIN
      Unity/Assets/Plugins/MongoDB/runtimes/linux/native/libsnappy64.so
  28. 63 0
      Unity/Assets/Plugins/MongoDB/runtimes/linux/native/libsnappy64.so.meta
  29. BIN
      Unity/Assets/Plugins/MongoDB/runtimes/linux/native/libzstd.so
  30. 63 0
      Unity/Assets/Plugins/MongoDB/runtimes/linux/native/libzstd.so.meta
  31. 8 0
      Unity/Assets/Plugins/MongoDB/runtimes/osx.meta
  32. 8 0
      Unity/Assets/Plugins/MongoDB/runtimes/osx/native.meta
  33. BIN
      Unity/Assets/Plugins/MongoDB/runtimes/osx/native/libmongocrypt.dylib
  34. 63 0
      Unity/Assets/Plugins/MongoDB/runtimes/osx/native/libmongocrypt.dylib.meta
  35. BIN
      Unity/Assets/Plugins/MongoDB/runtimes/osx/native/libsnappy64.dylib
  36. 63 0
      Unity/Assets/Plugins/MongoDB/runtimes/osx/native/libsnappy64.dylib.meta
  37. BIN
      Unity/Assets/Plugins/MongoDB/runtimes/osx/native/libzstd.dylib
  38. 63 0
      Unity/Assets/Plugins/MongoDB/runtimes/osx/native/libzstd.dylib.meta
  39. 8 0
      Unity/Assets/Plugins/MongoDB/runtimes/win.meta
  40. 8 0
      Unity/Assets/Plugins/MongoDB/runtimes/win/native.meta
  41. BIN
      Unity/Assets/Plugins/MongoDB/runtimes/win/native/libzstd.dll
  42. 63 0
      Unity/Assets/Plugins/MongoDB/runtimes/win/native/libzstd.dll.meta
  43. BIN
      Unity/Assets/Plugins/MongoDB/runtimes/win/native/mongocrypt.dll
  44. 63 0
      Unity/Assets/Plugins/MongoDB/runtimes/win/native/mongocrypt.dll.meta
  45. BIN
      Unity/Assets/Plugins/MongoDB/runtimes/win/native/snappy32.dll
  46. 63 0
      Unity/Assets/Plugins/MongoDB/runtimes/win/native/snappy32.dll.meta
  47. BIN
      Unity/Assets/Plugins/MongoDB/runtimes/win/native/snappy64.dll
  48. 63 0
      Unity/Assets/Plugins/MongoDB/runtimes/win/native/snappy64.dll.meta
  49. 1 1
      Unity/Assets/Resources/GlobalConfig.asset
  50. 2 4
      Unity/Assets/Scripts/Codes/Hotfix/Server/Module/DB/DBComponentSystem.cs
  51. 2 4
      Unity/Assets/Scripts/Codes/Hotfix/Server/Module/DB/DBManagerComponentSystem.cs
  52. 2 4
      Unity/Assets/Scripts/Codes/Model/Server/Module/DB/DBComponent.cs
  53. 2 4
      Unity/Assets/Scripts/Codes/Model/Server/Module/DB/DBManagerComponent.cs
  54. 1 3
      Unity/Assets/Scripts/Codes/Model/Server/Module/DB/IDBCollection.cs
  55. 70 77
      Unity/Assets/Scripts/Editor/BuildEditor/BuildAssemblieEditor.cs
  56. 0 1
      Unity/Assets/Scripts/Editor/BuildEditor/BuildHelper.cs
  57. 0 61
      Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/BsonConstants.cs
  58. 0 11
      Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/BsonConstants.cs.meta
  59. 0 157
      Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/BsonDefaults.cs
  60. 0 11
      Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/BsonDefaults.cs.meta
  61. 0 249
      Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/BsonExtensionMethods.cs
  62. 0 11
      Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/BsonExtensionMethods.cs.meta
  63. 0 276
      Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/BsonUtils.cs
  64. 0 11
      Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/BsonUtils.cs.meta
  65. 0 75
      Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/Exceptions/BsonException.cs
  66. 0 11
      Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/Exceptions/BsonException.cs.meta
  67. 0 65
      Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/Exceptions/BsonInternalException.cs
  68. 0 11
      Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/Exceptions/BsonInternalException.cs.meta
  69. 0 65
      Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/Exceptions/BsonSerializationException.cs
  70. 0 11
      Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/Exceptions/BsonSerializationException.cs.meta
  71. 0 57
      Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/Exceptions/DuplicateBsonMemberMapAttributeException.cs
  72. 0 11
      Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/Exceptions/DuplicateBsonMemberMapAttributeException.cs.meta
  73. 0 65
      Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/Exceptions/TruncationException.cs
  74. 0 11
      Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/Exceptions/TruncationException.cs.meta
  75. 0 48
      Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/HexUtils.cs
  76. 0 11
      Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/HexUtils.cs.meta
  77. 0 125
      Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/IO/ArrayElementNameAccelerator.cs
  78. 0 11
      Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/IO/ArrayElementNameAccelerator.cs.meta
  79. 0 840
      Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/IO/BsonBinaryReader.cs
  80. 0 11
      Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/IO/BsonBinaryReader.cs.meta
  81. 0 52
      Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/IO/BsonBinaryReaderBookmark.cs
  82. 0 11
      Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/IO/BsonBinaryReaderBookmark.cs.meta
  83. 0 87
      Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/IO/BsonBinaryReaderContext.cs
  84. 0 11
      Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/IO/BsonBinaryReaderContext.cs.meta
  85. 0 152
      Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/IO/BsonBinaryReaderSettings.cs
  86. 0 11
      Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/IO/BsonBinaryReaderSettings.cs.meta
  87. 0 778
      Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/IO/BsonBinaryWriter.cs
  88. 0 11
      Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/IO/BsonBinaryWriter.cs.meta
  89. 0 59
      Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/IO/BsonBinaryWriterContext.cs
  90. 0 11
      Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/IO/BsonBinaryWriterContext.cs.meta
  91. 0 137
      Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/IO/BsonBinaryWriterSettings.cs
  92. 0 11
      Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/IO/BsonBinaryWriterSettings.cs.meta
  93. 0 259
      Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/IO/BsonChunkPool.cs
  94. 0 11
      Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/IO/BsonChunkPool.cs.meta
  95. 0 562
      Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/IO/BsonDocumentReader.cs
  96. 0 11
      Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/IO/BsonDocumentReader.cs.meta
  97. 0 52
      Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/IO/BsonDocumentReaderBookmark.cs
  98. 0 11
      Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/IO/BsonDocumentReaderBookmark.cs.meta
  99. 0 128
      Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/IO/BsonDocumentReaderContext.cs
  100. 0 11
      Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/IO/BsonDocumentReaderContext.cs.meta

+ 0 - 1
DotNet/App/Init.cs

@@ -1,7 +1,6 @@
 using System;
 using System.Threading;
 using CommandLine;
-using NLog;
 
 namespace ET
 {

+ 1 - 1
DotNet/ThirdParty/DotNet.ThirdParty.csproj

@@ -64,7 +64,7 @@
     <ItemGroup>
       <PackageReference Include="CommandLineParser" Version="2.8.0" />
       <PackageReference Include="EPPlus" Version="5.8.8" />
-      <PackageReference Include="MongoDB.Driver" Version="2.15.0" />
+      <PackageReference Include="MongoDB.Driver" Version="2.17.1" />
       <PackageReference Include="NLog" Version="4.7.15" />
       <PackageReference Include="protobuf-net" Version="2.4.6" />
       <PackageReference Include="SharpZipLib" Version="1.3.3" />

+ 1 - 1
Unity/Assets/Scripts/ThirdParty/Mongo.meta → Unity/Assets/Plugins/MongoDB.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: bde260d52ea402a479bb266e35b58e92
+guid: d7e6591a3956b6742880c17ccb9ee588
 folderAsset: yes
 DefaultImporter:
   externalObjects: {}

BIN
Unity/Assets/Plugins/MongoDB/DnsClient.dll


+ 86 - 0
Unity/Assets/Plugins/MongoDB/DnsClient.dll.meta

@@ -0,0 +1,86 @@
+fileFormatVersion: 2
+guid: 7c82d1c077b03d44b99f3546679b6f1f
+PluginImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  iconMap: {}
+  executionOrder: {}
+  defineConstraints: []
+  isPreloaded: 0
+  isOverridable: 0
+  isExplicitlyReferenced: 0
+  validateReferences: 1
+  platformData:
+  - first:
+      : Any
+    second:
+      enabled: 0
+      settings:
+        Exclude Android: 1
+        Exclude Editor: 0
+        Exclude Linux64: 0
+        Exclude OSXUniversal: 0
+        Exclude Win: 0
+        Exclude Win64: 0
+        Exclude iOS: 1
+  - first:
+      Android: Android
+    second:
+      enabled: 0
+      settings:
+        CPU: ARMv7
+  - first:
+      Any: 
+    second:
+      enabled: 0
+      settings: {}
+  - first:
+      Editor: Editor
+    second:
+      enabled: 1
+      settings:
+        CPU: AnyCPU
+        DefaultValueInitialized: true
+        OS: AnyOS
+  - first:
+      Standalone: Linux64
+    second:
+      enabled: 1
+      settings:
+        CPU: x86_64
+  - first:
+      Standalone: OSXUniversal
+    second:
+      enabled: 1
+      settings:
+        CPU: AnyCPU
+  - first:
+      Standalone: Win
+    second:
+      enabled: 1
+      settings:
+        CPU: x86
+  - first:
+      Standalone: Win64
+    second:
+      enabled: 1
+      settings:
+        CPU: x86_64
+  - first:
+      Windows Store Apps: WindowsStoreApps
+    second:
+      enabled: 0
+      settings:
+        CPU: AnyCPU
+  - first:
+      iPhone: iOS
+    second:
+      enabled: 0
+      settings:
+        AddToEmbeddedBinaries: false
+        CPU: AnyCPU
+        CompileFlags: 
+        FrameworkDependencies: 
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

BIN
Unity/Assets/Plugins/MongoDB/MongoDB.Bson.dll


+ 86 - 0
Unity/Assets/Plugins/MongoDB/MongoDB.Bson.dll.meta

@@ -0,0 +1,86 @@
+fileFormatVersion: 2
+guid: b965a01b99f37d24fae3e2a2fea02b3f
+PluginImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  iconMap: {}
+  executionOrder: {}
+  defineConstraints: []
+  isPreloaded: 0
+  isOverridable: 0
+  isExplicitlyReferenced: 0
+  validateReferences: 1
+  platformData:
+  - first:
+      : Any
+    second:
+      enabled: 0
+      settings:
+        Exclude Android: 0
+        Exclude Editor: 0
+        Exclude Linux64: 0
+        Exclude OSXUniversal: 0
+        Exclude Win: 0
+        Exclude Win64: 0
+        Exclude iOS: 0
+  - first:
+      Android: Android
+    second:
+      enabled: 1
+      settings:
+        CPU: ARMv7
+  - first:
+      Any: 
+    second:
+      enabled: 1
+      settings: {}
+  - first:
+      Editor: Editor
+    second:
+      enabled: 1
+      settings:
+        CPU: AnyCPU
+        DefaultValueInitialized: true
+        OS: AnyOS
+  - first:
+      Standalone: Linux64
+    second:
+      enabled: 1
+      settings:
+        CPU: x86_64
+  - first:
+      Standalone: OSXUniversal
+    second:
+      enabled: 1
+      settings:
+        CPU: AnyCPU
+  - first:
+      Standalone: Win
+    second:
+      enabled: 1
+      settings:
+        CPU: x86
+  - first:
+      Standalone: Win64
+    second:
+      enabled: 1
+      settings:
+        CPU: x86_64
+  - first:
+      Windows Store Apps: WindowsStoreApps
+    second:
+      enabled: 0
+      settings:
+        CPU: AnyCPU
+  - first:
+      iPhone: iOS
+    second:
+      enabled: 1
+      settings:
+        AddToEmbeddedBinaries: false
+        CPU: AnyCPU
+        CompileFlags: 
+        FrameworkDependencies: 
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

BIN
Unity/Assets/Plugins/MongoDB/MongoDB.Driver.Core.dll


+ 86 - 0
Unity/Assets/Plugins/MongoDB/MongoDB.Driver.Core.dll.meta

@@ -0,0 +1,86 @@
+fileFormatVersion: 2
+guid: c642f2b6e634e3746bfd2ccd5c977539
+PluginImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  iconMap: {}
+  executionOrder: {}
+  defineConstraints: []
+  isPreloaded: 0
+  isOverridable: 0
+  isExplicitlyReferenced: 0
+  validateReferences: 1
+  platformData:
+  - first:
+      : Any
+    second:
+      enabled: 0
+      settings:
+        Exclude Android: 1
+        Exclude Editor: 0
+        Exclude Linux64: 0
+        Exclude OSXUniversal: 0
+        Exclude Win: 0
+        Exclude Win64: 0
+        Exclude iOS: 1
+  - first:
+      Android: Android
+    second:
+      enabled: 0
+      settings:
+        CPU: ARMv7
+  - first:
+      Any: 
+    second:
+      enabled: 0
+      settings: {}
+  - first:
+      Editor: Editor
+    second:
+      enabled: 1
+      settings:
+        CPU: AnyCPU
+        DefaultValueInitialized: true
+        OS: AnyOS
+  - first:
+      Standalone: Linux64
+    second:
+      enabled: 1
+      settings:
+        CPU: x86_64
+  - first:
+      Standalone: OSXUniversal
+    second:
+      enabled: 1
+      settings:
+        CPU: AnyCPU
+  - first:
+      Standalone: Win
+    second:
+      enabled: 1
+      settings:
+        CPU: x86
+  - first:
+      Standalone: Win64
+    second:
+      enabled: 1
+      settings:
+        CPU: x86_64
+  - first:
+      Windows Store Apps: WindowsStoreApps
+    second:
+      enabled: 0
+      settings:
+        CPU: AnyCPU
+  - first:
+      iPhone: iOS
+    second:
+      enabled: 0
+      settings:
+        AddToEmbeddedBinaries: false
+        CPU: AnyCPU
+        CompileFlags: 
+        FrameworkDependencies: 
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

BIN
Unity/Assets/Plugins/MongoDB/MongoDB.Driver.dll


+ 86 - 0
Unity/Assets/Plugins/MongoDB/MongoDB.Driver.dll.meta

@@ -0,0 +1,86 @@
+fileFormatVersion: 2
+guid: 6ffa8656b00b1bd4089eea870eccb15d
+PluginImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  iconMap: {}
+  executionOrder: {}
+  defineConstraints: []
+  isPreloaded: 0
+  isOverridable: 0
+  isExplicitlyReferenced: 0
+  validateReferences: 1
+  platformData:
+  - first:
+      : Any
+    second:
+      enabled: 0
+      settings:
+        Exclude Android: 1
+        Exclude Editor: 0
+        Exclude Linux64: 0
+        Exclude OSXUniversal: 0
+        Exclude Win: 0
+        Exclude Win64: 0
+        Exclude iOS: 1
+  - first:
+      Android: Android
+    second:
+      enabled: 0
+      settings:
+        CPU: ARMv7
+  - first:
+      Any: 
+    second:
+      enabled: 0
+      settings: {}
+  - first:
+      Editor: Editor
+    second:
+      enabled: 1
+      settings:
+        CPU: AnyCPU
+        DefaultValueInitialized: true
+        OS: AnyOS
+  - first:
+      Standalone: Linux64
+    second:
+      enabled: 1
+      settings:
+        CPU: x86_64
+  - first:
+      Standalone: OSXUniversal
+    second:
+      enabled: 1
+      settings:
+        CPU: AnyCPU
+  - first:
+      Standalone: Win
+    second:
+      enabled: 1
+      settings:
+        CPU: x86
+  - first:
+      Standalone: Win64
+    second:
+      enabled: 1
+      settings:
+        CPU: x86_64
+  - first:
+      Windows Store Apps: WindowsStoreApps
+    second:
+      enabled: 0
+      settings:
+        CPU: AnyCPU
+  - first:
+      iPhone: iOS
+    second:
+      enabled: 0
+      settings:
+        AddToEmbeddedBinaries: false
+        CPU: AnyCPU
+        CompileFlags: 
+        FrameworkDependencies: 
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

BIN
Unity/Assets/Plugins/MongoDB/MongoDB.Libmongocrypt.dll


+ 86 - 0
Unity/Assets/Plugins/MongoDB/MongoDB.Libmongocrypt.dll.meta

@@ -0,0 +1,86 @@
+fileFormatVersion: 2
+guid: 1ef5b66e43ccbd348a77b0ab82f88dbb
+PluginImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  iconMap: {}
+  executionOrder: {}
+  defineConstraints: []
+  isPreloaded: 0
+  isOverridable: 0
+  isExplicitlyReferenced: 0
+  validateReferences: 1
+  platformData:
+  - first:
+      : Any
+    second:
+      enabled: 0
+      settings:
+        Exclude Android: 1
+        Exclude Editor: 0
+        Exclude Linux64: 0
+        Exclude OSXUniversal: 0
+        Exclude Win: 0
+        Exclude Win64: 0
+        Exclude iOS: 1
+  - first:
+      Android: Android
+    second:
+      enabled: 0
+      settings:
+        CPU: ARMv7
+  - first:
+      Any: 
+    second:
+      enabled: 0
+      settings: {}
+  - first:
+      Editor: Editor
+    second:
+      enabled: 1
+      settings:
+        CPU: AnyCPU
+        DefaultValueInitialized: true
+        OS: AnyOS
+  - first:
+      Standalone: Linux64
+    second:
+      enabled: 1
+      settings:
+        CPU: x86_64
+  - first:
+      Standalone: OSXUniversal
+    second:
+      enabled: 1
+      settings:
+        CPU: AnyCPU
+  - first:
+      Standalone: Win
+    second:
+      enabled: 1
+      settings:
+        CPU: x86
+  - first:
+      Standalone: Win64
+    second:
+      enabled: 1
+      settings:
+        CPU: x86_64
+  - first:
+      Windows Store Apps: WindowsStoreApps
+    second:
+      enabled: 0
+      settings:
+        CPU: AnyCPU
+  - first:
+      iPhone: iOS
+    second:
+      enabled: 0
+      settings:
+        AddToEmbeddedBinaries: false
+        CPU: AnyCPU
+        CompileFlags: 
+        FrameworkDependencies: 
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

BIN
Unity/Assets/Plugins/MongoDB/SharpCompress.dll


+ 86 - 0
Unity/Assets/Plugins/MongoDB/SharpCompress.dll.meta

@@ -0,0 +1,86 @@
+fileFormatVersion: 2
+guid: 83ff7a714531dec43b3e6cd79d76d4b7
+PluginImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  iconMap: {}
+  executionOrder: {}
+  defineConstraints: []
+  isPreloaded: 0
+  isOverridable: 0
+  isExplicitlyReferenced: 0
+  validateReferences: 1
+  platformData:
+  - first:
+      : Any
+    second:
+      enabled: 0
+      settings:
+        Exclude Android: 1
+        Exclude Editor: 0
+        Exclude Linux64: 0
+        Exclude OSXUniversal: 0
+        Exclude Win: 0
+        Exclude Win64: 0
+        Exclude iOS: 1
+  - first:
+      Android: Android
+    second:
+      enabled: 0
+      settings:
+        CPU: ARMv7
+  - first:
+      Any: 
+    second:
+      enabled: 0
+      settings: {}
+  - first:
+      Editor: Editor
+    second:
+      enabled: 1
+      settings:
+        CPU: AnyCPU
+        DefaultValueInitialized: true
+        OS: AnyOS
+  - first:
+      Standalone: Linux64
+    second:
+      enabled: 1
+      settings:
+        CPU: x86_64
+  - first:
+      Standalone: OSXUniversal
+    second:
+      enabled: 1
+      settings:
+        CPU: AnyCPU
+  - first:
+      Standalone: Win
+    second:
+      enabled: 1
+      settings:
+        CPU: x86
+  - first:
+      Standalone: Win64
+    second:
+      enabled: 1
+      settings:
+        CPU: x86_64
+  - first:
+      Windows Store Apps: WindowsStoreApps
+    second:
+      enabled: 0
+      settings:
+        CPU: AnyCPU
+  - first:
+      iPhone: iOS
+    second:
+      enabled: 0
+      settings:
+        AddToEmbeddedBinaries: false
+        CPU: AnyCPU
+        CompileFlags: 
+        FrameworkDependencies: 
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

BIN
Unity/Assets/Plugins/MongoDB/System.Buffers.dll


+ 86 - 0
Unity/Assets/Plugins/MongoDB/System.Buffers.dll.meta

@@ -0,0 +1,86 @@
+fileFormatVersion: 2
+guid: 1dc0f29548d1e0440920f730ff416e65
+PluginImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  iconMap: {}
+  executionOrder: {}
+  defineConstraints: []
+  isPreloaded: 0
+  isOverridable: 0
+  isExplicitlyReferenced: 0
+  validateReferences: 1
+  platformData:
+  - first:
+      : Any
+    second:
+      enabled: 0
+      settings:
+        Exclude Android: 1
+        Exclude Editor: 0
+        Exclude Linux64: 0
+        Exclude OSXUniversal: 0
+        Exclude Win: 0
+        Exclude Win64: 0
+        Exclude iOS: 1
+  - first:
+      Android: Android
+    second:
+      enabled: 0
+      settings:
+        CPU: ARMv7
+  - first:
+      Any: 
+    second:
+      enabled: 0
+      settings: {}
+  - first:
+      Editor: Editor
+    second:
+      enabled: 1
+      settings:
+        CPU: AnyCPU
+        DefaultValueInitialized: true
+        OS: AnyOS
+  - first:
+      Standalone: Linux64
+    second:
+      enabled: 1
+      settings:
+        CPU: x86_64
+  - first:
+      Standalone: OSXUniversal
+    second:
+      enabled: 1
+      settings:
+        CPU: AnyCPU
+  - first:
+      Standalone: Win
+    second:
+      enabled: 1
+      settings:
+        CPU: x86
+  - first:
+      Standalone: Win64
+    second:
+      enabled: 1
+      settings:
+        CPU: x86_64
+  - first:
+      Windows Store Apps: WindowsStoreApps
+    second:
+      enabled: 0
+      settings:
+        CPU: AnyCPU
+  - first:
+      iPhone: iOS
+    second:
+      enabled: 0
+      settings:
+        AddToEmbeddedBinaries: false
+        CPU: AnyCPU
+        CompileFlags: 
+        FrameworkDependencies: 
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

BIN
Unity/Assets/Plugins/MongoDB/System.Runtime.CompilerServices.Unsafe.dll


+ 86 - 0
Unity/Assets/Plugins/MongoDB/System.Runtime.CompilerServices.Unsafe.dll.meta

@@ -0,0 +1,86 @@
+fileFormatVersion: 2
+guid: 6ba9302132919f24d882940d30bcc3c7
+PluginImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  iconMap: {}
+  executionOrder: {}
+  defineConstraints: []
+  isPreloaded: 0
+  isOverridable: 0
+  isExplicitlyReferenced: 0
+  validateReferences: 1
+  platformData:
+  - first:
+      : Any
+    second:
+      enabled: 0
+      settings:
+        Exclude Android: 0
+        Exclude Editor: 0
+        Exclude Linux64: 0
+        Exclude OSXUniversal: 0
+        Exclude Win: 0
+        Exclude Win64: 0
+        Exclude iOS: 0
+  - first:
+      Android: Android
+    second:
+      enabled: 1
+      settings:
+        CPU: ARMv7
+  - first:
+      Any: 
+    second:
+      enabled: 1
+      settings: {}
+  - first:
+      Editor: Editor
+    second:
+      enabled: 1
+      settings:
+        CPU: AnyCPU
+        DefaultValueInitialized: true
+        OS: AnyOS
+  - first:
+      Standalone: Linux64
+    second:
+      enabled: 1
+      settings:
+        CPU: x86_64
+  - first:
+      Standalone: OSXUniversal
+    second:
+      enabled: 1
+      settings:
+        CPU: AnyCPU
+  - first:
+      Standalone: Win
+    second:
+      enabled: 1
+      settings:
+        CPU: x86
+  - first:
+      Standalone: Win64
+    second:
+      enabled: 1
+      settings:
+        CPU: x86_64
+  - first:
+      Windows Store Apps: WindowsStoreApps
+    second:
+      enabled: 0
+      settings:
+        CPU: AnyCPU
+  - first:
+      iPhone: iOS
+    second:
+      enabled: 1
+      settings:
+        AddToEmbeddedBinaries: false
+        CPU: AnyCPU
+        CompileFlags: 
+        FrameworkDependencies: 
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

BIN
Unity/Assets/Plugins/MongoDB/System.Text.Encoding.CodePages.dll


+ 86 - 0
Unity/Assets/Plugins/MongoDB/System.Text.Encoding.CodePages.dll.meta

@@ -0,0 +1,86 @@
+fileFormatVersion: 2
+guid: 555304230d8b97f4a89075d405d2532b
+PluginImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  iconMap: {}
+  executionOrder: {}
+  defineConstraints: []
+  isPreloaded: 0
+  isOverridable: 0
+  isExplicitlyReferenced: 0
+  validateReferences: 1
+  platformData:
+  - first:
+      : Any
+    second:
+      enabled: 0
+      settings:
+        Exclude Android: 1
+        Exclude Editor: 0
+        Exclude Linux64: 0
+        Exclude OSXUniversal: 0
+        Exclude Win: 0
+        Exclude Win64: 0
+        Exclude iOS: 1
+  - first:
+      Android: Android
+    second:
+      enabled: 0
+      settings:
+        CPU: ARMv7
+  - first:
+      Any: 
+    second:
+      enabled: 0
+      settings: {}
+  - first:
+      Editor: Editor
+    second:
+      enabled: 1
+      settings:
+        CPU: AnyCPU
+        DefaultValueInitialized: true
+        OS: AnyOS
+  - first:
+      Standalone: Linux64
+    second:
+      enabled: 1
+      settings:
+        CPU: x86_64
+  - first:
+      Standalone: OSXUniversal
+    second:
+      enabled: 1
+      settings:
+        CPU: AnyCPU
+  - first:
+      Standalone: Win
+    second:
+      enabled: 1
+      settings:
+        CPU: x86
+  - first:
+      Standalone: Win64
+    second:
+      enabled: 1
+      settings:
+        CPU: x86_64
+  - first:
+      Windows Store Apps: WindowsStoreApps
+    second:
+      enabled: 0
+      settings:
+        CPU: AnyCPU
+  - first:
+      iPhone: iOS
+    second:
+      enabled: 0
+      settings:
+        AddToEmbeddedBinaries: false
+        CPU: AnyCPU
+        CompileFlags: 
+        FrameworkDependencies: 
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 1 - 1
Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson.meta → Unity/Assets/Plugins/MongoDB/runtimes.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: c0be6cb53b45eb94da92434f57d097cb
+guid: 3638a874ef536fa4494da5c9c2c3256e
 folderAsset: yes
 DefaultImporter:
   externalObjects: {}

+ 1 - 1
Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/Exceptions.meta → Unity/Assets/Plugins/MongoDB/runtimes/linux.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: ff310efad917b4b4b81fb083f6372ea8
+guid: 5177c1cc9ed8ae04488583b68c891aa3
 folderAsset: yes
 DefaultImporter:
   externalObjects: {}

+ 1 - 1
Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/IO.meta → Unity/Assets/Plugins/MongoDB/runtimes/linux/native.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: d2557bda26d8716418f376d937db174a
+guid: 1c3d04f2e2cf2044fb1cb2f4d75d8c29
 folderAsset: yes
 DefaultImporter:
   externalObjects: {}

BIN
Unity/Assets/Plugins/MongoDB/runtimes/linux/native/libmongocrypt.so


+ 63 - 0
Unity/Assets/Plugins/MongoDB/runtimes/linux/native/libmongocrypt.so.meta

@@ -0,0 +1,63 @@
+fileFormatVersion: 2
+guid: e0811e6691bb15548bc7c0ade478d67d
+PluginImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  iconMap: {}
+  executionOrder: {}
+  defineConstraints: []
+  isPreloaded: 0
+  isOverridable: 0
+  isExplicitlyReferenced: 0
+  validateReferences: 1
+  platformData:
+  - first:
+      : Any
+    second:
+      enabled: 0
+      settings:
+        Exclude Editor: 0
+        Exclude Linux64: 1
+        Exclude OSXUniversal: 1
+        Exclude Win: 1
+        Exclude Win64: 1
+  - first:
+      Any: 
+    second:
+      enabled: 0
+      settings: {}
+  - first:
+      Editor: Editor
+    second:
+      enabled: 1
+      settings:
+        CPU: x86_64
+        DefaultValueInitialized: true
+        OS: Linux
+  - first:
+      Standalone: Linux64
+    second:
+      enabled: 0
+      settings:
+        CPU: None
+  - first:
+      Standalone: OSXUniversal
+    second:
+      enabled: 0
+      settings:
+        CPU: None
+  - first:
+      Standalone: Win
+    second:
+      enabled: 0
+      settings:
+        CPU: None
+  - first:
+      Standalone: Win64
+    second:
+      enabled: 0
+      settings:
+        CPU: None
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

BIN
Unity/Assets/Plugins/MongoDB/runtimes/linux/native/libsnappy64.so


+ 63 - 0
Unity/Assets/Plugins/MongoDB/runtimes/linux/native/libsnappy64.so.meta

@@ -0,0 +1,63 @@
+fileFormatVersion: 2
+guid: c09616e87e658824a860f19c08f55ce8
+PluginImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  iconMap: {}
+  executionOrder: {}
+  defineConstraints: []
+  isPreloaded: 0
+  isOverridable: 0
+  isExplicitlyReferenced: 0
+  validateReferences: 1
+  platformData:
+  - first:
+      : Any
+    second:
+      enabled: 0
+      settings:
+        Exclude Editor: 0
+        Exclude Linux64: 1
+        Exclude OSXUniversal: 1
+        Exclude Win: 1
+        Exclude Win64: 1
+  - first:
+      Any: 
+    second:
+      enabled: 0
+      settings: {}
+  - first:
+      Editor: Editor
+    second:
+      enabled: 1
+      settings:
+        CPU: x86_64
+        DefaultValueInitialized: true
+        OS: Linux
+  - first:
+      Standalone: Linux64
+    second:
+      enabled: 0
+      settings:
+        CPU: None
+  - first:
+      Standalone: OSXUniversal
+    second:
+      enabled: 0
+      settings:
+        CPU: None
+  - first:
+      Standalone: Win
+    second:
+      enabled: 0
+      settings:
+        CPU: None
+  - first:
+      Standalone: Win64
+    second:
+      enabled: 0
+      settings:
+        CPU: None
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

BIN
Unity/Assets/Plugins/MongoDB/runtimes/linux/native/libzstd.so


+ 63 - 0
Unity/Assets/Plugins/MongoDB/runtimes/linux/native/libzstd.so.meta

@@ -0,0 +1,63 @@
+fileFormatVersion: 2
+guid: 04809ccdb6ba1674a936d0209c7fec21
+PluginImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  iconMap: {}
+  executionOrder: {}
+  defineConstraints: []
+  isPreloaded: 0
+  isOverridable: 0
+  isExplicitlyReferenced: 0
+  validateReferences: 1
+  platformData:
+  - first:
+      : Any
+    second:
+      enabled: 0
+      settings:
+        Exclude Editor: 0
+        Exclude Linux64: 1
+        Exclude OSXUniversal: 1
+        Exclude Win: 1
+        Exclude Win64: 1
+  - first:
+      Any: 
+    second:
+      enabled: 0
+      settings: {}
+  - first:
+      Editor: Editor
+    second:
+      enabled: 1
+      settings:
+        CPU: x86_64
+        DefaultValueInitialized: true
+        OS: Linux
+  - first:
+      Standalone: Linux64
+    second:
+      enabled: 0
+      settings:
+        CPU: None
+  - first:
+      Standalone: OSXUniversal
+    second:
+      enabled: 0
+      settings:
+        CPU: None
+  - first:
+      Standalone: Win
+    second:
+      enabled: 0
+      settings:
+        CPU: None
+  - first:
+      Standalone: Win64
+    second:
+      enabled: 0
+      settings:
+        CPU: None
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 8 - 0
Unity/Assets/Plugins/MongoDB/runtimes/osx.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 0b731199ac3348e458e1ff49f04702cd
+folderAsset: yes
+DefaultImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 8 - 0
Unity/Assets/Plugins/MongoDB/runtimes/osx/native.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: edc63a02a9f5538479759737a0011a5b
+folderAsset: yes
+DefaultImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

BIN
Unity/Assets/Plugins/MongoDB/runtimes/osx/native/libmongocrypt.dylib


+ 63 - 0
Unity/Assets/Plugins/MongoDB/runtimes/osx/native/libmongocrypt.dylib.meta

@@ -0,0 +1,63 @@
+fileFormatVersion: 2
+guid: 1a4ed9e455d57c148ac6d12d8bde24c7
+PluginImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  iconMap: {}
+  executionOrder: {}
+  defineConstraints: []
+  isPreloaded: 0
+  isOverridable: 0
+  isExplicitlyReferenced: 0
+  validateReferences: 1
+  platformData:
+  - first:
+      : Any
+    second:
+      enabled: 0
+      settings:
+        Exclude Editor: 0
+        Exclude Linux64: 1
+        Exclude OSXUniversal: 1
+        Exclude Win: 1
+        Exclude Win64: 1
+  - first:
+      Any: 
+    second:
+      enabled: 0
+      settings: {}
+  - first:
+      Editor: Editor
+    second:
+      enabled: 1
+      settings:
+        CPU: x86_64
+        DefaultValueInitialized: true
+        OS: OSX
+  - first:
+      Standalone: Linux64
+    second:
+      enabled: 0
+      settings:
+        CPU: None
+  - first:
+      Standalone: OSXUniversal
+    second:
+      enabled: 0
+      settings:
+        CPU: AnyCPU
+  - first:
+      Standalone: Win
+    second:
+      enabled: 0
+      settings:
+        CPU: None
+  - first:
+      Standalone: Win64
+    second:
+      enabled: 0
+      settings:
+        CPU: None
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

BIN
Unity/Assets/Plugins/MongoDB/runtimes/osx/native/libsnappy64.dylib


+ 63 - 0
Unity/Assets/Plugins/MongoDB/runtimes/osx/native/libsnappy64.dylib.meta

@@ -0,0 +1,63 @@
+fileFormatVersion: 2
+guid: 9427c1cfedfae5342b72c509b3ed94e7
+PluginImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  iconMap: {}
+  executionOrder: {}
+  defineConstraints: []
+  isPreloaded: 0
+  isOverridable: 0
+  isExplicitlyReferenced: 0
+  validateReferences: 1
+  platformData:
+  - first:
+      : Any
+    second:
+      enabled: 0
+      settings:
+        Exclude Editor: 0
+        Exclude Linux64: 1
+        Exclude OSXUniversal: 1
+        Exclude Win: 1
+        Exclude Win64: 1
+  - first:
+      Any: 
+    second:
+      enabled: 0
+      settings: {}
+  - first:
+      Editor: Editor
+    second:
+      enabled: 1
+      settings:
+        CPU: x86_64
+        DefaultValueInitialized: true
+        OS: OSX
+  - first:
+      Standalone: Linux64
+    second:
+      enabled: 0
+      settings:
+        CPU: None
+  - first:
+      Standalone: OSXUniversal
+    second:
+      enabled: 0
+      settings:
+        CPU: AnyCPU
+  - first:
+      Standalone: Win
+    second:
+      enabled: 0
+      settings:
+        CPU: None
+  - first:
+      Standalone: Win64
+    second:
+      enabled: 0
+      settings:
+        CPU: None
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

BIN
Unity/Assets/Plugins/MongoDB/runtimes/osx/native/libzstd.dylib


+ 63 - 0
Unity/Assets/Plugins/MongoDB/runtimes/osx/native/libzstd.dylib.meta

@@ -0,0 +1,63 @@
+fileFormatVersion: 2
+guid: f34938b51af499c4baa2b0a24222d18e
+PluginImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  iconMap: {}
+  executionOrder: {}
+  defineConstraints: []
+  isPreloaded: 0
+  isOverridable: 0
+  isExplicitlyReferenced: 0
+  validateReferences: 1
+  platformData:
+  - first:
+      : Any
+    second:
+      enabled: 0
+      settings:
+        Exclude Editor: 0
+        Exclude Linux64: 1
+        Exclude OSXUniversal: 1
+        Exclude Win: 1
+        Exclude Win64: 1
+  - first:
+      Any: 
+    second:
+      enabled: 0
+      settings: {}
+  - first:
+      Editor: Editor
+    second:
+      enabled: 1
+      settings:
+        CPU: x86_64
+        DefaultValueInitialized: true
+        OS: OSX
+  - first:
+      Standalone: Linux64
+    second:
+      enabled: 0
+      settings:
+        CPU: None
+  - first:
+      Standalone: OSXUniversal
+    second:
+      enabled: 0
+      settings:
+        CPU: AnyCPU
+  - first:
+      Standalone: Win
+    second:
+      enabled: 0
+      settings:
+        CPU: None
+  - first:
+      Standalone: Win64
+    second:
+      enabled: 0
+      settings:
+        CPU: None
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 8 - 0
Unity/Assets/Plugins/MongoDB/runtimes/win.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 975506ec7cc508d4d825ee963a8d1a55
+folderAsset: yes
+DefaultImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 8 - 0
Unity/Assets/Plugins/MongoDB/runtimes/win/native.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: b0a9e61293879c94592a2579e3b908ee
+folderAsset: yes
+DefaultImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

BIN
Unity/Assets/Plugins/MongoDB/runtimes/win/native/libzstd.dll


+ 63 - 0
Unity/Assets/Plugins/MongoDB/runtimes/win/native/libzstd.dll.meta

@@ -0,0 +1,63 @@
+fileFormatVersion: 2
+guid: 41fd9e5ab85059e4883a402dd9b02f8e
+PluginImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  iconMap: {}
+  executionOrder: {}
+  defineConstraints: []
+  isPreloaded: 0
+  isOverridable: 0
+  isExplicitlyReferenced: 0
+  validateReferences: 1
+  platformData:
+  - first:
+      : Any
+    second:
+      enabled: 0
+      settings:
+        Exclude Editor: 0
+        Exclude Linux64: 1
+        Exclude OSXUniversal: 1
+        Exclude Win: 1
+        Exclude Win64: 1
+  - first:
+      Any: 
+    second:
+      enabled: 0
+      settings: {}
+  - first:
+      Editor: Editor
+    second:
+      enabled: 1
+      settings:
+        CPU: x86_64
+        DefaultValueInitialized: true
+        OS: Windows
+  - first:
+      Standalone: Linux64
+    second:
+      enabled: 0
+      settings:
+        CPU: None
+  - first:
+      Standalone: OSXUniversal
+    second:
+      enabled: 0
+      settings:
+        CPU: None
+  - first:
+      Standalone: Win
+    second:
+      enabled: 0
+      settings:
+        CPU: None
+  - first:
+      Standalone: Win64
+    second:
+      enabled: 0
+      settings:
+        CPU: None
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

BIN
Unity/Assets/Plugins/MongoDB/runtimes/win/native/mongocrypt.dll


+ 63 - 0
Unity/Assets/Plugins/MongoDB/runtimes/win/native/mongocrypt.dll.meta

@@ -0,0 +1,63 @@
+fileFormatVersion: 2
+guid: 945aef0be26d8d4438b544bf1a0f9581
+PluginImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  iconMap: {}
+  executionOrder: {}
+  defineConstraints: []
+  isPreloaded: 0
+  isOverridable: 0
+  isExplicitlyReferenced: 0
+  validateReferences: 1
+  platformData:
+  - first:
+      : Any
+    second:
+      enabled: 0
+      settings:
+        Exclude Editor: 0
+        Exclude Linux64: 1
+        Exclude OSXUniversal: 1
+        Exclude Win: 1
+        Exclude Win64: 1
+  - first:
+      Any: 
+    second:
+      enabled: 0
+      settings: {}
+  - first:
+      Editor: Editor
+    second:
+      enabled: 1
+      settings:
+        CPU: x86_64
+        DefaultValueInitialized: true
+        OS: Windows
+  - first:
+      Standalone: Linux64
+    second:
+      enabled: 0
+      settings:
+        CPU: None
+  - first:
+      Standalone: OSXUniversal
+    second:
+      enabled: 0
+      settings:
+        CPU: None
+  - first:
+      Standalone: Win
+    second:
+      enabled: 0
+      settings:
+        CPU: None
+  - first:
+      Standalone: Win64
+    second:
+      enabled: 0
+      settings:
+        CPU: None
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

BIN
Unity/Assets/Plugins/MongoDB/runtimes/win/native/snappy32.dll


+ 63 - 0
Unity/Assets/Plugins/MongoDB/runtimes/win/native/snappy32.dll.meta

@@ -0,0 +1,63 @@
+fileFormatVersion: 2
+guid: 3b5737d56b1268c48af24c809b612988
+PluginImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  iconMap: {}
+  executionOrder: {}
+  defineConstraints: []
+  isPreloaded: 0
+  isOverridable: 0
+  isExplicitlyReferenced: 0
+  validateReferences: 1
+  platformData:
+  - first:
+      : Any
+    second:
+      enabled: 0
+      settings:
+        Exclude Editor: 0
+        Exclude Linux64: 1
+        Exclude OSXUniversal: 1
+        Exclude Win: 1
+        Exclude Win64: 1
+  - first:
+      Any: 
+    second:
+      enabled: 0
+      settings: {}
+  - first:
+      Editor: Editor
+    second:
+      enabled: 1
+      settings:
+        CPU: x86_64
+        DefaultValueInitialized: true
+        OS: Windows
+  - first:
+      Standalone: Linux64
+    second:
+      enabled: 0
+      settings:
+        CPU: None
+  - first:
+      Standalone: OSXUniversal
+    second:
+      enabled: 0
+      settings:
+        CPU: None
+  - first:
+      Standalone: Win
+    second:
+      enabled: 0
+      settings:
+        CPU: None
+  - first:
+      Standalone: Win64
+    second:
+      enabled: 0
+      settings:
+        CPU: None
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

BIN
Unity/Assets/Plugins/MongoDB/runtimes/win/native/snappy64.dll


+ 63 - 0
Unity/Assets/Plugins/MongoDB/runtimes/win/native/snappy64.dll.meta

@@ -0,0 +1,63 @@
+fileFormatVersion: 2
+guid: cc7249482af596044a235c650072ab90
+PluginImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  iconMap: {}
+  executionOrder: {}
+  defineConstraints: []
+  isPreloaded: 0
+  isOverridable: 0
+  isExplicitlyReferenced: 0
+  validateReferences: 1
+  platformData:
+  - first:
+      : Any
+    second:
+      enabled: 0
+      settings:
+        Exclude Editor: 0
+        Exclude Linux64: 1
+        Exclude OSXUniversal: 1
+        Exclude Win: 1
+        Exclude Win64: 1
+  - first:
+      Any: 
+    second:
+      enabled: 0
+      settings: {}
+  - first:
+      Editor: Editor
+    second:
+      enabled: 1
+      settings:
+        CPU: x86_64
+        DefaultValueInitialized: true
+        OS: Windows
+  - first:
+      Standalone: Linux64
+    second:
+      enabled: 0
+      settings:
+        CPU: None
+  - first:
+      Standalone: OSXUniversal
+    second:
+      enabled: 0
+      settings:
+        CPU: None
+  - first:
+      Standalone: Win
+    second:
+      enabled: 0
+      settings:
+        CPU: None
+  - first:
+      Standalone: Win64
+    second:
+      enabled: 0
+      settings:
+        CPU: None
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 1 - 1
Unity/Assets/Resources/GlobalConfig.asset

@@ -12,5 +12,5 @@ MonoBehaviour:
   m_Script: {fileID: 11500000, guid: 36527db572638af47b03c805671cba75, type: 3}
   m_Name: GlobalConfig
   m_EditorClassIdentifier: 
-  LoadMode: 3
+  LoadMode: 1
   CodeMode: 3

+ 2 - 4
Unity/Assets/Scripts/Codes/Hotfix/Server/Module/DB/DBComponentSystem.cs

@@ -1,5 +1,4 @@
-#if DOTNET
-using System;
+using System;
 using System.Collections.Generic;
 using System.Linq.Expressions;
 using MongoDB.Driver;
@@ -250,5 +249,4 @@ namespace ET.Server
 
 	    #endregion
     }
-}
-#endif
+}

+ 2 - 4
Unity/Assets/Scripts/Codes/Hotfix/Server/Module/DB/DBManagerComponentSystem.cs

@@ -1,5 +1,4 @@
-#if DOTNET
-using System;
+using System;
 
 namespace ET.Server
 {
@@ -43,5 +42,4 @@ namespace ET.Server
             return dbComponent;
         }
     }
-}
-#endif
+}

+ 2 - 4
Unity/Assets/Scripts/Codes/Model/Server/Module/DB/DBComponent.cs

@@ -1,5 +1,4 @@
-#if DOTNET
-using MongoDB.Driver;
+using MongoDB.Driver;
 
 namespace ET.Server
 {
@@ -14,5 +13,4 @@ namespace ET.Server
         public MongoClient mongoClient;
         public IMongoDatabase database;
     }
-}
-#endif
+}

+ 2 - 4
Unity/Assets/Scripts/Codes/Model/Server/Module/DB/DBManagerComponent.cs

@@ -1,5 +1,4 @@
-#if DOTNET
-namespace ET.Server
+namespace ET.Server
 {
     
     public class DBManagerComponent: Entity, IAwake, IDestroy
@@ -9,5 +8,4 @@ namespace ET.Server
         
         public DBComponent[] DBComponents = new DBComponent[IdGenerater.MaxZone];
     }
-}
-#endif
+}

+ 1 - 3
Unity/Assets/Scripts/Codes/Model/Server/Module/DB/IDBCollection.cs

@@ -1,8 +1,6 @@
-#if DOTNET
 namespace ET.Server
 {
     public interface IDBCollection
     {
     }
-}
-#endif
+}

+ 70 - 77
Unity/Assets/Scripts/Editor/BuildEditor/BuildAssemblieEditor.cs

@@ -13,22 +13,6 @@ namespace ET
     {
         private const string CodeDir = "Assets/Bundles/Code/";
 
-        public static List<string> GetRelativeDirs(List<string> relativeDir)
-        {
-            List<string> list = new List<string>();
-            
-            foreach (string re in relativeDir)
-            {
-                string rd = $"Assets/Scripts/Codes/{re}";
-                if (!Directory.Exists(rd))
-                {
-                    continue;
-                }
-                list.Add(rd);
-            }
-            return list;
-        }
-
         public static void BuildCode(CodeOptimization codeOptimization, GlobalConfig globalConfig)
         {
             List<string> codes;
@@ -37,49 +21,46 @@ namespace ET
                 case CodeMode.Client:
                     codes = new List<string>()
                     {
-                        "Model/Generate/Client",
-                        "Model/Share",
-                        "Hotfix/Share",
-                        "Model/Client",
-                        "ModelView/Client",
-                        "Hotfix/Client",
-                        "HotfixView/Client"
+                        "Assets/Scripts/Codes/Model/Generate/Client",
+                        "Assets/Scripts/Codes/Model/Share",
+                        "Assets/Scripts/Codes/Hotfix/Share",
+                        "Assets/Scripts/Codes/Model/Client",
+                        "Assets/Scripts/Codes/ModelView/Client",
+                        "Assets/Scripts/Codes/Hotfix/Client",
+                        "Assets/Scripts/Codes/HotfixView/Client"
                     };
-                    codes = GetRelativeDirs(codes);
                     break;
                 case CodeMode.Server:
                     codes = new List<string>()
                     {
-                        "Model/Generate/Server",
-                        "Model/Share",
-                        "Hotfix/Share",
-                        "Model/Server",
-                        "Hotfix/Server",
-                        "Model/Client",
-                        "Hotfix/Client",
+                        "Assets/Scripts/Codes/Model/Generate/Server",
+                        "Assets/Scripts/Codes/Model/Share",
+                        "Assets/Scripts/Codes/Hotfix/Share",
+                        "Assets/Scripts/Codes/Model/Server",
+                        "Assets/Scripts/Codes/Hotfix/Server",
+                        "Assets/Scripts/Codes/Model/Client",
+                        "Assets/Scripts/Codes/Hotfix/Client",
                     };
-                    codes = GetRelativeDirs(codes);
                     break;
                 case CodeMode.ClientServer:
                     codes = new List<string>()
                     {
-                        "Model/Generate/Server",
-                        "Model/Share",
-                        "Hotfix/Share",
-                        "Model/Client",
-                        "ModelView/Client",
-                        "Hotfix/Client",
-                        "HotfixView/Client",
-                        "Model/Server",
-                        "Hotfix/Server",
+                        "Assets/Scripts/Codes/Model/Generate/Server",
+                        "Assets/Scripts/Codes/Model/Share",
+                        "Assets/Scripts/Codes/Hotfix/Share",
+                        "Assets/Scripts/Codes/Model/Client",
+                        "Assets/Scripts/Codes/ModelView/Client",
+                        "Assets/Scripts/Codes/Hotfix/Client",
+                        "Assets/Scripts/Codes/HotfixView/Client",
+                        "Assets/Scripts/Codes/Model/Server",
+                        "Assets/Scripts/Codes/Hotfix/Server",
                     };
-                    codes = GetRelativeDirs(codes);
                     break;
                 default:
                     throw new Exception("not found enum");
             }
 
-            BuildAssemblieEditor.BuildMuteAssembly("Code", codes, Array.Empty<string>(), codeOptimization);
+            BuildAssemblieEditor.BuildMuteAssembly("Code", codes, Array.Empty<string>(), codeOptimization, globalConfig.CodeMode);
 
             AfterCompiling();
             
@@ -98,39 +79,36 @@ namespace ET
                 case CodeMode.Client:
                     codes = new List<string>()
                     {
-                        "Model/Generate/Client/",
-                        "Model/Share/",
-                        "Model/Client/",
-                        "ModelView/Client/",
+                        "Assets/Scripts/Codes/Model/Generate/Client/",
+                        "Assets/Scripts/Codes/Model/Share/",
+                        "Assets/Scripts/Codes/Model/Client/",
+                        "Assets/Scripts/Codes/ModelView/Client/",
                     };
-                    codes = GetRelativeDirs(codes);
                     break;
                 case CodeMode.Server:
                     codes = new List<string>()
                     {
-                        "Model/Generate/Server/",
-                        "Model/Share/",
-                        "Model/Server/",
-                        "Model/Client/",
+                        "Assets/Scripts/Codes/Model/Generate/Server/",
+                        "Assets/Scripts/Codes/Model/Share/",
+                        "Assets/Scripts/Codes/Model/Server/",
+                        "Assets/Scripts/Codes/Model/Client/",
                     };
-                    codes = GetRelativeDirs(codes);
                     break;
                 case CodeMode.ClientServer:
                     codes = new List<string>()
                     {
-                        "Model/Share/",
-                        "Model/Client/",
-                        "ModelView/Client/",
-                        "Model/Generate/Server/",
-                        "Model/Server/",
+                        "Assets/Scripts/Codes/Model/Share/",
+                        "Assets/Scripts/Codes/Model/Client/",
+                        "Assets/Scripts/Codes/ModelView/Client/",
+                        "Assets/Scripts/Codes/Model/Generate/Server/",
+                        "Assets/Scripts/Codes/Model/Server/",
                     };
-                    codes = GetRelativeDirs(codes);
                     break;
                 default:
                     throw new Exception("not found enum");
             }
             
-            BuildAssemblieEditor.BuildMuteAssembly("Model", codes, Array.Empty<string>(), codeOptimization);
+            BuildAssemblieEditor.BuildMuteAssembly("Model", codes, Array.Empty<string>(), codeOptimization, globalConfig.CodeMode);
             
             //反射获取当前Game视图,提示编译完成
             ShowNotification("Build Model Success");
@@ -154,43 +132,42 @@ namespace ET
                 case CodeMode.Client:
                     codes = new List<string>()
                     {
-                        "Hotfix/Share/",
-                        "Hotfix/Client/",
-                        "HotfixView/Client/",
+                        "Assets/Scripts/Codes/Hotfix/Share/",
+                        "Assets/Scripts/Codes/Hotfix/Client/",
+                        "Assets/Scripts/Codes/HotfixView/Client/",
                     };
-                    codes = GetRelativeDirs(codes);
                     break;
                 case CodeMode.Server:
                     codes = new List<string>()
                     {
-                        "Hotfix/Share/",
-                        "Hotfix/Server/",
-                        "Hotfix/Client/",
+                        "Assets/Scripts/Codes/Hotfix/Share/",
+                        "Assets/Scripts/Codes/Hotfix/Server/",
+                        "Assets/Scripts/Codes/Hotfix/Client/",
                     };
-                    codes = GetRelativeDirs(codes);
                     break;
                 case CodeMode.ClientServer:
                     codes = new List<string>()
                     {
-                        "Hotfix/Share/",
-                        "Hotfix/Client/",
-                        "HotfixView/Client/",
-                        "Hotfix/Server/",
+                        "Assets/Scripts/Codes/Hotfix/Share/",
+                        "Assets/Scripts/Codes/Hotfix/Client/",
+                        "Assets/Scripts/Codes/HotfixView/Client/",
+                        "Assets/Scripts/Codes/Hotfix/Server/",
                     };
-                    codes = GetRelativeDirs(codes);
                     break;
                 default:
                     throw new Exception("not found enum");
             }
             
-            BuildAssemblieEditor.BuildMuteAssembly(logicFile, codes, new[]{Path.Combine(Define.BuildOutputDir, "Model.dll")}, codeOptimization);
+            BuildAssemblieEditor.BuildMuteAssembly(logicFile, codes, new[]{Path.Combine(Define.BuildOutputDir, "Model.dll")}, codeOptimization, globalConfig.CodeMode);
             
             //反射获取当前Game视图,提示编译完成
             ShowNotification("Build Hotfix Success");
         }
 
-        private static void BuildMuteAssembly(string assemblyName, List<string> CodeDirectorys, string[] additionalReferences, CodeOptimization codeOptimization)
-        {
+        private static void BuildMuteAssembly(
+                string assemblyName, List<string> CodeDirectorys, 
+                string[] additionalReferences, CodeOptimization codeOptimization, CodeMode codeMode = CodeMode.Client)
+        {            
             if (!Directory.Exists(Define.BuildOutputDir))
             {
                 Directory.CreateDirectory(Define.BuildOutputDir);
@@ -215,8 +192,24 @@ namespace ET
 
             AssemblyBuilder assemblyBuilder = new AssemblyBuilder(dllPath, scripts.ToArray());
             
+            if (codeMode == CodeMode.Client)
+            {
+                assemblyBuilder.excludeReferences = new string[]
+                {
+                    "DnsClient.dll", 
+                    "MongoDB.Driver.Core.dll", 
+                    "MongoDB.Driver.dll", 
+                    "MongoDB.Driver.Legacy.dll", 
+                    "MongoDB.Libmongocrypt.dll", 
+                    "SharpCompress.dll", 
+                    "System.Buffers.dll",
+                    "System.Runtime.CompilerServices.Unsafe.dll",
+                    "System.Text.Encoding.CodePages.dll"
+                };
+            }
+            
             //启用UnSafe
-            //assemblyBuilder.compilerOptions.AllowUnsafeCode = true;
+            assemblyBuilder.compilerOptions.AllowUnsafeCode = true;
 
             BuildTargetGroup buildTargetGroup = BuildPipeline.GetBuildTargetGroup(EditorUserBuildSettings.activeBuildTarget);
 

+ 0 - 1
Unity/Assets/Scripts/Editor/BuildEditor/BuildHelper.cs

@@ -39,7 +39,6 @@ namespace ET
             PlayerSettings.SetScriptingDefineSymbolsForGroup(EditorUserBuildSettings.selectedBuildTargetGroup, defines);
             AssetDatabase.SaveAssets();
         }
-        
 
         public static void Build(PlatformType type, BuildAssetBundleOptions buildAssetBundleOptions, BuildOptions buildOptions, bool isBuildExe, bool isContainAB, bool clearFolder)
         {

+ 0 - 61
Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/BsonConstants.cs

@@ -1,61 +0,0 @@
-/* Copyright 2010-present MongoDB Inc.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-using System;
-
-namespace MongoDB.Bson
-{
-    /// <summary>
-    /// A static class containing BSON constants.
-    /// </summary>
-    public static class BsonConstants
-    {
-        // private static fields
-        private static readonly long __dateTimeMaxValueMillisecondsSinceEpoch;
-        private static readonly long __dateTimeMinValueMillisecondsSinceEpoch;
-        private static readonly DateTime __unixEpoch;
-
-        // static constructor
-        static BsonConstants()
-        {
-            // unixEpoch has to be initialized first
-            __unixEpoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
-            __dateTimeMaxValueMillisecondsSinceEpoch = (DateTime.MaxValue - __unixEpoch).Ticks / 10000;
-            __dateTimeMinValueMillisecondsSinceEpoch = (DateTime.MinValue - __unixEpoch).Ticks / 10000;
-        }
-
-        // public static properties
-        /// <summary>
-        /// Gets the number of milliseconds since the Unix epoch for DateTime.MaxValue.
-        /// </summary>
-        public static long DateTimeMaxValueMillisecondsSinceEpoch
-        {
-            get { return __dateTimeMaxValueMillisecondsSinceEpoch; }
-        }
-
-        /// <summary>
-        /// Gets the number of milliseconds since the Unix epoch for DateTime.MinValue.
-        /// </summary>
-        public static long DateTimeMinValueMillisecondsSinceEpoch
-        {
-            get { return __dateTimeMinValueMillisecondsSinceEpoch; }
-        }
-
-        /// <summary>
-        /// Gets the Unix Epoch for BSON DateTimes (1970-01-01).
-        /// </summary>
-        public static DateTime UnixEpoch { get { return __unixEpoch; } }
-    }
-}

+ 0 - 11
Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/BsonConstants.cs.meta

@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 50b38fa3500f812488580d8813548f23
-MonoImporter:
-  externalObjects: {}
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 157
Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/BsonDefaults.cs

@@ -1,157 +0,0 @@
-/* Copyright 2010-present MongoDB Inc.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-using System;
-using System.Collections.Generic;
-using System.Dynamic;
-using MongoDB.Bson.Serialization;
-namespace MongoDB.Bson
-{
-    /// <summary>
-    /// A static helper class containing BSON defaults.
-    /// </summary>
-    public static class BsonDefaults
-    {
-        // private static fields
-        private static bool __dynamicArraySerializerWasSet;
-        private static IBsonSerializer __dynamicArraySerializer;
-        private static bool __dynamicDocumentSerializerWasSet;
-        private static IBsonSerializer __dynamicDocumentSerializer;
-        private static GuidRepresentation __guidRepresentation = GuidRepresentation.CSharpLegacy;
-        private static GuidRepresentationMode __guidRepresentationMode = GuidRepresentationMode.V2;
-        private static int __maxDocumentSize = int.MaxValue;
-        private static int __maxSerializationDepth = 100;
-
-        // static constructor
-        static BsonDefaults()
-        {
-            var testWithDefaultGuidRepresentation = Environment.GetEnvironmentVariable("TEST_WITH_DEFAULT_GUID_REPRESENTATION");
-            if (testWithDefaultGuidRepresentation != null)
-            {
-                var _ = Enum.TryParse(testWithDefaultGuidRepresentation, out __guidRepresentation); // ignore errors
-            }
-
-            var testWithDefaultGuidRepresentationMode = Environment.GetEnvironmentVariable("TEST_WITH_DEFAULT_GUID_REPRESENTATION_MODE");
-            if (testWithDefaultGuidRepresentationMode != null)
-            {
-                var _ = Enum.TryParse(testWithDefaultGuidRepresentationMode, out __guidRepresentationMode); // ignore errors
-            }
-        }
-
-        // public static properties
-        /// <summary>
-        /// Gets or sets the dynamic array serializer.
-        /// </summary>
-        public static IBsonSerializer DynamicArraySerializer
-        {
-            get
-            {
-                if (!__dynamicArraySerializerWasSet)
-                {
-                    __dynamicArraySerializer = BsonSerializer.LookupSerializer<List<object>>();
-                }
-                return __dynamicArraySerializer;
-            }
-            set
-            {
-                __dynamicArraySerializerWasSet = true;
-                __dynamicArraySerializer = value;
-            }
-        }
-
-        /// <summary>
-        /// Gets or sets the dynamic document serializer.
-        /// </summary>
-        public static IBsonSerializer DynamicDocumentSerializer
-        {
-            get
-            {
-                if (!__dynamicDocumentSerializerWasSet)
-                {
-                    __dynamicDocumentSerializer = BsonSerializer.LookupSerializer<ExpandoObject>();
-                }
-                return __dynamicDocumentSerializer;
-            }
-            set
-            {
-                __dynamicDocumentSerializerWasSet = true;
-                __dynamicDocumentSerializer = value;
-            }
-        }
-
-        /// <summary>
-        /// Gets or sets the default representation to be used in serialization of
-        /// Guids to the database.
-        /// <seealso cref="MongoDB.Bson.GuidRepresentation"/>
-        /// </summary>
-        [Obsolete("Configure serializers instead.")]
-        public static GuidRepresentation GuidRepresentation
-        {
-            get
-            {
-                if (BsonDefaults.GuidRepresentationMode != GuidRepresentationMode.V2)
-                {
-                    throw new InvalidOperationException("BsonDefaults.GuidRepresentation can only be used when BsonDefaults.GuidRepresentationMode is V2.");
-                }
-                return __guidRepresentation;
-            }
-            set
-            {
-                if (BsonDefaults.GuidRepresentationMode != GuidRepresentationMode.V2)
-                {
-                    throw new InvalidOperationException("BsonDefaults.GuidRepresentation can only be used when BsonDefaults.GuidRepresentationMode is V2.");
-                }
-                __guidRepresentation = value;
-            }
-        }
-
-        /// <summary>
-        /// Gets or sets the default representation to be used in serialization of
-        /// Guids to the database.
-        /// <seealso cref="MongoDB.Bson.GuidRepresentation"/>
-        /// </summary>
-        [Obsolete("This property will be removed in a later release.")]
-        public static GuidRepresentationMode GuidRepresentationMode
-        {
-            get { return __guidRepresentationMode; }
-            set
-            {
-                __guidRepresentationMode = value;
-                if (value == GuidRepresentationMode.V3)
-                {
-                    __guidRepresentation = GuidRepresentation.Unspecified;
-                }
-            }
-        }
-
-        /// <summary>
-        /// Gets or sets the default max document size. The default is 4MiB.
-        /// </summary>
-        public static int MaxDocumentSize
-        {
-            get { return __maxDocumentSize; }
-            set { __maxDocumentSize = value; }
-        }
-
-        /// <summary>
-        /// Gets or sets the default max serialization depth (used to detect circular references during serialization). The default is 100.
-        /// </summary>
-        public static int MaxSerializationDepth
-        {
-            get { return __maxSerializationDepth; }
-            set { __maxSerializationDepth = value; }
-        }
-    }
-}

+ 0 - 11
Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/BsonDefaults.cs.meta

@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 0204892a3f09a6b4b976d0276473ce37
-MonoImporter:
-  externalObjects: {}
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 249
Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/BsonExtensionMethods.cs

@@ -1,249 +0,0 @@
-/* Copyright 2010-present MongoDB Inc.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-using System;
-using System.IO;
-using MongoDB.Bson.IO;
-using MongoDB.Bson.Serialization;
-
-namespace MongoDB.Bson
-{
-    /// <summary>
-    /// A static class containing BSON extension methods.
-    /// </summary>
-    public static class BsonExtensionMethods
-    {
-        /// <summary>
-        /// Serializes an object to a BSON byte array.
-        /// </summary>
-        /// <typeparam name="TNominalType">The nominal type of the object.</typeparam>
-        /// <param name="obj">The object.</param>
-        /// <param name="serializer">The serializer.</param>
-        /// <param name="writerSettings">The writer settings.</param>
-        /// <param name="configurator">The serialization context configurator.</param>
-        /// <param name="args">The serialization args.</param>
-        /// <returns>A BSON byte array.</returns>
-        public static byte[] ToBson<TNominalType>(
-            this TNominalType obj,
-            IBsonSerializer<TNominalType> serializer = null,
-            BsonBinaryWriterSettings writerSettings = null,
-            Action<BsonSerializationContext.Builder> configurator = null,
-            BsonSerializationArgs args = default(BsonSerializationArgs)
-            )
-        {
-            args.SetOrValidateNominalType(typeof(TNominalType), "<TNominalType>");
-            return ToBson(obj, typeof(TNominalType), writerSettings, serializer, configurator, args);
-        }
-
-        /// <summary>
-        /// Serializes an object to a BSON byte array.
-        /// </summary>
-        /// <param name="obj">The object.</param>
-        /// <param name="nominalType">The nominal type of the object..</param>
-        /// <param name="writerSettings">The writer settings.</param>
-        /// <param name="serializer">The serializer.</param>
-        /// <param name="configurator">The serialization context configurator.</param>
-        /// <param name="args">The serialization args.</param>
-        /// <returns>A BSON byte array.</returns>
-        /// <exception cref="System.ArgumentNullException">nominalType</exception>
-        /// <exception cref="System.ArgumentException">serializer</exception>
-        public static byte[] ToBson(
-            this object obj,
-            Type nominalType,
-            BsonBinaryWriterSettings writerSettings = null,
-            IBsonSerializer serializer = null,
-            Action<BsonSerializationContext.Builder> configurator = null,
-            BsonSerializationArgs args = default(BsonSerializationArgs))
-        {
-            if (nominalType == null)
-            {
-                throw new ArgumentNullException("nominalType");
-            }
-            args.SetOrValidateNominalType(nominalType, "nominalType");
-
-            if (serializer == null)
-            {
-                serializer = BsonSerializer.LookupSerializer(nominalType);
-            }
-            if (serializer.ValueType != nominalType)
-            {
-                var message = string.Format("Serializer type {0} value type does not match document types {1}.", serializer.GetType().FullName, nominalType.FullName);
-                throw new ArgumentException(message, "serializer");
-            }
-
-            using (var memoryStream = new MemoryStream())
-            {
-                using (var bsonWriter = new BsonBinaryWriter(memoryStream, writerSettings ?? BsonBinaryWriterSettings.Defaults))
-                {
-                    var context = BsonSerializationContext.CreateRoot(bsonWriter, configurator);
-                    serializer.Serialize(context, args, obj);
-                }
-                return memoryStream.ToArray();
-            }
-        }
-
-        /// <summary>
-        /// Serializes an object to a BsonDocument.
-        /// </summary>
-        /// <typeparam name="TNominalType">The nominal type of the object.</typeparam>
-        /// <param name="obj">The object.</param>
-        /// <param name="serializer">The serializer.</param>
-        /// <param name="configurator">The serialization context configurator.</param>
-        /// <param name="args">The serialization args.</param>
-        /// <returns>A BsonDocument.</returns>
-        public static BsonDocument ToBsonDocument<TNominalType>(
-            this TNominalType obj,
-            IBsonSerializer<TNominalType> serializer = null,
-            Action<BsonSerializationContext.Builder> configurator = null,
-            BsonSerializationArgs args = default(BsonSerializationArgs))
-        {
-            args.SetOrValidateNominalType(typeof(TNominalType), "<TNominalType>");
-            return ToBsonDocument(obj, typeof(TNominalType), serializer, configurator, args);
-        }
-
-        /// <summary>
-        /// Serializes an object to a BsonDocument.
-        /// </summary>
-        /// <param name="obj">The object.</param>
-        /// <param name="nominalType">The nominal type of the object.</param>
-        /// <param name="serializer">The serializer.</param>
-        /// <param name="configurator">The serialization context configurator.</param>
-        /// <param name="args">The serialization args.</param>
-        /// <returns>A BsonDocument.</returns>
-        /// <exception cref="System.ArgumentNullException">nominalType</exception>
-        /// <exception cref="System.ArgumentException">serializer</exception>
-        public static BsonDocument ToBsonDocument(
-            this object obj,
-            Type nominalType,
-            IBsonSerializer serializer = null,
-            Action<BsonSerializationContext.Builder> configurator = null,
-            BsonSerializationArgs args = default(BsonSerializationArgs))
-        {
-            if (nominalType == null)
-            {
-                throw new ArgumentNullException("nominalType");
-            }
-            args.SetOrValidateNominalType(nominalType, "nominalType");
-
-            if (obj == null)
-            {
-                return null;
-            }
-
-            if (serializer == null)
-            {
-                var bsonDocument = obj as BsonDocument;
-                if (bsonDocument != null)
-                {
-                    return bsonDocument; // it's already a BsonDocument
-                }
-
-                var convertibleToBsonDocument = obj as IConvertibleToBsonDocument;
-                if (convertibleToBsonDocument != null)
-                {
-                    return convertibleToBsonDocument.ToBsonDocument(); // use the provided ToBsonDocument method
-                }
-
-                serializer = BsonSerializer.LookupSerializer(nominalType);
-            }
-            if (serializer.ValueType != nominalType)
-            {
-                var message = string.Format("Serializer type {0} value type does not match document types {1}.", serializer.GetType().FullName, nominalType.FullName);
-                throw new ArgumentException(message, "serializer");
-            }
-
-            // otherwise serialize into a new BsonDocument
-            var document = new BsonDocument();
-            using (var bsonWriter = new BsonDocumentWriter(document))
-            {
-                var context = BsonSerializationContext.CreateRoot(bsonWriter, configurator);
-                serializer.Serialize(context, args, obj);
-            }
-            return document;
-        }
-
-        /// <summary>
-        /// Serializes an object to a JSON string.
-        /// </summary>
-        /// <typeparam name="TNominalType">The nominal type of the object.</typeparam>
-        /// <param name="obj">The object.</param>
-        /// <param name="writerSettings">The JsonWriter settings.</param>
-        /// <param name="serializer">The serializer.</param>
-        /// <param name="configurator">The serializastion context configurator.</param>
-        /// <param name="args">The serialization args.</param>
-        /// <returns>
-        /// A JSON string.
-        /// </returns>
-        public static string ToJson<TNominalType>(
-            this TNominalType obj,
-            JsonWriterSettings writerSettings = null,
-            IBsonSerializer<TNominalType> serializer = null,
-            Action<BsonSerializationContext.Builder> configurator = null,
-            BsonSerializationArgs args = default(BsonSerializationArgs))
-        {
-            args.SetOrValidateNominalType(typeof(TNominalType), "<TNominalType>");
-            return ToJson(obj, typeof(TNominalType), writerSettings, serializer, configurator, args);
-        }
-
-        /// <summary>
-        /// Serializes an object to a JSON string.
-        /// </summary>
-        /// <param name="obj">The object.</param>
-        /// <param name="nominalType">The nominal type of the objectt.</param>
-        /// <param name="writerSettings">The JsonWriter settings.</param>
-        /// <param name="serializer">The serializer.</param>
-        /// <param name="configurator">The serialization context configurator.</param>
-        /// <param name="args">The serialization args.</param>
-        /// <returns>
-        /// A JSON string.
-        /// </returns>
-        /// <exception cref="System.ArgumentNullException">nominalType</exception>
-        /// <exception cref="System.ArgumentException">serializer</exception>
-        public static string ToJson(
-            this object obj,
-            Type nominalType,
-            JsonWriterSettings writerSettings = null,
-            IBsonSerializer serializer = null,
-            Action<BsonSerializationContext.Builder> configurator = null,
-            BsonSerializationArgs args = default(BsonSerializationArgs))
-        {
-            if (nominalType == null)
-            {
-                throw new ArgumentNullException("nominalType");
-            }
-            args.SetOrValidateNominalType(nominalType, "nominalType");
-
-            if (serializer == null)
-            {
-                serializer = BsonSerializer.LookupSerializer(nominalType);
-            }
-            if (serializer.ValueType != nominalType)
-            {
-                var message = string.Format("Serializer type {0} value type does not match document types {1}.", serializer.GetType().FullName, nominalType.FullName);
-                throw new ArgumentException(message, "serializer");
-            }
-
-            using (var stringWriter = new StringWriter())
-            {
-                using (var bsonWriter = new JsonWriter(stringWriter, writerSettings ?? JsonWriterSettings.Defaults))
-                {
-                    var context = BsonSerializationContext.CreateRoot(bsonWriter, configurator);
-                    serializer.Serialize(context, args, obj);
-                }
-                return stringWriter.ToString();
-            }
-        }
-    }
-}

+ 0 - 11
Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/BsonExtensionMethods.cs.meta

@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 6bd55ae1773b66443a19d88f4466be1a
-MonoImporter:
-  externalObjects: {}
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 276
Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/BsonUtils.cs

@@ -1,276 +0,0 @@
-/* Copyright 2010-present MongoDB Inc.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-using System;
-using System.Reflection;
-using System.Text;
-using System.Text.RegularExpressions;
-
-namespace MongoDB.Bson
-{
-
-    /// <summary>
-    /// A static class containing BSON utility methods.
-    /// </summary>
-    public static class BsonUtils
-    {
-        // public static methods
-        /// <summary>
-        /// Gets a friendly class name suitable for use in error messages.
-        /// </summary>
-        /// <param name="type">The type.</param>
-        /// <returns>A friendly class name.</returns>
-        public static string GetFriendlyTypeName(Type type)
-        {
-            var typeInfo = type.GetTypeInfo();
-            if (!typeInfo.IsGenericType)
-            {
-                return type.Name;
-            }
-
-            var sb = new StringBuilder();
-            sb.AppendFormat("{0}<", Regex.Replace(type.Name, @"\`\d+$", ""));
-            foreach (var typeParameter in typeInfo.GetGenericArguments())
-            {
-                sb.AppendFormat("{0}, ", GetFriendlyTypeName(typeParameter));
-            }
-            sb.Remove(sb.Length - 2, 2);
-            sb.Append(">");
-            return sb.ToString();
-        }
-
-        /// <summary>
-        /// Parses a hex string into its equivalent byte array.
-        /// </summary>
-        /// <param name="s">The hex string to parse.</param>
-        /// <returns>The byte equivalent of the hex string.</returns>
-        public static byte[] ParseHexString(string s)
-        {
-            if (s == null)
-            {
-                throw new ArgumentNullException(nameof(s));
-            }
-
-            byte[] bytes;
-            if (!TryParseHexString(s, out bytes))
-            {
-                throw new FormatException("String should contain only hexadecimal digits.");
-            }
-
-            return bytes;
-        }
-
-        /// <summary>
-        /// Converts from number of milliseconds since Unix epoch to DateTime.
-        /// </summary>
-        /// <param name="millisecondsSinceEpoch">The number of milliseconds since Unix epoch.</param>
-        /// <returns>A DateTime.</returns>
-        public static DateTime ToDateTimeFromMillisecondsSinceEpoch(long millisecondsSinceEpoch)
-        {
-            if (millisecondsSinceEpoch < BsonConstants.DateTimeMinValueMillisecondsSinceEpoch ||
-                millisecondsSinceEpoch > BsonConstants.DateTimeMaxValueMillisecondsSinceEpoch)
-            {
-                var message = string.Format(
-                    "The value {0} for the BsonDateTime MillisecondsSinceEpoch is outside the" +
-                    "range that can be converted to a .NET DateTime.",
-                    millisecondsSinceEpoch);
-                throw new ArgumentOutOfRangeException("millisecondsSinceEpoch", message);
-            }
-
-            // MaxValue has to be handled specially to avoid rounding errors
-            if (millisecondsSinceEpoch == BsonConstants.DateTimeMaxValueMillisecondsSinceEpoch)
-            {
-                return DateTime.SpecifyKind(DateTime.MaxValue, DateTimeKind.Utc);
-            }
-            else
-            {
-                return BsonConstants.UnixEpoch.AddTicks(millisecondsSinceEpoch * 10000);
-            }
-        }
-
-        /// <summary>
-        /// Converts a value to a hex character.
-        /// </summary>
-        /// <param name="value">The value (assumed to be between 0 and 15).</param>
-        /// <returns>The hex character.</returns>
-        public static char ToHexChar(int value)
-        {
-            return (char)(value + (value < 10 ? '0' : 'a' - 10));
-        }
-
-        /// <summary>
-        /// Converts a byte array to a hex string.
-        /// </summary>
-        /// <param name="bytes">The byte array.</param>
-        /// <returns>A hex string.</returns>
-        public static string ToHexString(byte[] bytes)
-        {
-            if (bytes == null)
-            {
-                throw new ArgumentNullException("bytes");
-            }
-
-            var length = bytes.Length;
-            var c = new char[length * 2];
-
-            for (int i = 0, j = 0; i < length; i++)
-            {
-                var b = bytes[i];
-                c[j++] = ToHexChar(b >> 4);
-                c[j++] = ToHexChar(b & 0x0f);
-            }
-
-            return new string(c);
-        }
-
-        /// <summary>
-        /// Converts a DateTime to local time (with special handling for MinValue and MaxValue).
-        /// </summary>
-        /// <param name="dateTime">A DateTime.</param>
-        /// <returns>The DateTime in local time.</returns>
-        public static DateTime ToLocalTime(DateTime dateTime)
-        {
-            if (dateTime == DateTime.MinValue)
-            {
-                return DateTime.SpecifyKind(DateTime.MinValue, DateTimeKind.Local);
-            }
-            else if (dateTime == DateTime.MaxValue)
-            {
-                return DateTime.SpecifyKind(DateTime.MaxValue, DateTimeKind.Local);
-            }
-            else
-            {
-                return dateTime.ToLocalTime();
-            }
-        }
-
-        /// <summary>
-        /// Converts a DateTime to number of milliseconds since Unix epoch.
-        /// </summary>
-        /// <param name="dateTime">A DateTime.</param>
-        /// <returns>Number of milliseconds since Unix epoch.</returns>
-        public static long ToMillisecondsSinceEpoch(DateTime dateTime)
-        {
-            var utcDateTime = ToUniversalTime(dateTime);
-            return (utcDateTime - BsonConstants.UnixEpoch).Ticks / 10000;
-        }
-
-        /// <summary>
-        /// Converts a DateTime to number of seconds since Unix epoch.
-        /// </summary>
-        /// <param name="dateTime">A DateTime.</param>
-        /// <returns>Number of seconds since Unix epoch.</returns>
-        public static long ToSecondsSinceEpoch(DateTime dateTime)
-        {
-            var utcDateTime = ToUniversalTime(dateTime);
-            return (utcDateTime - BsonConstants.UnixEpoch).Ticks / TimeSpan.TicksPerSecond;
-        }
-
-        /// <summary>
-        /// Converts a DateTime to UTC (with special handling for MinValue and MaxValue).
-        /// </summary>
-        /// <param name="dateTime">A DateTime.</param>
-        /// <returns>The DateTime in UTC.</returns>
-        public static DateTime ToUniversalTime(DateTime dateTime)
-        {
-            if (dateTime == DateTime.MinValue)
-            {
-                return DateTime.SpecifyKind(DateTime.MinValue, DateTimeKind.Utc);
-            }
-            else if (dateTime == DateTime.MaxValue)
-            {
-                return DateTime.SpecifyKind(DateTime.MaxValue, DateTimeKind.Utc);
-            }
-            else
-            {
-                return dateTime.ToUniversalTime();
-            }
-        }
-
-        /// <summary>
-        /// Tries to parse a hex string to a byte array.
-        /// </summary>
-        /// <param name="s">The hex string.</param>
-        /// <param name="bytes">A byte array.</param>
-        /// <returns>True if the hex string was successfully parsed.</returns>
-        public static bool TryParseHexString(string s, out byte[] bytes)
-        {
-            bytes = null;
-
-            if (s == null)
-            {
-                return false;
-            }
-
-            var buffer = new byte[(s.Length + 1) / 2];
-
-            var i = 0;
-            var j = 0;
-
-            if ((s.Length % 2) == 1)
-            {
-                // if s has an odd length assume an implied leading "0"
-                int y;
-                if (!TryParseHexChar(s[i++], out y))
-                {
-                    return false;
-                }
-                buffer[j++] = (byte)y;
-            }
-
-            while (i < s.Length)
-            {
-                int x, y;
-                if (!TryParseHexChar(s[i++], out x))
-                {
-                    return false;
-                }
-                if (!TryParseHexChar(s[i++], out y))
-                {
-                    return false;
-                }
-                buffer[j++] = (byte)((x << 4) | y);
-            }
-
-            bytes = buffer;
-            return true;
-        }
-
-        // private static methods
-        private static bool TryParseHexChar(char c, out int value)
-        {
-            if (c >= '0' && c <= '9')
-            {
-                value = c - '0';
-                return true;
-            }
-
-            if (c >= 'a' && c <= 'f')
-            {
-                value = 10 + (c - 'a');
-                return true;
-            }
-
-            if (c >= 'A' && c <= 'F')
-            {
-                value = 10 + (c - 'A');
-                return true;
-            }
-
-            value = 0;
-            return false;
-        }
-    }
-}

+ 0 - 11
Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/BsonUtils.cs.meta

@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 101138ef4beb86f4fac13777857bf0b4
-MonoImporter:
-  externalObjects: {}
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 75
Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/Exceptions/BsonException.cs

@@ -1,75 +0,0 @@
-/* Copyright 2010-present MongoDB Inc.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-using System;
-using System.Runtime.Serialization;
-
-namespace MongoDB.Bson
-{
-    /// <summary>
-    /// Represents a BSON exception.
-    /// </summary>
-    [Serializable]
-    public class BsonException : Exception
-    {
-        // constructors
-        /// <summary>
-        /// Initializes a new instance of the BsonException class.
-        /// </summary>
-        public BsonException()
-            : base()
-        {
-        }
-
-        /// <summary>
-        /// Initializes a new instance of the BsonException class.
-        /// </summary>
-        /// <param name="message">The error message.</param>
-        public BsonException(string message)
-            : base(message)
-        {
-        }
-
-        /// <summary>
-        /// Initializes a new instance of the BsonException class.
-        /// </summary>
-        /// <param name="message">The error message.</param>
-        /// <param name="innerException">The inner exception.</param>
-        public BsonException(string message, Exception innerException)
-            : base(message, innerException)
-        {
-        }
-
-        /// <summary>
-        /// Initializes a new instance of the BsonException class.
-        /// </summary>
-        /// <param name="format">The error message format string.</param>
-        /// <param name="args">One or more args for the error message.</param>
-        public BsonException(string format, params object[] args)
-            : base(string.Format(format, args))
-        {
-        }
-
-        /// <summary>
-        /// Initializes a new instance of the BsonException class (this overload used by deserialization).
-        /// </summary>
-        /// <param name="info">The SerializationInfo.</param>
-        /// <param name="context">The StreamingContext.</param>
-        public BsonException(SerializationInfo info, StreamingContext context)
-            : base(info, context)
-        {
-        }
-    }
-}

+ 0 - 11
Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/Exceptions/BsonException.cs.meta

@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: e157ba776a068c547801d86c38487f29
-MonoImporter:
-  externalObjects: {}
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 65
Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/Exceptions/BsonInternalException.cs

@@ -1,65 +0,0 @@
-/* Copyright 2010-present MongoDB Inc.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-using System;
-using System.Runtime.Serialization;
-
-namespace MongoDB.Bson
-{
-    /// <summary>
-    /// Represents a BSON internal exception (almost surely the result of a bug).
-    /// </summary>
-    [Serializable]
-    public class BsonInternalException : BsonException
-    {
-        // constructors
-        /// <summary>
-        /// Initializes a new instance of the BsonInternalException class.
-        /// </summary>
-        public BsonInternalException()
-            : base()
-        {
-        }
-
-        /// <summary>
-        /// Initializes a new instance of the BsonInternalException class.
-        /// </summary>
-        /// <param name="message">The error message.</param>
-        public BsonInternalException(string message)
-            : base(message)
-        {
-        }
-
-        /// <summary>
-        /// Initializes a new instance of the BsonInternalException class.
-        /// </summary>
-        /// <param name="message">The error message.</param>
-        /// <param name="innerException">The inner exception.</param>
-        public BsonInternalException(string message, Exception innerException)
-            : base(message, innerException)
-        {
-        }
-
-        /// <summary>
-        /// Initializes a new instance of the BsonInternalException class (this overload used by deserialization).
-        /// </summary>
-        /// <param name="info">The SerializationInfo.</param>
-        /// <param name="context">The StreamingContext.</param>
-        public BsonInternalException(SerializationInfo info, StreamingContext context)
-            : base(info, context)
-        {
-        }
-    }
-}

+ 0 - 11
Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/Exceptions/BsonInternalException.cs.meta

@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: be457a2405e3bee468de47951a49658b
-MonoImporter:
-  externalObjects: {}
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 65
Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/Exceptions/BsonSerializationException.cs

@@ -1,65 +0,0 @@
-/* Copyright 2010-present MongoDB Inc.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-using System;
-using System.Runtime.Serialization;
-
-namespace MongoDB.Bson
-{
-    /// <summary>
-    /// Represents a BSON serialization exception.
-    /// </summary>
-    [Serializable]
-    public class BsonSerializationException : BsonException
-    {
-        // constructors
-        /// <summary>
-        /// Initializes a new instance of the BsonSerializationException class.
-        /// </summary>
-        public BsonSerializationException()
-            : base()
-        {
-        }
-
-        /// <summary>
-        /// Initializes a new instance of the BsonSerializationException class.
-        /// </summary>
-        /// <param name="message">The error message.</param>
-        public BsonSerializationException(string message)
-            : base(message)
-        {
-        }
-
-        /// <summary>
-        /// Initializes a new instance of the BsonSerializationException class.
-        /// </summary>
-        /// <param name="message">The error message.</param>
-        /// <param name="innerException">The inner exception.</param>
-        public BsonSerializationException(string message, Exception innerException)
-            : base(message, innerException)
-        {
-        }
-
-        /// <summary>
-        /// Initializes a new instance of the BsonSerializationException class (this overload used by deserialization).
-        /// </summary>
-        /// <param name="info">The SerializationInfo.</param>
-        /// <param name="context">The StreamingContext.</param>
-        public BsonSerializationException(SerializationInfo info, StreamingContext context)
-            : base(info, context)
-        {
-        }
-    }
-}

+ 0 - 11
Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/Exceptions/BsonSerializationException.cs.meta

@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: b36b7f6dd69c1ba4ba5ebfd7d897751c
-MonoImporter:
-  externalObjects: {}
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 57
Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/Exceptions/DuplicateBsonMemberMapAttributeException.cs

@@ -1,57 +0,0 @@
-/* Copyright 2010-present MongoDB Inc.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-using System;
-using System.Runtime.Serialization;
-
-namespace MongoDB.Bson
-{
-    /// <summary>
-    /// Indicates that an attribute restricted to one member has been applied to multiple members.
-    /// </summary>
-    [Serializable]
-    public class DuplicateBsonMemberMapAttributeException : BsonException
-    {
-        // constructors 
-        /// <summary>
-        /// Initializes a new instance of the <see cref="DuplicateBsonMemberMapAttributeException" /> class.
-        /// </summary>
-        /// <param name="message">The message.</param>
-        public DuplicateBsonMemberMapAttributeException(string message)
-            : base(message)
-        {
-        }
-
-        /// <summary>
-        /// Initializes a new instance of the <see cref="DuplicateBsonMemberMapAttributeException" /> class.
-        /// </summary>
-        /// <param name="message">The message.</param>
-        /// <param name="inner">The inner.</param>
-        public DuplicateBsonMemberMapAttributeException(string message, Exception inner)
-            : base(message, inner)
-        {
-        }
-
-        /// <summary>
-        /// Initializes a new instance of the <see cref="DuplicateBsonMemberMapAttributeException" /> class.
-        /// </summary>
-        /// <param name="info">The info.</param>
-        /// <param name="context">The context.</param>
-        protected DuplicateBsonMemberMapAttributeException(SerializationInfo info, StreamingContext context)
-            : base(info, context)
-        {
-        }
-    }
-}

+ 0 - 11
Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/Exceptions/DuplicateBsonMemberMapAttributeException.cs.meta

@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 6291a72760f648d4eb78f2db6e9a2e8b
-MonoImporter:
-  externalObjects: {}
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 65
Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/Exceptions/TruncationException.cs

@@ -1,65 +0,0 @@
-/* Copyright 2010-present MongoDB Inc.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-using System;
-using System.Runtime.Serialization;
-
-namespace MongoDB.Bson
-{
-    /// <summary>
-    /// Represents a truncation exception.
-    /// </summary>
-    [Serializable]
-    public class TruncationException : BsonException
-    {
-        // constructors
-        /// <summary>
-        /// Initializes a new instance of the TruncationException class.
-        /// </summary>
-        public TruncationException()
-            : this("Truncation resulted in data loss.")
-        {
-        }
-
-        /// <summary>
-        /// Initializes a new instance of the TruncationException class.
-        /// </summary>
-        /// <param name="message">The error message.</param>
-        public TruncationException(string message)
-            : base(message)
-        {
-        }
-
-        /// <summary>
-        /// Initializes a new instance of the TruncationException class.
-        /// </summary>
-        /// <param name="message">The error message.</param>
-        /// <param name="innerException">The inner exception.</param>
-        public TruncationException(string message, Exception innerException)
-            : base(message, innerException)
-        {
-        }
-
-        /// <summary>
-        /// Initializes a new instance of the TruncationException class (this overload used by deserialization).
-        /// </summary>
-        /// <param name="info">The SerializationInfo.</param>
-        /// <param name="context">The StreamingContext.</param>
-        public TruncationException(SerializationInfo info, StreamingContext context)
-            : base(info, context)
-        {
-        }
-    }
-}

+ 0 - 11
Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/Exceptions/TruncationException.cs.meta

@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 8df4072cb432e16449d81249716751f3
-MonoImporter:
-  externalObjects: {}
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 48
Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/HexUtils.cs

@@ -1,48 +0,0 @@
-/* Copyright 2019-present MongoDB Inc.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-using System.Globalization;
-
-namespace MongoDB.Shared
-{
-    internal static class HexUtils
-    {
-        public static bool IsValidHexDigit(char c)
-        {
-            return
-                c >= '0' && c <= '9' ||
-                c >= 'a' && c <= 'f' ||
-                c >= 'A' && c <= 'F';
-        }
-
-        public static bool IsValidHexString(string s)
-        {
-            for (var i = 0; i < s.Length; i++)
-            {
-                if (!IsValidHexDigit(s[i]))
-                {
-                    return false;
-                }
-            }
-
-            return true;
-        }
-
-        public static int ParseInt32(string value)
-        {
-            return int.Parse(value, NumberStyles.HexNumber);
-        }
-    }
-}

+ 0 - 11
Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/HexUtils.cs.meta

@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 594c8ad2cd51cb4429527f30a4b40d74
-MonoImporter:
-  externalObjects: {}
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 125
Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/IO/ArrayElementNameAccelerator.cs

@@ -1,125 +0,0 @@
-/* Copyright 2010-present MongoDB Inc.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-using System;
-
-namespace MongoDB.Bson.IO
-{
-    /// <summary>
-    /// Represents a fast converter from integer indexes to UTF8 BSON array element names.
-    /// </summary>
-    internal interface IArrayElementNameAccelerator
-    {
-        /// <summary>
-        /// Gets the element name bytes.
-        /// </summary>
-        /// <param name="index">The index.</param>
-        /// <returns>The element name bytes.</returns>
-        byte[] GetElementNameBytes(int index);
-    }
-
-    /// <summary>
-    /// Represents a fast converter from integer indexes to UTF8 BSON array element names.
-    /// </summary>
-    internal class ArrayElementNameAccelerator : IArrayElementNameAccelerator
-    {
-        #region static
-        // static fields
-        private static IArrayElementNameAccelerator __default = new ArrayElementNameAccelerator(1000);
-
-        // static properties
-        /// <summary>
-        /// Gets or sets the default array element name accelerator.
-        /// </summary>
-        public static IArrayElementNameAccelerator Default
-        {
-            get { return __default; }
-            set { __default = value; }
-        }
-        #endregion
-
-        // fields
-        private readonly byte[][] _cachedElementNames;
-
-        // constructors
-        /// <summary>
-        /// Initializes a new instance of the <see cref="ArrayElementNameAccelerator"/> class.
-        /// </summary>
-        /// <param name="numberOfCachedElementNames">The number of cached element names.</param>
-        public ArrayElementNameAccelerator(int numberOfCachedElementNames)
-        {
-            _cachedElementNames = new byte[numberOfCachedElementNames][];
-            for (int index = 0; index < numberOfCachedElementNames; index++)
-            {
-                _cachedElementNames[index] = CreateElementNameBytes(index);
-            }
-        }
-
-        // methods
-        private byte[] CreateElementNameBytes(int index)
-        {
-            // unrolled loop optimized for index values >= 1000 and < 10,000
-
-            const int asciiZero = 48;
-
-            var n = index;
-            var a = (byte)(asciiZero + n % 10);
-            n = n / 10;
-            var b = (byte)(asciiZero + n % 10);
-            n = n / 10;
-            var c = (byte)(asciiZero + n % 10);
-            n = n / 10;
-            var d = (byte)(asciiZero + n % 10);
-            n = n / 10;
-
-            if (n == 0)
-            {
-                if (d != (byte)asciiZero) { return new[] { d, c, b, a }; }
-                if (c != (byte)asciiZero) { return new[] { c, b, a }; }
-                if (b != (byte)asciiZero) { return new[] { b, a }; }
-                return new[] { a };
-            }
-
-            var e = (byte)(asciiZero + n % 10);
-            n = n / 10;
-            if (n == 0) { return new[] { e, d, c, b, a }; }
-
-            // really large indexes should be extremely rare and not worth optimizing further
-            return Utf8Encodings.Strict.GetBytes(index.ToString());
-        }
-
-        /// <summary>
-        /// Gets the element name bytes.
-        /// </summary>
-        /// <param name="index">The index.</param>
-        /// <returns>
-        /// The element name bytes.
-        /// </returns>
-        public byte[] GetElementNameBytes(int index)
-        {
-            if (index < 0)
-            {
-                throw new ArgumentOutOfRangeException("index", "index is negative.");
-            }
-
-            if (index < _cachedElementNames.Length)
-            {
-                return _cachedElementNames[index];
-            }
-
-            return CreateElementNameBytes(index);
-        }
-    }
-}

+ 0 - 11
Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/IO/ArrayElementNameAccelerator.cs.meta

@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 2be11ae6e42a1854faf22792cccb55a1
-MonoImporter:
-  externalObjects: {}
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 840
Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/IO/BsonBinaryReader.cs

@@ -1,840 +0,0 @@
-/* Copyright 2010-present MongoDB Inc.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-using System;
-using System.Globalization;
-using System.IO;
-
-namespace MongoDB.Bson.IO
-{
-    /// <summary>
-    /// Represents a BSON reader for a binary BSON byte array.
-    /// </summary>
-    public class BsonBinaryReader : BsonReader
-    {
-        // private fields
-        private readonly Stream _baseStream;
-        private readonly BsonStream _bsonStream;
-        private BsonBinaryReaderContext _context;
-
-        // constructors
-        /// <summary>
-        /// Initializes a new instance of the BsonBinaryReader class.
-        /// </summary>
-        /// <param name="stream">A stream (BsonBinary does not own the stream and will not Dispose it).</param>
-        public BsonBinaryReader(Stream stream)
-            : this(stream, BsonBinaryReaderSettings.Defaults)
-        {
-        }
-
-        /// <summary>
-        /// Initializes a new instance of the BsonBinaryReader class.
-        /// </summary>
-        /// <param name="stream">A stream (BsonBinary does not own the stream and will not Dispose it).</param>
-        /// <param name="settings">A BsonBinaryReaderSettings.</param>
-        public BsonBinaryReader(Stream stream, BsonBinaryReaderSettings settings)
-            : base(settings)
-        {
-            if (stream == null)
-            {
-                throw new ArgumentNullException("stream");
-            }
-            if (!stream.CanSeek)
-            {
-                throw new ArgumentException("The stream must be capable of seeking.", "stream");
-            }
-
-            _baseStream = stream;
-            _bsonStream = (stream as BsonStream) ?? new BsonStreamAdapter(stream);
-
-            _context = new BsonBinaryReaderContext(null, ContextType.TopLevel, 0, 0);
-        }
-
-        // public properties
-        /// <summary>
-        /// Gets the base stream.
-        /// </summary>
-        /// <value>
-        /// The base stream.
-        /// </value>
-        public Stream BaseStream
-        {
-            get { return _baseStream; }
-        }
-
-        /// <summary>
-        /// Gets the BSON stream.
-        /// </summary>
-        /// <value>
-        /// The BSON stream.
-        /// </value>
-        public BsonStream BsonStream
-        {
-            get { return _bsonStream; }
-        }
-
-        /// <summary>
-        /// Gets the settings of the writer.
-        /// </summary>
-        public new BsonBinaryReaderSettings Settings
-        {
-            get { return (BsonBinaryReaderSettings)base.Settings; }
-        }
-
-        // public methods
-        /// <summary>
-        /// Closes the reader.
-        /// </summary>
-        public override void Close()
-        {
-            // Close can be called on Disposed objects
-            State = BsonReaderState.Closed;
-        }
-
-        /// <summary>
-        /// Gets a bookmark to the reader's current position and state.
-        /// </summary>
-        /// <returns>A bookmark.</returns>
-        public override BsonReaderBookmark GetBookmark()
-        {
-            return new BsonBinaryReaderBookmark(State, CurrentBsonType, CurrentName, _context, _bsonStream.Position);
-        }
-
-        /// <summary>
-        /// Determines whether this reader is at end of file.
-        /// </summary>
-        /// <returns>
-        /// Whether this reader is at end of file.
-        /// </returns>
-        public override bool IsAtEndOfFile()
-        {
-            return _bsonStream.Position >= _bsonStream.Length;
-        }
-
-        /// <summary>
-        /// Reads BSON binary data from the reader.
-        /// </summary>
-        /// <returns>A BsonBinaryData.</returns>
-#pragma warning disable 618 // about obsolete BsonBinarySubType.OldBinary
-        public override BsonBinaryData ReadBinaryData()
-        {
-            if (Disposed) { ThrowObjectDisposedException(); }
-            VerifyBsonType("ReadBinaryData", BsonType.Binary);
-
-            int size = ReadSize();
-
-            var subType = _bsonStream.ReadBinarySubType();
-            if (subType == BsonBinarySubType.OldBinary)
-            {
-                // sub type OldBinary has two sizes (for historical reasons)
-                int size2 = ReadSize();
-                if (size2 != size - 4)
-                {
-                    throw new FormatException("Binary sub type OldBinary has inconsistent sizes");
-                }
-                size = size2;
-
-                if (Settings.FixOldBinarySubTypeOnInput)
-                {
-                    subType = BsonBinarySubType.Binary; // replace obsolete OldBinary with new Binary sub type
-                }
-            }
-
-            var bytes = _bsonStream.ReadBytes(size);
-
-            BsonBinaryData binaryData;
-            if (BsonDefaults.GuidRepresentationMode == GuidRepresentationMode.V2)
-            {
-                GuidRepresentation guidRepresentation;
-                switch (subType)
-                {
-                    case BsonBinarySubType.UuidLegacy: guidRepresentation = Settings.GuidRepresentation; break;
-                    case BsonBinarySubType.UuidStandard: guidRepresentation = GuidRepresentation.Standard; break;
-                    default: guidRepresentation = GuidRepresentation.Unspecified; break;
-                }
-                binaryData = new BsonBinaryData(bytes, subType, guidRepresentation);
-            }
-            else
-            {
-                binaryData = new BsonBinaryData(bytes, subType);
-            }
-
-            State = GetNextState();
-            return binaryData;
-        }
-#pragma warning restore 618
-
-        /// <summary>
-        /// Reads a BSON boolean from the reader.
-        /// </summary>
-        /// <returns>A Boolean.</returns>
-        public override bool ReadBoolean()
-        {
-            if (Disposed) { ThrowObjectDisposedException(); }
-            VerifyBsonType("ReadBoolean", BsonType.Boolean);
-            State = GetNextState();
-            return _bsonStream.ReadBoolean();
-        }
-
-        /// <summary>
-        /// Reads a BsonType from the reader.
-        /// </summary>
-        /// <returns>A BsonType.</returns>
-        public override BsonType ReadBsonType()
-        {
-            if (Disposed) { ThrowObjectDisposedException(); }
-            if (State == BsonReaderState.Initial || State == BsonReaderState.ScopeDocument)
-            {
-                // there is an implied type of Document for the top level and for scope documents
-                CurrentBsonType = BsonType.Document;
-                State = BsonReaderState.Value;
-                return CurrentBsonType;
-            }
-            if (State != BsonReaderState.Type)
-            {
-                ThrowInvalidState("ReadBsonType", BsonReaderState.Type);
-            }
-
-            if (_context.ContextType == ContextType.Array)
-            {
-                _context.CurrentArrayIndex++;
-            }
-
-            try
-            {
-
-                CurrentBsonType = _bsonStream.ReadBsonType();
-            }
-            catch (FormatException ex)
-            {
-                if (ex.Message.StartsWith("Detected unknown BSON type", StringComparison.Ordinal))
-                {
-                    // insert the element name into the error message
-                    var periodIndex = ex.Message.IndexOf('.');
-                    var dottedElementName = GenerateDottedElementName();
-                    var message = ex.Message.Substring(0, periodIndex) + $" for fieldname \"{dottedElementName}\"" + ex.Message.Substring(periodIndex);
-                    throw new FormatException(message);
-                }
-                throw;
-            }
-
-            if (CurrentBsonType == BsonType.EndOfDocument)
-            {
-                switch (_context.ContextType)
-                {
-                    case ContextType.Array:
-                        State = BsonReaderState.EndOfArray;
-                        return BsonType.EndOfDocument;
-                    case ContextType.Document:
-                    case ContextType.ScopeDocument:
-                        State = BsonReaderState.EndOfDocument;
-                        return BsonType.EndOfDocument;
-                    default:
-                        var message = string.Format("BsonType EndOfDocument is not valid when ContextType is {0}.", _context.ContextType);
-                        throw new FormatException(message);
-                }
-            }
-            else
-            {
-                switch (_context.ContextType)
-                {
-                    case ContextType.Array:
-                        _bsonStream.SkipCString(); // ignore array element names
-                        State = BsonReaderState.Value;
-                        break;
-                    case ContextType.Document:
-                    case ContextType.ScopeDocument:
-                        State = BsonReaderState.Name;
-                        break;
-                    default:
-                        throw new BsonInternalException("Unexpected ContextType.");
-                }
-
-                return CurrentBsonType;
-            }
-        }
-
-        /// <summary>
-        /// Reads BSON binary data from the reader.
-        /// </summary>
-        /// <returns>A byte array.</returns>
-#pragma warning disable 618 // about obsolete BsonBinarySubType.OldBinary
-        public override byte[] ReadBytes()
-        {
-            if (Disposed) { ThrowObjectDisposedException(); }
-            VerifyBsonType("ReadBytes", BsonType.Binary);
-
-            int size = ReadSize();
-
-            var subType = _bsonStream.ReadBinarySubType();
-            if (subType != BsonBinarySubType.Binary && subType != BsonBinarySubType.OldBinary)
-            {
-                var message = string.Format("ReadBytes requires the binary sub type to be Binary, not {0}.", subType);
-                throw new FormatException(message);
-            }
-
-            State = GetNextState();
-            return _bsonStream.ReadBytes(size);
-        }
-#pragma warning restore 618
-
-        /// <summary>
-        /// Reads a BSON DateTime from the reader.
-        /// </summary>
-        /// <returns>The number of milliseconds since the Unix epoch.</returns>
-        public override long ReadDateTime()
-        {
-            if (Disposed) { ThrowObjectDisposedException(); }
-            VerifyBsonType("ReadDateTime", BsonType.DateTime);
-            State = GetNextState();
-            var value = _bsonStream.ReadInt64();
-            if (value == BsonConstants.DateTimeMaxValueMillisecondsSinceEpoch + 1)
-            {
-                if (Settings.FixOldDateTimeMaxValueOnInput)
-                {
-                    value = BsonConstants.DateTimeMaxValueMillisecondsSinceEpoch;
-                }
-            }
-            return value;
-        }
-
-        /// <inheritdoc />
-        public override Decimal128 ReadDecimal128()
-        {
-            if (Disposed) { ThrowObjectDisposedException(); }
-            VerifyBsonType(nameof(ReadDecimal128), BsonType.Decimal128);
-            State = GetNextState();
-            return _bsonStream.ReadDecimal128();
-        }
-
-        /// <summary>
-        /// Reads a BSON Double from the reader.
-        /// </summary>
-        /// <returns>A Double.</returns>
-        public override double ReadDouble()
-        {
-            if (Disposed) { ThrowObjectDisposedException(); }
-            VerifyBsonType("ReadDouble", BsonType.Double);
-            State = GetNextState();
-            return _bsonStream.ReadDouble();
-        }
-
-        /// <summary>
-        /// Reads the end of a BSON array from the reader.
-        /// </summary>
-        public override void ReadEndArray()
-        {
-            if (Disposed) { ThrowObjectDisposedException(); }
-            if (_context.ContextType != ContextType.Array)
-            {
-                ThrowInvalidContextType("ReadEndArray", _context.ContextType, ContextType.Array);
-            }
-            if (State == BsonReaderState.Type)
-            {
-                ReadBsonType(); // will set state to EndOfArray if at end of array
-            }
-            if (State != BsonReaderState.EndOfArray)
-            {
-                ThrowInvalidState("ReadEndArray", BsonReaderState.EndOfArray);
-            }
-
-            _context = _context.PopContext(_bsonStream.Position);
-            switch (_context.ContextType)
-            {
-                case ContextType.Array: State = BsonReaderState.Type; break;
-                case ContextType.Document: State = BsonReaderState.Type; break;
-                case ContextType.TopLevel: State = BsonReaderState.Initial; break;
-                default: throw new BsonInternalException("Unexpected ContextType.");
-            }
-        }
-
-        /// <summary>
-        /// Reads the end of a BSON document from the reader.
-        /// </summary>
-        public override void ReadEndDocument()
-        {
-            if (Disposed) { ThrowObjectDisposedException(); }
-            if (_context.ContextType != ContextType.Document && _context.ContextType != ContextType.ScopeDocument)
-            {
-                ThrowInvalidContextType("ReadEndDocument", _context.ContextType, ContextType.Document, ContextType.ScopeDocument);
-            }
-            if (State == BsonReaderState.Type)
-            {
-                ReadBsonType(); // will set state to EndOfDocument if at end of document
-            }
-            if (State != BsonReaderState.EndOfDocument)
-            {
-                ThrowInvalidState("ReadEndDocument", BsonReaderState.EndOfDocument);
-            }
-
-            _context = _context.PopContext(_bsonStream.Position);
-            if (_context.ContextType == ContextType.JavaScriptWithScope)
-            {
-                _context = _context.PopContext(_bsonStream.Position); // JavaScriptWithScope
-            }
-            switch (_context.ContextType)
-            {
-                case ContextType.Array: State = BsonReaderState.Type; break;
-                case ContextType.Document: State = BsonReaderState.Type; break;
-                case ContextType.TopLevel: State = BsonReaderState.Initial; break;
-                default: throw new BsonInternalException("Unexpected ContextType.");
-            }
-        }
-
-        /// <summary>
-        /// Reads a BSON Int32 from the reader.
-        /// </summary>
-        /// <returns>An Int32.</returns>
-        public override int ReadInt32()
-        {
-            if (Disposed) { ThrowObjectDisposedException(); }
-            VerifyBsonType("ReadInt32", BsonType.Int32);
-            State = GetNextState();
-            return _bsonStream.ReadInt32();
-        }
-
-        /// <summary>
-        /// Reads a BSON Int64 from the reader.
-        /// </summary>
-        /// <returns>An Int64.</returns>
-        public override long ReadInt64()
-        {
-            if (Disposed) { ThrowObjectDisposedException(); }
-            VerifyBsonType("ReadInt64", BsonType.Int64);
-            State = GetNextState();
-            return _bsonStream.ReadInt64();
-        }
-
-        /// <summary>
-        /// Reads a BSON JavaScript from the reader.
-        /// </summary>
-        /// <returns>A string.</returns>
-        public override string ReadJavaScript()
-        {
-            if (Disposed) { ThrowObjectDisposedException(); }
-            VerifyBsonType("ReadJavaScript", BsonType.JavaScript);
-            State = GetNextState();
-            return _bsonStream.ReadString(Settings.Encoding);
-        }
-
-        /// <summary>
-        /// Reads a BSON JavaScript with scope from the reader (call ReadStartDocument next to read the scope).
-        /// </summary>
-        /// <returns>A string.</returns>
-        public override string ReadJavaScriptWithScope()
-        {
-            if (Disposed) { ThrowObjectDisposedException(); }
-            VerifyBsonType("ReadJavaScriptWithScope", BsonType.JavaScriptWithScope);
-
-            var startPosition = _bsonStream.Position; // position of size field
-            var size = ReadSize();
-            _context = new BsonBinaryReaderContext(_context, ContextType.JavaScriptWithScope, startPosition, size);
-            var code = _bsonStream.ReadString(Settings.Encoding);
-
-            State = BsonReaderState.ScopeDocument;
-            return code;
-        }
-
-        /// <summary>
-        /// Reads a BSON MaxKey from the reader.
-        /// </summary>
-        public override void ReadMaxKey()
-        {
-            if (Disposed) { ThrowObjectDisposedException(); }
-            VerifyBsonType("ReadMaxKey", BsonType.MaxKey);
-            State = GetNextState();
-        }
-
-        /// <summary>
-        /// Reads a BSON MinKey from the reader.
-        /// </summary>
-        public override void ReadMinKey()
-        {
-            if (Disposed) { ThrowObjectDisposedException(); }
-            VerifyBsonType("ReadMinKey", BsonType.MinKey);
-            State = GetNextState();
-        }
-
-        /// <summary>
-        /// Reads the name of an element from the reader.
-        /// </summary>
-        /// <param name="nameDecoder">The name decoder.</param>
-        /// <returns>The name of the element.</returns>
-        public override string ReadName(INameDecoder nameDecoder)
-        {
-            if (nameDecoder == null)
-            {
-                throw new ArgumentNullException("nameDecoder");
-            }
-
-            if (Disposed) { ThrowObjectDisposedException(); }
-            if (State == BsonReaderState.Type)
-            {
-                ReadBsonType();
-            }
-            if (State != BsonReaderState.Name)
-            {
-                ThrowInvalidState("ReadName", BsonReaderState.Name);
-            }
-
-            CurrentName = nameDecoder.Decode(_bsonStream, Settings.Encoding);
-            State = BsonReaderState.Value;
-
-            if (_context.ContextType == ContextType.Document)
-            {
-                _context.CurrentElementName = CurrentName;
-            }
-
-            return CurrentName;
-        }
-
-        /// <summary>
-        /// Reads a BSON null from the reader.
-        /// </summary>
-        public override void ReadNull()
-        {
-            if (Disposed) { ThrowObjectDisposedException(); }
-            VerifyBsonType("ReadNull", BsonType.Null);
-            State = GetNextState();
-        }
-
-        /// <summary>
-        /// Reads a BSON ObjectId from the reader.
-        /// </summary>
-        /// <returns>An ObjectId.</returns>
-        public override ObjectId ReadObjectId()
-        {
-            if (Disposed) { ThrowObjectDisposedException(); }
-            VerifyBsonType("ReadObjectId", BsonType.ObjectId);
-            State = GetNextState();
-            return _bsonStream.ReadObjectId();
-        }
-
-        /// <summary>
-        /// Reads a raw BSON array.
-        /// </summary>
-        /// <returns>
-        /// The raw BSON array.
-        /// </returns>
-        public override IByteBuffer ReadRawBsonArray()
-        {
-            if (Disposed) { ThrowObjectDisposedException(); }
-            VerifyBsonType("ReadRawBsonArray", BsonType.Array);
-
-            var slice = _bsonStream.ReadSlice();
-
-            switch (_context.ContextType)
-            {
-                case ContextType.Array: State = BsonReaderState.Type; break;
-                case ContextType.Document: State = BsonReaderState.Type; break;
-                case ContextType.TopLevel: State = BsonReaderState.Initial; break;
-                default: throw new BsonInternalException("Unexpected ContextType.");
-            }
-
-            return slice;
-        }
-
-        /// <summary>
-        /// Reads a raw BSON document.
-        /// </summary>
-        /// <returns>
-        /// The raw BSON document.
-        /// </returns>
-        public override IByteBuffer ReadRawBsonDocument()
-        {
-            if (Disposed) { ThrowObjectDisposedException(); }
-            VerifyBsonType("ReadRawBsonDocument", BsonType.Document);
-
-            var slice = _bsonStream.ReadSlice();
-
-            if (_context.ContextType == ContextType.JavaScriptWithScope)
-            {
-                _context = _context.PopContext(_bsonStream.Position); // JavaScriptWithScope
-            }
-            switch (_context.ContextType)
-            {
-                case ContextType.Array: State = BsonReaderState.Type; break;
-                case ContextType.Document: State = BsonReaderState.Type; break;
-                case ContextType.TopLevel: State = BsonReaderState.Initial; break;
-                default: throw new BsonInternalException("Unexpected ContextType.");
-            }
-
-            return slice;
-        }
-
-        /// <summary>
-        /// Reads a BSON regular expression from the reader.
-        /// </summary>
-        /// <returns>A BsonRegularExpression.</returns>
-        public override BsonRegularExpression ReadRegularExpression()
-        {
-            if (Disposed) { ThrowObjectDisposedException(); }
-            VerifyBsonType("ReadRegularExpression", BsonType.RegularExpression);
-            State = GetNextState();
-            var pattern = _bsonStream.ReadCString(Settings.Encoding);
-            var options = _bsonStream.ReadCString(Settings.Encoding);
-            return new BsonRegularExpression(pattern, options);
-        }
-
-        /// <summary>
-        /// Reads the start of a BSON array.
-        /// </summary>
-        public override void ReadStartArray()
-        {
-            if (Disposed) { ThrowObjectDisposedException(); }
-            VerifyBsonType("ReadStartArray", BsonType.Array);
-
-            var startPosition = _bsonStream.Position; // position of size field
-            var size = ReadSize();
-            _context = new BsonBinaryReaderContext(_context, ContextType.Array, startPosition, size);
-            State = BsonReaderState.Type;
-        }
-
-        /// <summary>
-        /// Reads the start of a BSON document.
-        /// </summary>
-        public override void ReadStartDocument()
-        {
-            if (Disposed) { ThrowObjectDisposedException(); }
-            VerifyBsonType("ReadStartDocument", BsonType.Document);
-
-            var contextType = (State == BsonReaderState.ScopeDocument) ? ContextType.ScopeDocument : ContextType.Document;
-            var startPosition = _bsonStream.Position; // position of size field
-            var size = ReadSize();
-            _context = new BsonBinaryReaderContext(_context, contextType, startPosition, size);
-            State = BsonReaderState.Type;
-        }
-
-        /// <summary>
-        /// Reads a BSON string from the reader.
-        /// </summary>
-        /// <returns>A String.</returns>
-        public override string ReadString()
-        {
-            if (Disposed) { ThrowObjectDisposedException(); }
-            VerifyBsonType("ReadString", BsonType.String);
-            State = GetNextState();
-            return _bsonStream.ReadString(Settings.Encoding);
-        }
-
-        /// <summary>
-        /// Reads a BSON symbol from the reader.
-        /// </summary>
-        /// <returns>A string.</returns>
-        public override string ReadSymbol()
-        {
-            if (Disposed) { ThrowObjectDisposedException(); }
-            VerifyBsonType("ReadSymbol", BsonType.Symbol);
-            State = GetNextState();
-            return _bsonStream.ReadString(Settings.Encoding);
-        }
-
-        /// <summary>
-        /// Reads a BSON timestamp from the reader.
-        /// </summary>
-        /// <returns>The combined timestamp/increment.</returns>
-        public override long ReadTimestamp()
-        {
-            if (Disposed) { ThrowObjectDisposedException(); }
-            VerifyBsonType("ReadTimestamp", BsonType.Timestamp);
-            State = GetNextState();
-            return _bsonStream.ReadInt64();
-        }
-
-        /// <summary>
-        /// Reads a BSON undefined from the reader.
-        /// </summary>
-        public override void ReadUndefined()
-        {
-            if (Disposed) { ThrowObjectDisposedException(); }
-            VerifyBsonType("ReadUndefined", BsonType.Undefined);
-            State = GetNextState();
-        }
-
-        /// <summary>
-        /// Returns the reader to previously bookmarked position and state.
-        /// </summary>
-        /// <param name="bookmark">The bookmark.</param>
-        public override void ReturnToBookmark(BsonReaderBookmark bookmark)
-        {
-            var binaryReaderBookmark = (BsonBinaryReaderBookmark)bookmark;
-            State = binaryReaderBookmark.State;
-            CurrentBsonType = binaryReaderBookmark.CurrentBsonType;
-            CurrentName = binaryReaderBookmark.CurrentName;
-            _context = binaryReaderBookmark.CloneContext();
-            _bsonStream.Position = binaryReaderBookmark.Position;
-        }
-
-        /// <summary>
-        /// Skips the name (reader must be positioned on a name).
-        /// </summary>
-        public override void SkipName()
-        {
-            if (Disposed) { ThrowObjectDisposedException(); }
-            if (State != BsonReaderState.Name)
-            {
-                ThrowInvalidState("SkipName", BsonReaderState.Name);
-            }
-
-            _bsonStream.SkipCString();
-            CurrentName = null;
-            State = BsonReaderState.Value;
-
-            if (_context.ContextType == ContextType.Document)
-            {
-                _context.CurrentElementName = CurrentName;
-            }
-        }
-
-        /// <summary>
-        /// Skips the value (reader must be positioned on a value).
-        /// </summary>
-        public override void SkipValue()
-        {
-            if (Disposed) { ThrowObjectDisposedException(); }
-            if (State != BsonReaderState.Value)
-            {
-                ThrowInvalidState("SkipValue", BsonReaderState.Value);
-            }
-
-            int skip;
-            switch (CurrentBsonType)
-            {
-                case BsonType.Array: skip = ReadSize() - 4; break;
-                case BsonType.Binary: skip = ReadSize() + 1; break;
-                case BsonType.Boolean: skip = 1; break;
-                case BsonType.DateTime: skip = 8; break;
-                case BsonType.Document: skip = ReadSize() - 4; break;
-                case BsonType.Decimal128: skip = 16; break;
-                case BsonType.Double: skip = 8; break;
-                case BsonType.Int32: skip = 4; break;
-                case BsonType.Int64: skip = 8; break;
-                case BsonType.JavaScript: skip = ReadSize(); break;
-                case BsonType.JavaScriptWithScope: skip = ReadSize() - 4; break;
-                case BsonType.MaxKey: skip = 0; break;
-                case BsonType.MinKey: skip = 0; break;
-                case BsonType.Null: skip = 0; break;
-                case BsonType.ObjectId: skip = 12; break;
-                case BsonType.RegularExpression: _bsonStream.SkipCString(); _bsonStream.SkipCString(); skip = 0; break;
-                case BsonType.String: skip = ReadSize(); break;
-                case BsonType.Symbol: skip = ReadSize(); break;
-                case BsonType.Timestamp: skip = 8; break;
-                case BsonType.Undefined: skip = 0; break;
-                default: throw new BsonInternalException("Unexpected BsonType.");
-            }
-            _bsonStream.Seek(skip, SeekOrigin.Current);
-
-            State = BsonReaderState.Type;
-        }
-
-        // protected methods
-        /// <summary>
-        /// Disposes of any resources used by the reader.
-        /// </summary>
-        /// <param name="disposing">True if called from Dispose.</param>
-        protected override void Dispose(bool disposing)
-        {
-            // don't Dispose the _stream because we don't own it
-            if (disposing)
-            {
-                try
-                {
-                    Close();
-                }
-                catch { } // ignore exceptions
-            }
-            base.Dispose(disposing);
-        }
-
-        // private methods
-        private string GenerateDottedElementName()
-        {
-            string elementName;
-            if (_context.ContextType == ContextType.Document)
-            {
-                try
-                {
-                    elementName = _bsonStream.ReadCString(Utf8Encodings.Lenient);
-                }
-                catch
-                {
-                    elementName = "?"; // ignore exception
-                }
-            }
-            else if (_context.ContextType == ContextType.Array)
-            {
-                elementName = _context.CurrentArrayIndex.ToString(NumberFormatInfo.InvariantInfo);
-            }
-            else
-            {
-                elementName = "?";
-            }
-
-            return GenerateDottedElementName(_context.ParentContext, elementName);
-        }
-
-        private string GenerateDottedElementName(BsonBinaryReaderContext context, string elementName)
-        {
-            if (context.ContextType == ContextType.Document)
-            {
-                return GenerateDottedElementName(context.ParentContext, (context.CurrentElementName ?? "?") + "." + elementName);
-            }
-            else if (context.ContextType == ContextType.Array)
-            {
-                var indexElementName = context.CurrentArrayIndex.ToString(NumberFormatInfo.InvariantInfo);
-                return GenerateDottedElementName(context.ParentContext, indexElementName + "." + elementName);
-            }
-            else if (context.ParentContext != null)
-            {
-                return GenerateDottedElementName(context.ParentContext, "?." + elementName);
-            }
-            else
-            {
-                return elementName;
-            }
-        }
-
-        private BsonReaderState GetNextState()
-        {
-            switch (_context.ContextType)
-            {
-                case ContextType.Array:
-                case ContextType.Document:
-                case ContextType.ScopeDocument:
-                    return BsonReaderState.Type;
-                case ContextType.TopLevel:
-                    return BsonReaderState.Initial;
-                default:
-                    throw new BsonInternalException("Unexpected ContextType.");
-            }
-        }
-
-        private int ReadSize()
-        {
-            int size = _bsonStream.ReadInt32();
-            if (size < 0)
-            {
-                var message = string.Format("Size {0} is not valid because it is negative.", size);
-                throw new FormatException(message);
-            }
-            if (size > Settings.MaxDocumentSize)
-            {
-                var message = string.Format("Size {0} is not valid because it is larger than MaxDocumentSize {1}.", size, Settings.MaxDocumentSize);
-                throw new FormatException(message);
-            }
-            return size;
-        }
-    }
-}

+ 0 - 11
Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/IO/BsonBinaryReader.cs.meta

@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: e92ef5ee77130ea449236dc11c39e612
-MonoImporter:
-  externalObjects: {}
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 52
Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/IO/BsonBinaryReaderBookmark.cs

@@ -1,52 +0,0 @@
-/* Copyright 2010-present MongoDB Inc.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-namespace MongoDB.Bson.IO
-{
-    /// <summary>
-    /// Represents a bookmark that can be used to return a reader to the current position and state.
-    /// </summary>
-    public class BsonBinaryReaderBookmark : BsonReaderBookmark
-    {
-        // private fields
-        private BsonBinaryReaderContext _context;
-        private long _position;
-
-        // constructors
-        internal BsonBinaryReaderBookmark(
-            BsonReaderState state,
-            BsonType currentBsonType,
-            string currentName,
-            BsonBinaryReaderContext context,
-            long position)
-            : base(state, currentBsonType, currentName)
-        {
-            _context = context.Clone();
-            _position = position;
-        }
-
-        // internal properties
-        internal long Position
-        {
-            get { return _position; }
-        }
-
-        // internal methods
-        internal BsonBinaryReaderContext CloneContext()
-        {
-            return _context.Clone();
-        }
-    }
-}

+ 0 - 11
Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/IO/BsonBinaryReaderBookmark.cs.meta

@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 182e38560eb7b424dabf87af33c04986
-MonoImporter:
-  externalObjects: {}
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 87
Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/IO/BsonBinaryReaderContext.cs

@@ -1,87 +0,0 @@
-/* Copyright 2010-present MongoDB Inc.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-using System;
-
-namespace MongoDB.Bson.IO
-{
-    internal class BsonBinaryReaderContext
-    {
-        // private fields
-        private readonly BsonBinaryReaderContext _parentContext;
-        private readonly ContextType _contextType;
-        private readonly long _startPosition;
-        private readonly long _size;
-        private string _currentElementName;
-        private int _currentArrayIndex = -1;
-
-        // constructors
-        internal BsonBinaryReaderContext(
-            BsonBinaryReaderContext parentContext,
-            ContextType contextType,
-            long startPosition,
-            long size)
-        {
-            _parentContext = parentContext;
-            _contextType = contextType;
-            _startPosition = startPosition;
-            _size = size;
-        }
-
-        // public properties
-        public ContextType ContextType
-        {
-            get { return _contextType; }
-        }
-
-        public int CurrentArrayIndex
-        {
-            get { return _currentArrayIndex; }
-            set { _currentArrayIndex = value; }
-        }
-
-        public string CurrentElementName
-        {
-            get { return _currentElementName; }
-            set { _currentElementName = value; }
-        }
-
-        public BsonBinaryReaderContext ParentContext
-        {
-            get { return _parentContext; }
-        }
-
-        // public methods
-        /// <summary>
-        /// Creates a clone of the context.
-        /// </summary>
-        /// <returns>A clone of the context.</returns>
-        public BsonBinaryReaderContext Clone()
-        {
-            return new BsonBinaryReaderContext(_parentContext, _contextType, _startPosition, _size);
-        }
-
-        public BsonBinaryReaderContext PopContext(long position)
-        {
-            var actualSize = position - _startPosition;
-            if (actualSize != _size)
-            {
-                var message = string.Format("Expected size to be {0}, not {1}.", _size, actualSize);
-                throw new FormatException(message);
-            }
-            return _parentContext;
-        }
-    }
-}

+ 0 - 11
Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/IO/BsonBinaryReaderContext.cs.meta

@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: ca12701f18cba7e4b9430157923de6b8
-MonoImporter:
-  externalObjects: {}
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 152
Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/IO/BsonBinaryReaderSettings.cs

@@ -1,152 +0,0 @@
-/* Copyright 2010-present MongoDB Inc.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-using System;
-using System.Text;
-
-namespace MongoDB.Bson.IO
-{
-    /// <summary>
-    /// Represents settings for a BsonBinaryReader.
-    /// </summary>
-    [Serializable]
-    public class BsonBinaryReaderSettings : BsonReaderSettings
-    {
-        // private static fields
-        private static BsonBinaryReaderSettings __defaults = null; // delay creation to pick up the latest default values
-
-        // private fields
-        private UTF8Encoding _encoding = Utf8Encodings.Strict;
-        private bool _fixOldBinarySubTypeOnInput = true;
-        private bool _fixOldDateTimeMaxValueOnInput = true;
-        private int _maxDocumentSize = BsonDefaults.MaxDocumentSize;
-
-        // constructors
-        /// <summary>
-        /// Initializes a new instance of the BsonBinaryReaderSettings class.
-        /// </summary>
-        public BsonBinaryReaderSettings()
-        {
-        }
-
-        // public static properties
-        /// <summary>
-        /// Gets or sets the default settings for a BsonBinaryReader.
-        /// </summary>
-        public static BsonBinaryReaderSettings Defaults
-        {
-            get
-            {
-                if (__defaults == null)
-                {
-                    __defaults = new BsonBinaryReaderSettings();
-                }
-                return __defaults;
-            }
-            set { __defaults = value; }
-        }
-
-        // public properties
-        /// <summary>
-        /// Gets or sets the Encoding.
-        /// </summary>
-        public UTF8Encoding Encoding
-        {
-            get { return _encoding; }
-            set
-            {
-                if (value == null)
-                {
-                    throw new ArgumentNullException("value");
-                }
-                if (IsFrozen) { throw new InvalidOperationException("BsonBinaryReaderSettings is frozen."); }
-                _encoding = value;
-            }
-        }
-
-        /// <summary>
-        /// Gets or sets whether to fix occurrences of the old binary subtype on input. 
-        /// </summary>
-        public bool FixOldBinarySubTypeOnInput
-        {
-            get { return _fixOldBinarySubTypeOnInput; }
-            set
-            {
-                if (IsFrozen) { throw new InvalidOperationException("BsonBinaryReaderSettings is frozen."); }
-                _fixOldBinarySubTypeOnInput = value;
-            }
-        }
-
-        /// <summary>
-        /// Gets or sets whether to fix occurrences of the old representation of DateTime.MaxValue on input. 
-        /// </summary>
-        public bool FixOldDateTimeMaxValueOnInput
-        {
-            get { return _fixOldDateTimeMaxValueOnInput; }
-            set
-            {
-                if (IsFrozen) { throw new InvalidOperationException("BsonBinaryReaderSettings is frozen."); }
-                _fixOldDateTimeMaxValueOnInput = value;
-            }
-        }
-
-        /// <summary>
-        /// Gets or sets the max document size.
-        /// </summary>
-        public int MaxDocumentSize
-        {
-            get { return _maxDocumentSize; }
-            set
-            {
-                if (IsFrozen) { throw new InvalidOperationException("BsonBinaryReaderSettings is frozen."); }
-                _maxDocumentSize = value;
-            }
-        }
-
-        // public methods
-        /// <summary>
-        /// Creates a clone of the settings.
-        /// </summary>
-        /// <returns>A clone of the settings.</returns>
-        public new BsonBinaryReaderSettings Clone()
-        {
-            return (BsonBinaryReaderSettings)CloneImplementation();
-        }
-
-        // protected methods
-        /// <summary>
-        /// Creates a clone of the settings.
-        /// </summary>
-        /// <returns>A clone of the settings.</returns>
-        protected override BsonReaderSettings CloneImplementation()
-        {
-            var clone = new BsonBinaryReaderSettings
-            {
-                Encoding = _encoding,
-                FixOldBinarySubTypeOnInput = _fixOldBinarySubTypeOnInput,
-                FixOldDateTimeMaxValueOnInput = _fixOldDateTimeMaxValueOnInput,
-                MaxDocumentSize = _maxDocumentSize
-            };
-#pragma warning disable 618
-            if (BsonDefaults.GuidRepresentationMode == GuidRepresentationMode.V2)
-            {
-                clone.GuidRepresentation = GuidRepresentation;
-            }
-#pragma warning restore 618
-
-            return clone;
-        }
-    }
-}

+ 0 - 11
Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/IO/BsonBinaryReaderSettings.cs.meta

@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 8a1eece43c1b8a24a9050b39464decdf
-MonoImporter:
-  externalObjects: {}
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 778
Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/IO/BsonBinaryWriter.cs

@@ -1,778 +0,0 @@
-/* Copyright 2010-present MongoDB Inc.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-using System;
-using System.Collections.Generic;
-using System.IO;
-
-namespace MongoDB.Bson.IO
-{
-    /// <summary>
-    /// Represents a BSON writer to a BSON Stream.
-    /// </summary>
-    public class BsonBinaryWriter : BsonWriter
-    {
-        // private fields
-        private readonly Stream _baseStream;
-        private readonly BsonStream _bsonStream;
-        private BsonBinaryWriterContext _context;
-
-        // constructors
-        /// <summary>
-        /// Initializes a new instance of the BsonBinaryWriter class.
-        /// </summary>
-        /// <param name="stream">A stream. The BsonBinaryWriter does not own the stream and will not Dispose it.</param>
-        public BsonBinaryWriter(Stream stream)
-            : this(stream, BsonBinaryWriterSettings.Defaults)
-        {
-        }
-
-        /// <summary>
-        /// Initializes a new instance of the BsonBinaryWriter class.
-        /// </summary>
-        /// <param name="stream">A stream. The BsonBinaryWriter does not own the stream and will not Dispose it.</param>
-        /// <param name="settings">The BsonBinaryWriter settings.</param>
-        public BsonBinaryWriter(Stream stream, BsonBinaryWriterSettings settings)
-            : base(settings)
-        {
-            if (stream == null)
-            {
-                throw new ArgumentNullException("stream");
-            }
-            if (!stream.CanSeek)
-            {
-                throw new ArgumentException("The stream must be capable of seeking.", "stream");
-            }
-
-            _baseStream = stream;
-            _bsonStream = (stream as BsonStream) ?? new BsonStreamAdapter(stream);
-
-            _context = null;
-            State = BsonWriterState.Initial;
-        }
-
-        // public properties
-        /// <summary>
-        /// Gets the base stream.
-        /// </summary>
-        /// <value>
-        /// The base stream.
-        /// </value>
-        public Stream BaseStream
-        {
-            get { return _baseStream; }
-        }
-
-        /// <summary>
-        /// Gets the BSON stream.
-        /// </summary>
-        /// <value>
-        /// The BSON stream.
-        /// </value>
-        public BsonStream BsonStream
-        {
-            get { return _bsonStream; }
-        }
-
-        /// <inheritdoc />
-        public override long Position
-        {
-            get { return _baseStream.Position; }
-        }
-
-        /// <summary>
-        /// Gets the settings of the writer.
-        /// </summary>
-        public new BsonBinaryWriterSettings Settings
-        {
-            get { return (BsonBinaryWriterSettings)base.Settings; }
-        }
-
-        // public methods
-        /// <summary>
-        /// Closes the writer. Also closes the base stream.
-        /// </summary>
-        public override void Close()
-        {
-            // Close can be called on Disposed objects
-            if (State != BsonWriterState.Closed)
-            {
-                if (State == BsonWriterState.Done)
-                {
-                    Flush();
-                }
-                _context = null;
-                State = BsonWriterState.Closed;
-            }
-        }
-
-        /// <summary>
-        /// Flushes any pending data to the output destination.
-        /// </summary>
-        public override void Flush()
-        {
-            if (Disposed) { throw new ObjectDisposedException("BsonBinaryWriter"); }
-            if (State == BsonWriterState.Closed)
-            {
-                throw new InvalidOperationException("Flush called on closed BsonWriter.");
-            }
-            if (State != BsonWriterState.Done)
-            {
-                throw new InvalidOperationException("Flush called before BsonBinaryWriter was finished writing to buffer.");
-            }
-            _bsonStream.Flush();
-        }
-
-        /// <summary>
-        /// Pops the max document size stack, restoring the previous max document size.
-        /// </summary>
-        [Obsolete("Use PopSettings instead.")]
-        public void PopMaxDocumentSize()
-        {
-            PopSettings();
-        }
-
-        /// <summary>
-        /// Pushes a new max document size onto the max document size stack.
-        /// </summary>
-        /// <param name="maxDocumentSize">The maximum size of the document.</param>
-        [Obsolete("Use PushSettings instead.")]
-        public void PushMaxDocumentSize(int maxDocumentSize)
-        {
-            PushSettings(s => ((BsonBinaryWriterSettings)s).MaxDocumentSize = maxDocumentSize);
-        }
-
-#pragma warning disable 618 // about obsolete BsonBinarySubType.OldBinary
-        /// <summary>
-        /// Writes BSON binary data to the writer.
-        /// </summary>
-        /// <param name="binaryData">The binary data.</param>
-        public override void WriteBinaryData(BsonBinaryData binaryData)
-        {
-            if (Disposed) { throw new ObjectDisposedException("BsonBinaryWriter"); }
-            if (State != BsonWriterState.Value)
-            {
-                ThrowInvalidState("WriteBinaryData", BsonWriterState.Value);
-            }
-
-            var bytes = binaryData.Bytes;
-            var subType = binaryData.SubType;
-            switch (subType)
-            {
-                case BsonBinarySubType.OldBinary:
-                    if (Settings.FixOldBinarySubTypeOnOutput)
-                    {
-                        subType = BsonBinarySubType.Binary; // replace obsolete OldBinary with new Binary sub type
-                    }
-                    break;
-                case BsonBinarySubType.UuidLegacy:
-                case BsonBinarySubType.UuidStandard:
-                    if (BsonDefaults.GuidRepresentationMode == GuidRepresentationMode.V2)
-                    {
-                        if (Settings.GuidRepresentation != GuidRepresentation.Unspecified)
-                        {
-                            var expectedSubType = GuidConverter.GetSubType(Settings.GuidRepresentation);
-                            if (subType != expectedSubType)
-                            {
-                                var message = string.Format(
-                                    "The GuidRepresentation for the writer is {0}, which requires the subType argument to be {1}, not {2}.",
-                                    Settings.GuidRepresentation, expectedSubType, subType);
-                                throw new BsonSerializationException(message);
-                            }
-                            var guidRepresentation = binaryData.GuidRepresentation;
-                            if (guidRepresentation != Settings.GuidRepresentation)
-                            {
-                                var message = string.Format(
-                                    "The GuidRepresentation for the writer is {0}, which requires the the guidRepresentation argument to also be {0}, not {1}.",
-                                    Settings.GuidRepresentation, guidRepresentation);
-                                throw new BsonSerializationException(message);
-                            }
-                        }
-                    }
-                    break;
-            }
-
-            _bsonStream.WriteBsonType(BsonType.Binary);
-            WriteNameHelper();
-            if (subType == BsonBinarySubType.OldBinary)
-            {
-                // sub type OldBinary has two sizes (for historical reasons)
-                _bsonStream.WriteInt32(bytes.Length + 4);
-                _bsonStream.WriteBinarySubType(subType);
-                _bsonStream.WriteInt32(bytes.Length);
-            }
-            else
-            {
-                _bsonStream.WriteInt32(bytes.Length);
-                _bsonStream.WriteBinarySubType(subType);
-            }
-            _bsonStream.WriteBytes(bytes, 0, bytes.Length);
-
-            State = GetNextState();
-        }
-#pragma warning restore 618
-
-        /// <summary>
-        /// Writes a BSON Boolean to the writer.
-        /// </summary>
-        /// <param name="value">The Boolean value.</param>
-        public override void WriteBoolean(bool value)
-        {
-            if (Disposed) { throw new ObjectDisposedException("BsonBinaryWriter"); }
-            if (State != BsonWriterState.Value)
-            {
-                ThrowInvalidState("WriteBoolean", BsonWriterState.Value);
-            }
-
-            _bsonStream.WriteBsonType(BsonType.Boolean);
-            WriteNameHelper();
-            _bsonStream.WriteBoolean(value);
-
-            State = GetNextState();
-        }
-
-        /// <summary>
-        /// Writes BSON binary data to the writer.
-        /// </summary>
-        /// <param name="bytes">The bytes.</param>
-        public override void WriteBytes(byte[] bytes)
-        {
-            if (Disposed) { throw new ObjectDisposedException("BsonBinaryWriter"); }
-            if (State != BsonWriterState.Value)
-            {
-                ThrowInvalidState("WriteBytes", BsonWriterState.Value);
-            }
-
-            _bsonStream.WriteBsonType(BsonType.Binary);
-            WriteNameHelper();
-            _bsonStream.WriteInt32(bytes.Length);
-            _bsonStream.WriteBinarySubType(BsonBinarySubType.Binary);
-            _bsonStream.WriteBytes(bytes, 0, bytes.Length);
-
-            State = GetNextState();
-        }
-
-        /// <summary>
-        /// Writes a BSON DateTime to the writer.
-        /// </summary>
-        /// <param name="value">The number of milliseconds since the Unix epoch.</param>
-        public override void WriteDateTime(long value)
-        {
-            if (Disposed) { throw new ObjectDisposedException("BsonBinaryWriter"); }
-            if (State != BsonWriterState.Value)
-            {
-                ThrowInvalidState("WriteDateTime", BsonWriterState.Value);
-            }
-
-            _bsonStream.WriteBsonType(BsonType.DateTime);
-            WriteNameHelper();
-            _bsonStream.WriteInt64(value);
-
-            State = GetNextState();
-        }
-
-        /// <inheritdoc />
-        public override void WriteDecimal128(Decimal128 value)
-        {
-            if (Disposed) { throw new ObjectDisposedException("BsonBinaryWriter"); }
-            if (State != BsonWriterState.Value)
-            {
-                ThrowInvalidState(nameof(WriteDecimal128), BsonWriterState.Value);
-            }
-
-            _bsonStream.WriteBsonType(BsonType.Decimal128);
-            WriteNameHelper();
-            _bsonStream.WriteDecimal128(value);
-
-            State = GetNextState();
-        }
-
-        /// <summary>
-        /// Writes a BSON Double to the writer.
-        /// </summary>
-        /// <param name="value">The Double value.</param>
-        public override void WriteDouble(double value)
-        {
-            if (Disposed) { throw new ObjectDisposedException("BsonBinaryWriter"); }
-            if (State != BsonWriterState.Value)
-            {
-                ThrowInvalidState("WriteDouble", BsonWriterState.Value);
-            }
-
-            _bsonStream.WriteBsonType(BsonType.Double);
-            WriteNameHelper();
-            _bsonStream.WriteDouble(value);
-
-            State = GetNextState();
-        }
-
-        /// <summary>
-        /// Writes the end of a BSON array to the writer.
-        /// </summary>
-        public override void WriteEndArray()
-        {
-            if (Disposed) { throw new ObjectDisposedException("BsonBinaryWriter"); }
-            if (State != BsonWriterState.Value)
-            {
-                ThrowInvalidState("WriteEndArray", BsonWriterState.Value);
-            }
-            if (_context.ContextType != ContextType.Array)
-            {
-                ThrowInvalidContextType("WriteEndArray", _context.ContextType, ContextType.Array);
-            }
-
-            base.WriteEndArray();
-            _bsonStream.WriteByte(0);
-            BackpatchSize(); // size of document
-
-            _context = _context.ParentContext;
-            State = GetNextState();
-        }
-
-        /// <summary>
-        /// Writes the end of a BSON document to the writer.
-        /// </summary>
-        public override void WriteEndDocument()
-        {
-            if (Disposed) { throw new ObjectDisposedException("BsonBinaryWriter"); }
-            if (State != BsonWriterState.Name)
-            {
-                ThrowInvalidState("WriteEndDocument", BsonWriterState.Name);
-            }
-            if (_context.ContextType != ContextType.Document && _context.ContextType != ContextType.ScopeDocument)
-            {
-                ThrowInvalidContextType("WriteEndDocument", _context.ContextType, ContextType.Document, ContextType.ScopeDocument);
-            }
-
-            base.WriteEndDocument();
-            _bsonStream.WriteByte(0);
-            BackpatchSize(); // size of document
-
-            _context = _context.ParentContext;
-            if (_context == null)
-            {
-                State = BsonWriterState.Done;
-            }
-            else
-            {
-                if (_context.ContextType == ContextType.JavaScriptWithScope)
-                {
-                    BackpatchSize(); // size of the JavaScript with scope value
-                    _context = _context.ParentContext;
-                }
-                State = GetNextState();
-            }
-        }
-
-        /// <summary>
-        /// Writes a BSON Int32 to the writer.
-        /// </summary>
-        /// <param name="value">The Int32 value.</param>
-        public override void WriteInt32(int value)
-        {
-            if (Disposed) { throw new ObjectDisposedException("BsonBinaryWriter"); }
-            if (State != BsonWriterState.Value)
-            {
-                ThrowInvalidState("WriteInt32", BsonWriterState.Value);
-            }
-
-            _bsonStream.WriteBsonType(BsonType.Int32);
-            WriteNameHelper();
-            _bsonStream.WriteInt32(value);
-
-            State = GetNextState();
-        }
-
-        /// <summary>
-        /// Writes a BSON Int64 to the writer.
-        /// </summary>
-        /// <param name="value">The Int64 value.</param>
-        public override void WriteInt64(long value)
-        {
-            if (Disposed) { throw new ObjectDisposedException("BsonBinaryWriter"); }
-            if (State != BsonWriterState.Value)
-            {
-                ThrowInvalidState("WriteInt64", BsonWriterState.Value);
-            }
-
-            _bsonStream.WriteBsonType(BsonType.Int64);
-            WriteNameHelper();
-            _bsonStream.WriteInt64(value);
-
-            State = GetNextState();
-        }
-
-        /// <summary>
-        /// Writes a BSON JavaScript to the writer.
-        /// </summary>
-        /// <param name="code">The JavaScript code.</param>
-        public override void WriteJavaScript(string code)
-        {
-            if (Disposed) { throw new ObjectDisposedException("BsonBinaryWriter"); }
-            if (State != BsonWriterState.Value)
-            {
-                ThrowInvalidState("WriteJavaScript", BsonWriterState.Value);
-            }
-
-            _bsonStream.WriteBsonType(BsonType.JavaScript);
-            WriteNameHelper();
-            _bsonStream.WriteString(code, Settings.Encoding);
-
-            State = GetNextState();
-        }
-
-        /// <summary>
-        /// Writes a BSON JavaScript to the writer (call WriteStartDocument to start writing the scope).
-        /// </summary>
-        /// <param name="code">The JavaScript code.</param>
-        public override void WriteJavaScriptWithScope(string code)
-        {
-            if (Disposed) { throw new ObjectDisposedException("BsonBinaryWriter"); }
-            if (State != BsonWriterState.Value)
-            {
-                ThrowInvalidState("WriteJavaScriptWithScope", BsonWriterState.Value);
-            }
-
-            _bsonStream.WriteBsonType(BsonType.JavaScriptWithScope);
-            WriteNameHelper();
-            _context = new BsonBinaryWriterContext(_context, ContextType.JavaScriptWithScope, _bsonStream.Position);
-            _bsonStream.WriteInt32(0); // reserve space for size of JavaScript with scope value
-            _bsonStream.WriteString(code, Settings.Encoding);
-
-            State = BsonWriterState.ScopeDocument;
-        }
-
-        /// <summary>
-        /// Writes a BSON MaxKey to the writer.
-        /// </summary>
-        public override void WriteMaxKey()
-        {
-            if (Disposed) { throw new ObjectDisposedException("BsonBinaryWriter"); }
-            if (State != BsonWriterState.Value)
-            {
-                ThrowInvalidState("WriteMaxKey", BsonWriterState.Value);
-            }
-
-            _bsonStream.WriteBsonType(BsonType.MaxKey);
-            WriteNameHelper();
-
-            State = GetNextState();
-        }
-
-        /// <summary>
-        /// Writes a BSON MinKey to the writer.
-        /// </summary>
-        public override void WriteMinKey()
-        {
-            if (Disposed) { throw new ObjectDisposedException("BsonBinaryWriter"); }
-            if (State != BsonWriterState.Value)
-            {
-                ThrowInvalidState("WriteMinKey", BsonWriterState.Value);
-            }
-
-            _bsonStream.WriteBsonType(BsonType.MinKey);
-            WriteNameHelper();
-
-            State = GetNextState();
-        }
-
-        /// <summary>
-        /// Writes a BSON null to the writer.
-        /// </summary>
-        public override void WriteNull()
-        {
-            if (Disposed) { throw new ObjectDisposedException("BsonBinaryWriter"); }
-            if (State != BsonWriterState.Value)
-            {
-                ThrowInvalidState("WriteNull", BsonWriterState.Value);
-            }
-
-            _bsonStream.WriteBsonType(BsonType.Null);
-            WriteNameHelper();
-
-            State = GetNextState();
-        }
-
-        /// <summary>
-        /// Writes a BSON ObjectId to the writer.
-        /// </summary>
-        /// <param name="objectId">The ObjectId.</param>
-        public override void WriteObjectId(ObjectId objectId)
-        {
-            if (Disposed) { throw new ObjectDisposedException("BsonBinaryWriter"); }
-            if (State != BsonWriterState.Value)
-            {
-                ThrowInvalidState("WriteObjectId", BsonWriterState.Value);
-            }
-
-            _bsonStream.WriteBsonType(BsonType.ObjectId);
-            WriteNameHelper();
-            _bsonStream.WriteObjectId(objectId);
-
-            State = GetNextState();
-        }
-
-        /// <summary>
-        /// Writes a raw BSON array.
-        /// </summary>
-        /// <param name="slice">The byte buffer containing the raw BSON array.</param>
-        public override void WriteRawBsonArray(IByteBuffer slice)
-        {
-            if (Disposed) { throw new ObjectDisposedException("BsonBinaryWriter"); }
-            if (State != BsonWriterState.Value)
-            {
-                ThrowInvalidState("WriteRawBsonArray", BsonWriterState.Value);
-            }
-
-            _bsonStream.WriteBsonType(BsonType.Array);
-            WriteNameHelper();
-            _bsonStream.WriteSlice(slice); // assumes slice is a valid raw BSON array
-
-            State = GetNextState();
-        }
-
-        /// <summary>
-        /// Writes a raw BSON document.
-        /// </summary>
-        /// <param name="slice">The byte buffer containing the raw BSON document.</param>
-        public override void WriteRawBsonDocument(IByteBuffer slice)
-        {
-            if (Disposed) { throw new ObjectDisposedException("BsonBinaryWriter"); }
-            if (State != BsonWriterState.Initial && State != BsonWriterState.Value && State != BsonWriterState.ScopeDocument && State != BsonWriterState.Done)
-            {
-                ThrowInvalidState("WriteRawBsonDocument", BsonWriterState.Initial, BsonWriterState.Value, BsonWriterState.ScopeDocument, BsonWriterState.Done);
-            }
-
-            if (State == BsonWriterState.Value)
-            {
-                _bsonStream.WriteBsonType(BsonType.Document);
-                WriteNameHelper();
-            }
-            _bsonStream.WriteSlice(slice); // assumes byteBuffer is a valid raw BSON document
-
-            if (_context == null)
-            {
-                State = BsonWriterState.Done;
-            }
-            else
-            {
-                if (_context.ContextType == ContextType.JavaScriptWithScope)
-                {
-                    BackpatchSize(); // size of the JavaScript with scope value
-                    _context = _context.ParentContext;
-                }
-                State = GetNextState();
-            }
-        }
-
-        /// <summary>
-        /// Writes a BSON regular expression to the writer.
-        /// </summary>
-        /// <param name="regex">A BsonRegularExpression.</param>
-        public override void WriteRegularExpression(BsonRegularExpression regex)
-        {
-            if (Disposed) { throw new ObjectDisposedException("BsonBinaryWriter"); }
-            if (State != BsonWriterState.Value)
-            {
-                ThrowInvalidState("WriteRegularExpression", BsonWriterState.Value);
-            }
-
-            _bsonStream.WriteBsonType(BsonType.RegularExpression);
-            WriteNameHelper();
-            _bsonStream.WriteCString(regex.Pattern);
-            _bsonStream.WriteCString(regex.Options);
-
-            State = GetNextState();
-        }
-
-        /// <summary>
-        /// Writes the start of a BSON array to the writer.
-        /// </summary>
-        public override void WriteStartArray()
-        {
-            if (Disposed) { throw new ObjectDisposedException("BsonBinaryWriter"); }
-            if (State != BsonWriterState.Value)
-            {
-                ThrowInvalidState("WriteStartArray", BsonWriterState.Value);
-            }
-
-            base.WriteStartArray();
-            _bsonStream.WriteBsonType(BsonType.Array);
-            WriteNameHelper();
-            _context = new BsonBinaryWriterContext(_context, ContextType.Array, _bsonStream.Position);
-            _bsonStream.WriteInt32(0); // reserve space for size
-
-            State = BsonWriterState.Value;
-        }
-
-        /// <summary>
-        /// Writes the start of a BSON document to the writer.
-        /// </summary>
-        public override void WriteStartDocument()
-        {
-            if (Disposed) { throw new ObjectDisposedException("BsonBinaryWriter"); }
-            if (State != BsonWriterState.Initial && State != BsonWriterState.Value && State != BsonWriterState.ScopeDocument && State != BsonWriterState.Done)
-            {
-                ThrowInvalidState("WriteStartDocument", BsonWriterState.Initial, BsonWriterState.Value, BsonWriterState.ScopeDocument, BsonWriterState.Done);
-            }
-
-            base.WriteStartDocument();
-            if (State == BsonWriterState.Value)
-            {
-                _bsonStream.WriteBsonType(BsonType.Document);
-                WriteNameHelper();
-            }
-            var contextType = (State == BsonWriterState.ScopeDocument) ? ContextType.ScopeDocument : ContextType.Document;
-            _context = new BsonBinaryWriterContext(_context, contextType, _bsonStream.Position);
-            _bsonStream.WriteInt32(0); // reserve space for size
-
-            State = BsonWriterState.Name;
-        }
-
-        /// <summary>
-        /// Writes a BSON String to the writer.
-        /// </summary>
-        /// <param name="value">The String value.</param>
-        public override void WriteString(string value)
-        {
-            if (Disposed) { throw new ObjectDisposedException("BsonBinaryWriter"); }
-            if (State != BsonWriterState.Value)
-            {
-                ThrowInvalidState("WriteString", BsonWriterState.Value);
-            }
-
-            _bsonStream.WriteBsonType(BsonType.String);
-            WriteNameHelper();
-            _bsonStream.WriteString(value, Settings.Encoding);
-
-            State = GetNextState();
-        }
-
-        /// <summary>
-        /// Writes a BSON Symbol to the writer.
-        /// </summary>
-        /// <param name="value">The symbol.</param>
-        public override void WriteSymbol(string value)
-        {
-            if (Disposed) { throw new ObjectDisposedException("BsonBinaryWriter"); }
-            if (State != BsonWriterState.Value)
-            {
-                ThrowInvalidState("WriteSymbol", BsonWriterState.Value);
-            }
-
-            _bsonStream.WriteBsonType(BsonType.Symbol);
-            WriteNameHelper();
-            _bsonStream.WriteString(value, Settings.Encoding);
-
-            State = GetNextState();
-        }
-
-        /// <summary>
-        /// Writes a BSON timestamp to the writer.
-        /// </summary>
-        /// <param name="value">The combined timestamp/increment value.</param>
-        public override void WriteTimestamp(long value)
-        {
-            if (Disposed) { throw new ObjectDisposedException("BsonBinaryWriter"); }
-            if (State != BsonWriterState.Value)
-            {
-                ThrowInvalidState("WriteTimestamp", BsonWriterState.Value);
-            }
-
-            _bsonStream.WriteBsonType(BsonType.Timestamp);
-            WriteNameHelper();
-            _bsonStream.WriteInt64(value);
-
-            State = GetNextState();
-        }
-
-        /// <summary>
-        /// Writes a BSON undefined to the writer.
-        /// </summary>
-        public override void WriteUndefined()
-        {
-            if (Disposed) { throw new ObjectDisposedException("BsonBinaryWriter"); }
-            if (State != BsonWriterState.Value)
-            {
-                ThrowInvalidState("WriteUndefined", BsonWriterState.Value);
-            }
-
-            _bsonStream.WriteBsonType(BsonType.Undefined);
-            WriteNameHelper();
-
-            State = GetNextState();
-        }
-
-        // protected methods
-        /// <summary>
-        /// Disposes of any resources used by the writer.
-        /// </summary>
-        /// <param name="disposing">True if called from Dispose.</param>
-        protected override void Dispose(bool disposing)
-        {
-            if (disposing)
-            {
-                try
-                {
-                    Close();
-                }
-                catch { } // ignore exceptions
-            }
-            base.Dispose(disposing);
-        }
-
-        // private methods
-        private void BackpatchSize()
-        {
-            var size = _bsonStream.Position - _context.StartPosition;
-            if (size > Settings.MaxDocumentSize)
-            {
-                var message = string.Format("Size {0} is larger than MaxDocumentSize {1}.", size, Settings.MaxDocumentSize);
-                throw new FormatException(message);
-            }
-
-            var currentPosition = _bsonStream.Position;
-            _bsonStream.Position = _context.StartPosition;
-            _bsonStream.WriteInt32((int)size);
-            _bsonStream.Position = currentPosition;
-        }
-
-        private BsonWriterState GetNextState()
-        {
-            if (_context.ContextType == ContextType.Array)
-            {
-                return BsonWriterState.Value;
-            }
-            else
-            {
-                return BsonWriterState.Name;
-            }
-        }
-
-        private void WriteNameHelper()
-        {
-            if (_context.ContextType == ContextType.Array)
-            {
-                var index = _context.Index++;
-                var nameBytes = ArrayElementNameAccelerator.Default.GetElementNameBytes(index);
-                _bsonStream.WriteCStringBytes(nameBytes);
-            }
-            else
-            {
-                _bsonStream.WriteCString(Name);
-            }
-        }
-    }
-}

+ 0 - 11
Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/IO/BsonBinaryWriter.cs.meta

@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 72a40d87835589b4eafdb34b1eea7536
-MonoImporter:
-  externalObjects: {}
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 59
Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/IO/BsonBinaryWriterContext.cs

@@ -1,59 +0,0 @@
-/* Copyright 2010-present MongoDB Inc.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-namespace MongoDB.Bson.IO
-{
-    internal class BsonBinaryWriterContext
-    {
-        // private fields
-        private BsonBinaryWriterContext _parentContext;
-        private ContextType _contextType;
-        private long _startPosition;
-        private int _index; // used when contextType is Array
-
-        // constructors
-        internal BsonBinaryWriterContext(
-            BsonBinaryWriterContext parentContext,
-            ContextType contextType,
-            long startPosition)
-        {
-            _parentContext = parentContext;
-            _contextType = contextType;
-            _startPosition = startPosition;
-        }
-
-        // internal properties
-        internal BsonBinaryWriterContext ParentContext
-        {
-            get { return _parentContext; }
-        }
-
-        internal ContextType ContextType
-        {
-            get { return _contextType; }
-        }
-
-        internal long StartPosition
-        {
-            get { return _startPosition; }
-        }
-
-        internal int Index
-        {
-            get { return _index; }
-            set { _index = value; }
-        }
-    }
-}

+ 0 - 11
Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/IO/BsonBinaryWriterContext.cs.meta

@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: f81bb4a61d9d8e94b8405e48071926f0
-MonoImporter:
-  externalObjects: {}
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 137
Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/IO/BsonBinaryWriterSettings.cs

@@ -1,137 +0,0 @@
-/* Copyright 2010-present MongoDB Inc.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-using System;
-using System.Text;
-
-namespace MongoDB.Bson.IO
-{
-    /// <summary>
-    /// Represents settings for a BsonBinaryWriter.
-    /// </summary>
-    [Serializable]
-    public class BsonBinaryWriterSettings : BsonWriterSettings
-    {
-        // private static fields
-        private static BsonBinaryWriterSettings __defaults = null; // delay creation to pick up the latest default values
-
-        // private fields
-        private UTF8Encoding _encoding = Utf8Encodings.Strict;
-        private bool _fixOldBinarySubTypeOnOutput = true;
-        private int _maxDocumentSize = BsonDefaults.MaxDocumentSize;
-
-        // constructors
-        /// <summary>
-        /// Initializes a new instance of the BsonBinaryWriterSettings class.
-        /// </summary>
-        public BsonBinaryWriterSettings()
-        {
-        }
-
-        // public static properties
-        /// <summary>
-        /// Gets or sets the default BsonBinaryWriter settings.
-        /// </summary>
-        public static BsonBinaryWriterSettings Defaults
-        {
-            get
-            {
-                if (__defaults == null)
-                {
-                    __defaults = new BsonBinaryWriterSettings();
-                }
-                return __defaults;
-            }
-            set { __defaults = value; }
-        }
-
-        // public properties
-        /// <summary>
-        /// Gets or sets the Encoding.
-        /// </summary>
-        public UTF8Encoding Encoding
-        {
-            get { return _encoding; }
-            set
-            {
-                if (value == null)
-                {
-                    throw new ArgumentNullException("value");
-                }
-                if (IsFrozen) { throw new InvalidOperationException("BsonBinaryWriterSettings is frozen."); }
-                _encoding = value;
-            }
-        }
-
-        /// <summary>
-        /// Gets or sets whether to fix the old binary data subtype on output.
-        /// </summary>
-        public bool FixOldBinarySubTypeOnOutput
-        {
-            get { return _fixOldBinarySubTypeOnOutput; }
-            set
-            {
-                if (IsFrozen) { throw new InvalidOperationException("BsonBinaryWriterSettings is frozen."); }
-                _fixOldBinarySubTypeOnOutput = value;
-            }
-        }
-
-        /// <summary>
-        /// Gets or sets the max document size.
-        /// </summary>
-        public int MaxDocumentSize
-        {
-            get { return _maxDocumentSize; }
-            set
-            {
-                if (IsFrozen) { throw new InvalidOperationException("BsonBinaryWriterSettings is frozen."); }
-                _maxDocumentSize = value;
-            }
-        }
-
-        // public methods
-        /// <summary>
-        /// Creates a clone of the settings.
-        /// </summary>
-        /// <returns>A clone of the settings.</returns>
-        public new BsonBinaryWriterSettings Clone()
-        {
-            return (BsonBinaryWriterSettings)CloneImplementation();
-        }
-
-        // protected methods
-        /// <summary>
-        /// Creates a clone of the settings.
-        /// </summary>
-        /// <returns>A clone of the settings.</returns>
-        protected override BsonWriterSettings CloneImplementation()
-        {
-            var clone = new BsonBinaryWriterSettings
-            {
-                Encoding = _encoding,
-                FixOldBinarySubTypeOnOutput = _fixOldBinarySubTypeOnOutput,
-                MaxDocumentSize = _maxDocumentSize,
-                MaxSerializationDepth = MaxSerializationDepth
-            };
-#pragma warning disable 618
-            if (BsonDefaults.GuidRepresentationMode == GuidRepresentationMode.V2)
-            {
-                clone.GuidRepresentation = GuidRepresentation;
-            }
-#pragma warning restore 618
-            return clone;
-        }
-    }
-}

+ 0 - 11
Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/IO/BsonBinaryWriterSettings.cs.meta

@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: fcba6b7129ebe5d49a8476e9b05ed0cd
-MonoImporter:
-  externalObjects: {}
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 259
Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/IO/BsonChunkPool.cs

@@ -1,259 +0,0 @@
-/* Copyright 2010-present MongoDB Inc.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-using System;
-using System.Collections.Generic;
-using System.Threading;
-
-namespace MongoDB.Bson.IO
-{
-    /// <summary>
-    /// Represents a pool of chunks.
-    /// </summary>
-    public sealed class BsonChunkPool : IBsonChunkSource
-    {
-        #region static
-        // static fields
-        private static BsonChunkPool __default = new BsonChunkPool(8192, 64 * 1024); // 512MiB of 64KiB chunks
-
-        // static properties
-        /// <summary>
-        /// Gets or sets the default chunk pool.
-        /// </summary>
-        /// <value>
-        /// The default chunk pool.
-        /// </value>
-        public static BsonChunkPool Default
-        {
-            get { return __default; }
-            set
-            {
-                if (value == null)
-                {
-                    throw new ArgumentNullException("value");
-                }
-                __default = value;
-            }
-        }
-        #endregion
-
-        // private fields
-        private Stack<ReferenceCountedChunk> _chunks = new Stack<ReferenceCountedChunk>();
-        private readonly int _chunkSize;
-        private bool _disposed;
-        private readonly object _lock = new object();
-        private readonly int _maxChunkCount;
-
-        // constructors
-        /// <summary>
-        /// Initializes a new instance of the <see cref="BsonChunkPool"/> class.
-        /// </summary>
-        /// <param name="maxChunkCount">The maximum number of chunks to keep in the pool.</param>
-        /// <param name="chunkSize">The size of each chunk.</param>
-        public BsonChunkPool(int maxChunkCount, int chunkSize)
-        {
-            if (maxChunkCount < 0)
-            {
-                throw new ArgumentOutOfRangeException("maxChunkCount");
-            }
-            if (chunkSize <= 0)
-            {
-                throw new ArgumentOutOfRangeException("chunkSize");
-            }
-
-            _maxChunkCount = maxChunkCount;
-            _chunkSize = chunkSize;
-        }
-
-        // public properties
-        /// <summary>
-        /// Gets the chunk size.
-        /// </summary>
-        /// <value>
-        /// The chunk size.
-        /// </value>
-        public int ChunkSize
-        {
-            get { return _chunkSize; }
-        }
-
-        /// <summary>
-        /// Gets the maximum size of the pool.
-        /// </summary>
-        /// <value>
-        /// The maximum size of the pool.
-        /// </value>
-        public int MaxChunkCount
-        {
-            get { return _maxChunkCount; }
-        }
-
-        /// <summary>
-        /// Gets the size of the pool.
-        /// </summary>
-        /// <value>
-        /// The size of the pool.
-        /// </value>
-        public int ChunkCount
-        {
-            get
-            {
-                lock (_lock)
-                {
-                    return _chunks.Count;
-                }
-            }
-        }
-
-        // public methods
-        /// <inheritdoc/>
-        public void Dispose()
-        {
-            if (!_disposed)
-            {
-                _disposed = true;
-                _chunks = null;
-            }
-        }
-
-        /// <inheritdoc/>
-        public IBsonChunk GetChunk(int requestedSize)
-        {
-            ThrowIfDisposed();
-
-            ReferenceCountedChunk referenceCountedChunk = null;
-            lock (_lock)
-            {
-                if (_chunks.Count > 0)
-                {
-                    referenceCountedChunk = _chunks.Pop();
-                }
-            }
-
-            if (referenceCountedChunk == null)
-            {
-                var chunk = new byte[_chunkSize];
-                referenceCountedChunk = new ReferenceCountedChunk(chunk, this);
-            }
-
-            return new DisposableChunk(referenceCountedChunk);
-        }
-
-        // private methods
-        private void ReleaseChunk(ReferenceCountedChunk chunk)
-        {
-            if (!_disposed)
-            {
-                lock (_lock)
-                {
-                    if (_chunks.Count < _maxChunkCount)
-                    {
-                        _chunks.Push(chunk);
-                    }
-                    // otherwise just let it get garbage collected
-                }
-            }
-        }
-
-        private void ThrowIfDisposed()
-        {
-            if (_disposed)
-            {
-                throw new ObjectDisposedException(GetType().Name);
-            }
-        }
-
-        // nested types
-        private sealed class DisposableChunk : IBsonChunk
-        {
-            // fields
-            private bool _disposed;
-            private readonly ReferenceCountedChunk _referenceCountedChunk;
-
-            // constructors
-            public DisposableChunk(ReferenceCountedChunk referenceCountedChunk)
-            {
-                _referenceCountedChunk = referenceCountedChunk;
-                _referenceCountedChunk.IncrementReferenceCount();
-            }
-
-            // properties
-            public ArraySegment<byte> Bytes
-            {
-                get
-                {
-                    ThrowIfDisposed();
-                    return new ArraySegment<byte>(_referenceCountedChunk.Chunk);
-                }
-            }
-
-            // methods
-            public void Dispose()
-            {
-                if (!_disposed)
-                {
-                    _disposed = true;
-                    _referenceCountedChunk.DecrementReferenceCount();
-                }
-            }
-
-            public IBsonChunk Fork()
-            {
-                ThrowIfDisposed();
-                return new DisposableChunk(_referenceCountedChunk);
-            }
-
-            // private methods
-            private void ThrowIfDisposed()
-            {
-                if (_disposed)
-                {
-                    throw new ObjectDisposedException(GetType().Name);
-                }
-            }
-        }
-
-        private sealed class ReferenceCountedChunk
-        {
-            private byte[] _chunk;
-            private BsonChunkPool _pool;
-            private int _referenceCount;
-
-            public ReferenceCountedChunk(byte[] chunk, BsonChunkPool pool)
-            {
-                _chunk = chunk;
-                _pool = pool;
-            }
-
-            public byte[] Chunk
-            {
-                get { return _chunk; }
-            }
-
-            public void DecrementReferenceCount()
-            {
-                if (Interlocked.Decrement(ref _referenceCount) == 0)
-                {
-                    _pool.ReleaseChunk(this);
-                }
-            }
-
-            public void IncrementReferenceCount()
-            {
-                Interlocked.Increment(ref _referenceCount);
-            }
-        }
-    }
-}

+ 0 - 11
Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/IO/BsonChunkPool.cs.meta

@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: a2ee2ab7343c8354d823b8cff4998499
-MonoImporter:
-  externalObjects: {}
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 562
Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/IO/BsonDocumentReader.cs

@@ -1,562 +0,0 @@
-/* Copyright 2010-present MongoDB Inc.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-using System;
-using System.IO;
-
-namespace MongoDB.Bson.IO
-{
-    /// <summary>
-    /// Represents a BSON reader for a BsonDocument.
-    /// </summary>
-    public class BsonDocumentReader : BsonReader
-    {
-        // private fields
-        private BsonDocumentReaderContext _context;
-        private BsonValue _currentValue;
-
-        // constructors
-        /// <summary>
-        /// Initializes a new instance of the BsonDocumentReader class.
-        /// </summary>
-        /// <param name="document">A BsonDocument.</param>
-        public BsonDocumentReader(BsonDocument document)
-            : this(document, BsonDocumentReaderSettings.Defaults)
-        {
-        }
-
-        /// <summary>
-        /// Initializes a new instance of the BsonDocumentReader class.
-        /// </summary>
-        /// <param name="document">A BsonDocument.</param>
-        /// <param name="settings">The reader settings.</param>
-        public BsonDocumentReader(BsonDocument document, BsonDocumentReaderSettings settings)
-            : base(settings)
-        {
-            if (document == null)
-            {
-                throw new ArgumentNullException("document");
-            }
-
-            _context = new BsonDocumentReaderContext(null, ContextType.TopLevel, document);
-            _currentValue = document;
-        }
-
-        // public methods
-        /// <summary>
-        /// Closes the reader.
-        /// </summary>
-        public override void Close()
-        {
-            // Close can be called on Disposed objects
-            State = BsonReaderState.Closed;
-        }
-
-        /// <summary>
-        /// Gets a bookmark to the reader's current position and state.
-        /// </summary>
-        /// <returns>A bookmark.</returns>
-        public override BsonReaderBookmark GetBookmark()
-        {
-            return new BsonDocumentReaderBookmark(State, CurrentBsonType, CurrentName, _context, _currentValue);
-        }
-
-        /// <summary>
-        /// Determines whether this reader is at end of file.
-        /// </summary>
-        /// <returns>
-        /// Whether this reader is at end of file.
-        /// </returns>
-        public override bool IsAtEndOfFile()
-        {
-            return State == BsonReaderState.Done;
-        }
-
-        /// <summary>
-        /// Reads BSON binary data from the reader.
-        /// </summary>
-        /// <returns>A BsonBinaryData.</returns>
-        public override BsonBinaryData ReadBinaryData()
-        {
-            if (Disposed) { ThrowObjectDisposedException(); }
-            VerifyBsonType("ReadBinaryData", BsonType.Binary);
-
-            State = GetNextState();
-            return _currentValue.AsBsonBinaryData;
-        }
-
-        /// <summary>
-        /// Reads a BSON boolean from the reader.
-        /// </summary>
-        /// <returns>A Boolean.</returns>
-        public override bool ReadBoolean()
-        {
-            if (Disposed) { ThrowObjectDisposedException(); }
-            VerifyBsonType("ReadBoolean", BsonType.Boolean);
-            State = GetNextState();
-            return _currentValue.AsBoolean;
-        }
-
-        /// <summary>
-        /// Reads a BsonType from the reader.
-        /// </summary>
-        /// <returns>A BsonType.</returns>
-        public override BsonType ReadBsonType()
-        {
-            if (Disposed) { ThrowObjectDisposedException(); }
-            if (State == BsonReaderState.Initial || State == BsonReaderState.ScopeDocument)
-            {
-                // there is an implied type of Document for the top level and for scope documents
-                CurrentBsonType = BsonType.Document;
-                State = BsonReaderState.Value;
-                return CurrentBsonType;
-            }
-            if (State != BsonReaderState.Type)
-            {
-                ThrowInvalidState("ReadBsonType", BsonReaderState.Type);
-            }
-
-            switch (_context.ContextType)
-            {
-                case ContextType.Array:
-                    if (!_context.TryGetNextValue(out _currentValue))
-                    {
-                        State = BsonReaderState.EndOfArray;
-                        return BsonType.EndOfDocument;
-                    }
-                    State = BsonReaderState.Value;
-                    break;
-                case ContextType.Document:
-                    BsonElement currentElement;
-                    if (!_context.TryGetNextElement(out currentElement))
-                    {
-                        State = BsonReaderState.EndOfDocument;
-                        return BsonType.EndOfDocument;
-                    }
-                    CurrentName = currentElement.Name;
-                    _currentValue = currentElement.Value;
-                    State = BsonReaderState.Name;
-                    break;
-                default:
-                    throw new BsonInternalException("Invalid ContextType.");
-            }
-
-            CurrentBsonType = _currentValue.BsonType;
-            return CurrentBsonType;
-        }
-
-        /// <summary>
-        /// Reads BSON binary data from the reader.
-        /// </summary>
-        /// <returns>A byte array.</returns>
-#pragma warning disable 618 // about obsolete BsonBinarySubType.OldBinary
-        public override byte[] ReadBytes()
-        {
-            if (Disposed) { ThrowObjectDisposedException(); }
-            VerifyBsonType("ReadBytes", BsonType.Binary);
-
-            State = GetNextState();
-            var binaryData = _currentValue.AsBsonBinaryData;
-
-            var subType = binaryData.SubType;
-            if (subType != BsonBinarySubType.Binary && subType != BsonBinarySubType.OldBinary)
-            {
-                var message = string.Format("ReadBytes requires the binary sub type to be Binary, not {0}.", subType);
-                throw new FormatException(message);
-            }
-
-            return binaryData.Bytes;
-        }
-#pragma warning restore 618
-
-        /// <summary>
-        /// Reads a BSON DateTime from the reader.
-        /// </summary>
-        /// <returns>The number of milliseconds since the Unix epoch.</returns>
-        public override long ReadDateTime()
-        {
-            if (Disposed) { ThrowObjectDisposedException(); }
-            VerifyBsonType("ReadDateTime", BsonType.DateTime);
-            State = GetNextState();
-            return _currentValue.AsBsonDateTime.MillisecondsSinceEpoch;
-        }
-
-        /// <inheritdoc />
-        public override Decimal128 ReadDecimal128()
-        {
-            if (Disposed) { ThrowObjectDisposedException(); }
-            VerifyBsonType(nameof(ReadDecimal128), BsonType.Decimal128);
-            State = GetNextState();
-            return _currentValue.AsDecimal128;
-        }
-
-        /// <summary>
-        /// Reads a BSON Double from the reader.
-        /// </summary>
-        /// <returns>A Double.</returns>
-        public override double ReadDouble()
-        {
-            if (Disposed) { ThrowObjectDisposedException(); }
-            VerifyBsonType("ReadDouble", BsonType.Double);
-            State = GetNextState();
-            return _currentValue.AsDouble;
-        }
-
-        /// <summary>
-        /// Reads the end of a BSON array from the reader.
-        /// </summary>
-        public override void ReadEndArray()
-        {
-            if (Disposed) { ThrowObjectDisposedException(); }
-            if (_context.ContextType != ContextType.Array)
-            {
-                ThrowInvalidContextType("ReadEndArray", _context.ContextType, ContextType.Array);
-            }
-            if (State == BsonReaderState.Type)
-            {
-                ReadBsonType(); // will set state to EndOfArray if at end of array
-            }
-            if (State != BsonReaderState.EndOfArray)
-            {
-                ThrowInvalidState("ReadEndArray", BsonReaderState.EndOfArray);
-            }
-
-            _context = _context.PopContext();
-            switch (_context.ContextType)
-            {
-                case ContextType.Array: State = BsonReaderState.Type; break;
-                case ContextType.Document: State = BsonReaderState.Type; break;
-                case ContextType.TopLevel: State = BsonReaderState.Done; break;
-                default: throw new BsonInternalException("Unexpected ContextType.");
-            }
-        }
-
-        /// <summary>
-        /// Reads the end of a BSON document from the reader.
-        /// </summary>
-        public override void ReadEndDocument()
-        {
-            if (Disposed) { ThrowObjectDisposedException(); }
-            if (_context.ContextType != ContextType.Document && _context.ContextType != ContextType.ScopeDocument)
-            {
-                ThrowInvalidContextType("ReadEndDocument", _context.ContextType, ContextType.Document, ContextType.ScopeDocument);
-            }
-            if (State == BsonReaderState.Type)
-            {
-                ReadBsonType(); // will set state to EndOfDocument if at end of document
-            }
-            if (State != BsonReaderState.EndOfDocument)
-            {
-                ThrowInvalidState("ReadEndDocument", BsonReaderState.EndOfDocument);
-            }
-
-            _context = _context.PopContext();
-            switch (_context.ContextType)
-            {
-                case ContextType.Array: State = BsonReaderState.Type; break;
-                case ContextType.Document: State = BsonReaderState.Type; break;
-                case ContextType.TopLevel: State = BsonReaderState.Done; break;
-                default: throw new BsonInternalException("Unexpected ContextType.");
-            }
-        }
-
-        /// <summary>
-        /// Reads a BSON Int32 from the reader.
-        /// </summary>
-        /// <returns>An Int32.</returns>
-        public override int ReadInt32()
-        {
-            if (Disposed) { ThrowObjectDisposedException(); }
-            VerifyBsonType("ReadInt32", BsonType.Int32);
-            State = GetNextState();
-            return _currentValue.AsInt32;
-        }
-
-        /// <summary>
-        /// Reads a BSON Int64 from the reader.
-        /// </summary>
-        /// <returns>An Int64.</returns>
-        public override long ReadInt64()
-        {
-            if (Disposed) { ThrowObjectDisposedException(); }
-            VerifyBsonType("ReadInt64", BsonType.Int64);
-            State = GetNextState();
-            return _currentValue.AsInt64;
-        }
-
-        /// <summary>
-        /// Reads a BSON JavaScript from the reader.
-        /// </summary>
-        /// <returns>A string.</returns>
-        public override string ReadJavaScript()
-        {
-            if (Disposed) { ThrowObjectDisposedException(); }
-            VerifyBsonType("ReadJavaScript", BsonType.JavaScript);
-            State = GetNextState();
-            return _currentValue.AsBsonJavaScript.Code;
-        }
-
-        /// <summary>
-        /// Reads a BSON JavaScript with scope from the reader (call ReadStartDocument next to read the scope).
-        /// </summary>
-        /// <returns>A string.</returns>
-        public override string ReadJavaScriptWithScope()
-        {
-            if (Disposed) { ThrowObjectDisposedException(); }
-            VerifyBsonType("ReadJavaScriptWithScope", BsonType.JavaScriptWithScope);
-
-            State = BsonReaderState.ScopeDocument;
-            return _currentValue.AsBsonJavaScriptWithScope.Code;
-        }
-
-        /// <summary>
-        /// Reads a BSON MaxKey from the reader.
-        /// </summary>
-        public override void ReadMaxKey()
-        {
-            if (Disposed) { ThrowObjectDisposedException(); }
-            VerifyBsonType("ReadMaxKey", BsonType.MaxKey);
-            State = GetNextState();
-        }
-
-        /// <summary>
-        /// Reads a BSON MinKey from the reader.
-        /// </summary>
-        public override void ReadMinKey()
-        {
-            if (Disposed) { ThrowObjectDisposedException(); }
-            VerifyBsonType("ReadMinKey", BsonType.MinKey);
-            State = GetNextState();
-        }
-
-        /// <summary>
-        /// Reads the name of an element from the reader.
-        /// </summary>
-        /// <param name="nameDecoder">The name decoder.</param>
-        /// <returns>
-        /// The name of the element.
-        /// </returns>
-        public override string ReadName(INameDecoder nameDecoder)
-        {
-            if (nameDecoder == null)
-            {
-                throw new ArgumentNullException("nameDecoder");
-            }
-
-            if (Disposed) { ThrowObjectDisposedException(); }
-            if (State == BsonReaderState.Type)
-            {
-                ReadBsonType();
-            }
-            if (State != BsonReaderState.Name)
-            {
-                ThrowInvalidState("ReadName", BsonReaderState.Name);
-            }
-
-            nameDecoder.Inform(CurrentName);
-            State = BsonReaderState.Value;
-            return CurrentName;
-        }
-
-        /// <summary>
-        /// Reads a BSON null from the reader.
-        /// </summary>
-        public override void ReadNull()
-        {
-            if (Disposed) { ThrowObjectDisposedException(); }
-            VerifyBsonType("ReadNull", BsonType.Null);
-            State = GetNextState();
-        }
-
-        /// <summary>
-        /// Reads a BSON ObjectId from the reader.
-        /// </summary>
-        /// <returns>An ObjectId.</returns>
-        public override ObjectId ReadObjectId()
-        {
-            if (Disposed) { ThrowObjectDisposedException(); }
-            VerifyBsonType("ReadObjectId", BsonType.ObjectId);
-            State = GetNextState();
-            return _currentValue.AsObjectId;
-        }
-
-        /// <summary>
-        /// Reads a BSON regular expression from the reader.
-        /// </summary>
-        /// <returns>A BsonRegularExpression.</returns>
-        public override BsonRegularExpression ReadRegularExpression()
-        {
-            if (Disposed) { ThrowObjectDisposedException(); }
-            VerifyBsonType("ReadRegularExpression", BsonType.RegularExpression);
-            State = GetNextState();
-            return _currentValue.AsBsonRegularExpression;
-        }
-
-        /// <summary>
-        /// Reads the start of a BSON array.
-        /// </summary>
-        public override void ReadStartArray()
-        {
-            if (Disposed) { ThrowObjectDisposedException(); }
-            VerifyBsonType("ReadStartArray", BsonType.Array);
-
-            var array = _currentValue.AsBsonArray;
-            _context = new BsonDocumentReaderContext(_context, ContextType.Array, array);
-            State = BsonReaderState.Type;
-        }
-
-        /// <summary>
-        /// Reads the start of a BSON document.
-        /// </summary>
-        public override void ReadStartDocument()
-        {
-            if (Disposed) { ThrowObjectDisposedException(); }
-            VerifyBsonType("ReadStartDocument", BsonType.Document);
-
-            BsonDocument document;
-            var script = _currentValue as BsonJavaScriptWithScope;
-            if (script != null)
-            {
-                document = script.Scope;
-            }
-            else
-            {
-                document = _currentValue.AsBsonDocument;
-            }
-            _context = new BsonDocumentReaderContext(_context, ContextType.Document, document);
-            State = BsonReaderState.Type;
-        }
-
-        /// <summary>
-        /// Reads a BSON string from the reader.
-        /// </summary>
-        /// <returns>A String.</returns>
-        public override string ReadString()
-        {
-            if (Disposed) { ThrowObjectDisposedException(); }
-            VerifyBsonType("ReadString", BsonType.String);
-            State = GetNextState();
-            return _currentValue.AsString;
-        }
-
-        /// <summary>
-        /// Reads a BSON symbol from the reader.
-        /// </summary>
-        /// <returns>A string.</returns>
-        public override string ReadSymbol()
-        {
-            if (Disposed) { ThrowObjectDisposedException(); }
-            VerifyBsonType("ReadSymbol", BsonType.Symbol);
-            State = GetNextState();
-            return _currentValue.AsBsonSymbol.Name;
-        }
-
-        /// <summary>
-        /// Reads a BSON timestamp from the reader.
-        /// </summary>
-        /// <returns>The combined timestamp/increment.</returns>
-        public override long ReadTimestamp()
-        {
-            if (Disposed) { ThrowObjectDisposedException(); }
-            VerifyBsonType("ReadTimestamp", BsonType.Timestamp);
-            State = GetNextState();
-            return _currentValue.AsBsonTimestamp.Value;
-        }
-
-        /// <summary>
-        /// Reads a BSON undefined from the reader.
-        /// </summary>
-        public override void ReadUndefined()
-        {
-            if (Disposed) { ThrowObjectDisposedException(); }
-            VerifyBsonType("ReadUndefined", BsonType.Undefined);
-            State = GetNextState();
-        }
-
-        /// <summary>
-        /// Returns the reader to previously bookmarked position and state.
-        /// </summary>
-        /// <param name="bookmark">The bookmark.</param>
-        public override void ReturnToBookmark(BsonReaderBookmark bookmark)
-        {
-            var documentReaderBookmark = (BsonDocumentReaderBookmark)bookmark;
-            State = documentReaderBookmark.State;
-            CurrentBsonType = documentReaderBookmark.CurrentBsonType;
-            CurrentName = documentReaderBookmark.CurrentName;
-            _context = documentReaderBookmark.CloneContext();
-            _currentValue = documentReaderBookmark.CurrentValue;
-        }
-
-        /// <summary>
-        /// Skips the name (reader must be positioned on a name).
-        /// </summary>
-        public override void SkipName()
-        {
-            if (Disposed) { ThrowObjectDisposedException(); }
-            if (State != BsonReaderState.Name)
-            {
-                ThrowInvalidState("SkipName", BsonReaderState.Name);
-            }
-
-            State = BsonReaderState.Value;
-        }
-
-        /// <summary>
-        /// Skips the value (reader must be positioned on a value).
-        /// </summary>
-        public override void SkipValue()
-        {
-            if (Disposed) { ThrowObjectDisposedException(); }
-            if (State != BsonReaderState.Value)
-            {
-                ThrowInvalidState("SkipValue", BsonReaderState.Value);
-            }
-            State = BsonReaderState.Type;
-        }
-
-        // protected methods
-        /// <summary>
-        /// Disposes of any resources used by the reader.
-        /// </summary>
-        /// <param name="disposing">True if called from Dispose.</param>
-        protected override void Dispose(bool disposing)
-        {
-            if (disposing)
-            {
-                try
-                {
-                    Close();
-                }
-                catch { } // ignore exceptions
-            }
-            base.Dispose(disposing);
-        }
-
-        // private methods
-        private BsonReaderState GetNextState()
-        {
-            switch (_context.ContextType)
-            {
-                case ContextType.Array:
-                case ContextType.Document:
-                    return BsonReaderState.Type;
-                case ContextType.TopLevel:
-                    return BsonReaderState.Done;
-                default:
-                    throw new BsonInternalException("Unexpected ContextType.");
-            }
-        }
-    }
-}

+ 0 - 11
Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/IO/BsonDocumentReader.cs.meta

@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: e7964437a209c9043b423a59c136b370
-MonoImporter:
-  externalObjects: {}
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 52
Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/IO/BsonDocumentReaderBookmark.cs

@@ -1,52 +0,0 @@
-/* Copyright 2010-present MongoDB Inc.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-namespace MongoDB.Bson.IO
-{
-    /// <summary>
-    /// Represents a bookmark that can be used to return a reader to the current position and state.
-    /// </summary>
-    public class BsonDocumentReaderBookmark : BsonReaderBookmark
-    {
-        // private fields
-        private BsonDocumentReaderContext _context;
-        private BsonValue _currentValue;
-
-        // constructors
-        internal BsonDocumentReaderBookmark(
-            BsonReaderState state,
-            BsonType currentBsonType,
-            string currentName,
-            BsonDocumentReaderContext context,
-            BsonValue currentValue)
-            : base(state, currentBsonType, currentName)
-        {
-            _context = context.Clone();
-            _currentValue = currentValue;
-        }
-
-        // internal properties
-        internal BsonValue CurrentValue
-        {
-            get { return _currentValue; }
-        }
-
-        // internal methods
-        internal BsonDocumentReaderContext CloneContext()
-        {
-            return _context.Clone();
-        }
-    }
-}

+ 0 - 11
Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/IO/BsonDocumentReaderBookmark.cs.meta

@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: bcd0597aa577d5a418837c422a687730
-MonoImporter:
-  externalObjects: {}
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 128
Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/IO/BsonDocumentReaderContext.cs

@@ -1,128 +0,0 @@
-/* Copyright 2010-present MongoDB Inc.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-namespace MongoDB.Bson.IO
-{
-    internal class BsonDocumentReaderContext
-    {
-        // private fields
-        private BsonDocumentReaderContext _parentContext;
-        private ContextType _contextType;
-        private BsonDocument _document;
-        private BsonArray _array;
-        private int _index;
-
-        // constructors
-        internal BsonDocumentReaderContext(
-            BsonDocumentReaderContext parentContext,
-            ContextType contextType,
-            BsonArray array)
-        {
-            _parentContext = parentContext;
-            _contextType = contextType;
-            _array = array;
-        }
-
-        internal BsonDocumentReaderContext(
-            BsonDocumentReaderContext parentContext,
-            ContextType contextType,
-            BsonDocument document)
-        {
-            _parentContext = parentContext;
-            _contextType = contextType;
-            _document = document;
-        }
-
-        // used by Clone
-        private BsonDocumentReaderContext(
-            BsonDocumentReaderContext parentContext,
-            ContextType contextType,
-            BsonDocument document,
-            BsonArray array,
-            int index)
-        {
-            _parentContext = parentContext;
-            _contextType = contextType;
-            _document = document;
-            _array = array;
-            _index = index;
-        }
-
-        // internal properties
-        internal BsonArray Array
-        {
-            get { return _array; }
-        }
-
-        internal ContextType ContextType
-        {
-            get { return _contextType; }
-        }
-
-        internal BsonDocument Document
-        {
-            get { return _document; }
-        }
-
-        internal int Index
-        {
-            get { return _index; }
-            set { _index = value; }
-        }
-
-        // public methods
-        /// <summary>
-        /// Creates a clone of the context.
-        /// </summary>
-        /// <returns>A clone of the context.</returns>
-        public BsonDocumentReaderContext Clone()
-        {
-            return new BsonDocumentReaderContext(_parentContext, _contextType, _document, _array, _index);
-        }
-
-        public bool TryGetNextElement(out BsonElement element)
-        {
-            if (_index < _document.ElementCount)
-            {
-                element = _document.GetElement(_index++);
-                return true;
-            }
-            else
-            {
-                element = default(BsonElement);
-                return false;
-            }
-        }
-
-        public bool TryGetNextValue(out BsonValue value)
-        {
-            if (_index < _array.Count)
-            {
-                value = _array[_index++];
-                return true;
-            }
-            else
-            {
-                value = null;
-                return false;
-            }
-        }
-
-        public BsonDocumentReaderContext PopContext()
-        {
-            return _parentContext;
-        }
-    }
-}

+ 0 - 11
Unity/Assets/Scripts/ThirdParty/Mongo/MongoDB.Bson/IO/BsonDocumentReaderContext.cs.meta

@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: d5123ca922b31e3498133af58482430e
-MonoImporter:
-  externalObjects: {}
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików