Bladeren bron

1.去掉json.net,使用mongodb的json驱动
2.完善game config管理类
3.升级到vs2013
4.升级nuget库

tanghai 12 jaren geleden
bovenliggende
commit
ce5840a151

+ 1 - 1
CSharp/App/BossClient/GateSession.cs

@@ -55,7 +55,7 @@ namespace BossClient
 			{
 				throw new BossException(string.Format(
 					"session: {0}, SMSG_Auth_Response: {1}",
-					this.ID, JsonHelper.ToString(smsgAuthResponse)));
+					this.ID, MongoHelper.ToJson(smsgAuthResponse)));
 			}
 
 			Logger.Trace("session: {0}, login gate OK!", this.ID);

+ 3 - 3
CSharp/App/BossClient/RealmSession.cs

@@ -119,7 +119,7 @@ namespace BossClient
 			{
 				throw new BossException(string.Format(
 					"session: {0}, SMSG_Password_Protect_Type: {1}",
-					this.ID, JsonHelper.ToString(smsgPasswordProtectType)));
+					this.ID, MongoHelper.ToJson(smsgPasswordProtectType)));
 			}
 
 			// 这个消息已经没有作用,只用来保持原有的代码流程
@@ -133,7 +133,7 @@ namespace BossClient
 			{
 				throw new BossException(
 					string.Format("session: {0}, SMSG_Auth_Logon_Challenge_Response: {1}",
-					this.ID, JsonHelper.ToString(smsgAuthLogonChallengeResponse)));
+					this.ID, MongoHelper.ToJson(smsgAuthLogonChallengeResponse)));
 			}
 
 			Logger.Trace("session: {0}, SMSG_Auth_Logon_Challenge_Response OK", this.ID);
@@ -170,7 +170,7 @@ namespace BossClient
 			{
 				throw new BossException(string.Format(
 					"session: {0}, SMSG_Auth_Logon_Proof_M2: {1}",
-					this.ID, JsonHelper.ToString(smsgAuthLogonProofM2)));
+					this.ID, MongoHelper.ToJson(smsgAuthLogonProofM2)));
 			}
 
 			Logger.Trace("session: {0}, SMSG_Auth_Logon_Proof_M2 OK", this.ID);

+ 1 - 1
CSharp/App/BossCommand/BCGetCharacterInfo.cs

@@ -28,7 +28,7 @@ namespace BossCommand
 				return null;
 			}
 
-			var characterInfo = JsonHelper.FromString<CharacterInfo>(smsgBossCommandResponse.Content);
+			var characterInfo = MongoHelper.FromJson<CharacterInfo>(smsgBossCommandResponse.Content);
 			return characterInfo;
 		}
 	}

+ 1 - 1
CSharp/App/BossCommand/BCSendMail.cs

@@ -17,7 +17,7 @@ namespace BossCommand
 		public override async Task<object> DoAsync()
 		{
 			this.CommandString = string.Format(
-				"send_mail --json {0} ", JsonHelper.ToString(this.BossMail));
+				"send_mail --json {0} ", MongoHelper.ToJson(this.BossMail));
 			Logger.Trace(this.CommandString);
 			this.SendMessage(new CMSG_Boss_Gm { Message = CommandString });
 			var smsgBossCommandResponse = await this.RecvMessage<SMSG_Boss_Command_Response>();

+ 2 - 2
CSharp/App/Modules/Robot/RobotViewModel.cs

@@ -497,8 +497,8 @@ namespace Modules.Robot
 				return;
 			}
 			var smsgBossCommandResponse = (SMSG_Boss_Command_Response)result;
-			this.ErrorInfo = string.Format(" send command: {0}, error code: {1}", 
-				commandString, JsonHelper.ToString(smsgBossCommandResponse));
+			this.ErrorInfo = string.Format(" send command: {0}, error code: {1}",
+				commandString, MongoHelper.ToJson(smsgBossCommandResponse));
 		}
 	}
 }

+ 3 - 0
CSharp/CSharp.sln.DotSettings

@@ -58,6 +58,7 @@
 	<s:Int64 x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/WRAP_LIMIT/@EntryValue">100</s:Int64>
 	<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/WRAP_MULTIPLE_DECLARATION_STYLE/@EntryValue">WRAP_IF_LONG</s:String>
 	<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/WRAP_TERNARY_EXPR_STYLE/@EntryValue">WRAP_IF_LONG</s:String>
+	<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/JavaScriptCodeFormatting/ALIGN_MULTIPLE_DECLARATION/@EntryValue">True</s:Boolean>
 	<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/JavaScriptCodeFormatting/JavaScriptFormatOther/ALIGN_MULTIPLE_DECLARATION/@EntryValue">True</s:Boolean>
 	<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/XmlFormatter/BlankLineAfterProcessingInstructions/@EntryValue">False</s:Boolean>
 	<s:String x:Key="/Default/CodeStyle/CodeFormatting/XmlFormatter/ProcessingInstructionAttributeIndenting/@EntryValue">TwoSteps</s:String>
@@ -291,6 +292,8 @@ II.2.12 &lt;HandlesEvent /&gt;&#xD;
 	<s:String x:Key="/Default/Environment/Editor/MatchingBraceHighlighting/Position/@EntryValue">BOTH_SIDES</s:String>
 	<s:Boolean x:Key="/Default/Environment/OpenDocument/OpenDocumentAfterModification/@EntryValue">True</s:Boolean>
 	<s:Boolean x:Key="/Default/Environment/SearchAndNavigation/MergeOccurences/@EntryValue">True</s:Boolean>
+	<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateBlankLinesAroundFieldToBlankLinesAroundProperty/@EntryIndexedValue">True</s:Boolean>
+	<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002EJavaScript_002ECodeStyle_002ESettingsUpgrade_002EJsCodeFormatterSettingsUpgrader/@EntryIndexedValue">True</s:Boolean>
 	<s:Boolean x:Key="/Default/Environment/TextControl/HighlightCurrentLine/@EntryValue">True</s:Boolean>
 	<s:Boolean x:Key="/Default/Environment/UnitTesting/MsTestProvider/UseTestRunConfigFromMetadataFile/@EntryValue">False</s:Boolean>
 	<s:Boolean x:Key="/Default/Environment/UpdatesManger/IsDownloadUpdateDataAllowed/@EntryValue">False</s:Boolean>

+ 6 - 5
CSharp/Game/BehaviorTree/BehaviorTree.csproj

@@ -32,12 +32,13 @@
     <WarningLevel>4</WarningLevel>
   </PropertyGroup>
   <ItemGroup>
-    <Reference Include="MongoDB.Bson, Version=1.8.2.34, Culture=neutral, PublicKeyToken=f686731cfb9cc103, processorArchitecture=MSIL">
+    <Reference Include="MongoDB.Bson, Version=1.8.3.9, Culture=neutral, PublicKeyToken=f686731cfb9cc103, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\..\packages\mongocsharpdriver.1.8.2\lib\net35\MongoDB.Bson.dll</HintPath>
+      <HintPath>..\..\packages\mongocsharpdriver.1.8.3\lib\net35\MongoDB.Bson.dll</HintPath>
     </Reference>
-    <Reference Include="MongoDB.Driver">
-      <HintPath>..\..\packages\mongocsharpdriver.1.8.2\lib\net35\MongoDB.Driver.dll</HintPath>
+    <Reference Include="MongoDB.Driver, Version=1.8.3.9, Culture=neutral, PublicKeyToken=f686731cfb9cc103, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\packages\mongocsharpdriver.1.8.3\lib\net35\MongoDB.Driver.dll</HintPath>
     </Reference>
     <Reference Include="System" />
     <Reference Include="System.Core" />
@@ -65,7 +66,7 @@
     </ProjectReference>
   </ItemGroup>
   <ItemGroup>
-    <None Include="Packages.config" />
+    <None Include="packages.config" />
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />

+ 1 - 1
CSharp/Game/BehaviorTree/Packages.config

@@ -1,4 +1,4 @@
 <?xml version="1.0" encoding="utf-8"?>
 <packages>
-  <package id="mongocsharpdriver" version="1.8.2" targetFramework="net45" />
+  <package id="mongocsharpdriver" version="1.8.3" targetFramework="net45" />
 </packages>

+ 57 - 26
CSharp/Game/Component/AllConfigManager.cs

@@ -1,26 +1,57 @@
-using System.Collections.Generic;
-
-namespace Component
-{
-	public class AllConfigManager
-	{
-		public readonly Dictionary<string, object> allConfig = new Dictionary<string, object>();
- 
-		public T Get<T>(int type) where T : IType
-		{
-			var configManager = (ConfigManager<T>)allConfig[typeof (T).Name];
-			return configManager[type];
-		}
-
-		public Dictionary<int, T> GetAll<T>(int type) where T : IType
-		{
-			var configManager = (ConfigManager<T>)allConfig[typeof (T).Name];
-			return configManager.GetAll();
-		}
-
-		public ConfigManager<T> GetConfigManager<T>() where T : IType
-		{
-			return (ConfigManager<T>)allConfig[typeof(T).Name];
-		}
-	}
-}
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.IO;
+using System.Reflection;
+
+namespace Component
+{
+	public class AllConfigManager
+	{
+		public readonly Dictionary<string, object> allConfig = new Dictionary<string, object>();
+
+		public AllConfigManager(string path)
+		{
+			foreach (var dir in Directory.GetDirectories(path))
+			{
+				// 配置目录名与类名一致
+				string baseName = new DirectoryInfo(dir).Name;
+				var assembly = typeof (AllConfigManager).Assembly;
+				object obj = assembly.CreateInstance(baseName);
+
+				var iSupportInitialize = obj as ISupportInitialize;
+				if (iSupportInitialize != null)
+				{
+					iSupportInitialize.BeginInit();
+				}
+
+				var iInit = obj as IConfigInitialize;
+				if (iInit != null)
+				{
+					iInit.Init(dir);
+				}
+
+				if (iSupportInitialize != null)
+				{
+					iSupportInitialize.EndInit();
+				}
+			}
+		}
+ 
+		public T Get<T>(int type) where T : IType
+		{
+			var configManager = (ConfigManager<T>)allConfig[typeof (T).Name];
+			return configManager[type];
+		}
+
+		public Dictionary<int, T> GetAll<T>(int type) where T : IType
+		{
+			var configManager = (ConfigManager<T>)allConfig[typeof (T).Name];
+			return configManager.GetAll();
+		}
+
+		public ConfigManager<T> GetConfigManager<T>() where T : IType
+		{
+			return (ConfigManager<T>)allConfig[typeof(T).Name];
+		}
+	}
+}

+ 8 - 7
CSharp/Game/Component/Component.csproj

@@ -32,13 +32,13 @@
     <WarningLevel>4</WarningLevel>
   </PropertyGroup>
   <ItemGroup>
-    <Reference Include="MongoDB.Bson, Version=1.8.2.34, Culture=neutral, PublicKeyToken=f686731cfb9cc103, processorArchitecture=MSIL">
+    <Reference Include="MongoDB.Bson, Version=1.8.3.9, Culture=neutral, PublicKeyToken=f686731cfb9cc103, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\..\packages\mongocsharpdriver.1.8.2\lib\net35\MongoDB.Bson.dll</HintPath>
+      <HintPath>..\..\packages\mongocsharpdriver.1.8.3\lib\net35\MongoDB.Bson.dll</HintPath>
     </Reference>
-    <Reference Include="MongoDB.Driver, Version=1.8.2.34, Culture=neutral, PublicKeyToken=f686731cfb9cc103, processorArchitecture=MSIL">
+    <Reference Include="MongoDB.Driver, Version=1.8.3.9, Culture=neutral, PublicKeyToken=f686731cfb9cc103, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\..\packages\mongocsharpdriver.1.8.2\lib\net35\MongoDB.Driver.dll</HintPath>
+      <HintPath>..\..\packages\mongocsharpdriver.1.8.3\lib\net35\MongoDB.Driver.dll</HintPath>
     </Reference>
     <Reference Include="System" />
     <Reference Include="System.Core" />
@@ -54,19 +54,20 @@
     <Compile Include="Buff.cs" />
     <Compile Include="BuffManager.cs" />
     <Compile Include="ConfigManager.cs" />
+    <Compile Include="IConfigInitialize.cs" />
     <Compile Include="IType.cs" />
     <Compile Include="Object.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
   </ItemGroup>
-  <ItemGroup>
-    <None Include="Packages.config" />
-  </ItemGroup>
   <ItemGroup>
     <ProjectReference Include="..\..\Platform\Helper\Helper.csproj">
       <Project>{24233cd5-a5df-484b-a482-b79cb7a0d9cb}</Project>
       <Name>Helper</Name>
     </ProjectReference>
   </ItemGroup>
+  <ItemGroup>
+    <None Include="packages.config" />
+  </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 

+ 19 - 10
CSharp/Game/Component/ConfigManager.cs

@@ -1,14 +1,28 @@
 using System.Collections.Generic;
+using System.ComponentModel;
 using System.IO;
 using Helper;
 
 namespace Component
 {
-	public class ConfigManager<T> where T : IType
+	public class ConfigManager<T> : ISupportInitialize, IConfigInitialize where T : IType
 	{
-		private readonly Dictionary<int, T> dict = new Dictionary<int, T>();
+		protected readonly Dictionary<int, T> dict = new Dictionary<int, T>();
 
-		public virtual void LoadConfig(string dir)
+		public T this[int type]
+		{
+			get
+			{
+				return dict[type];
+			}
+		}
+
+		public Dictionary<int, T> GetAll()
+		{
+			return this.dict;
+		}
+
+		public void Init(string dir)
 		{
 			foreach (var file in Directory.GetFiles(dir))
 			{
@@ -17,17 +31,12 @@ namespace Component
 			}
 		}
 
-		public T this[int type]
+		public void BeginInit()
 		{
-			get
-			{
-				return dict[type];
-			}
 		}
 
-		public Dictionary<int, T> GetAll()
+		public void EndInit()
 		{
-			return this.dict;
 		}
 	}
 }

+ 8 - 0
CSharp/Game/Component/IConfigInitialize.cs

@@ -0,0 +1,8 @@
+
+namespace Component
+{
+	public interface IConfigInitialize
+	{
+		void Init(string dir);
+	}
+}

+ 1 - 1
CSharp/Game/Component/Packages.config

@@ -1,4 +1,4 @@
 <?xml version="1.0" encoding="utf-8"?>
 <packages>
-  <package id="mongocsharpdriver" version="1.8.2" targetFramework="net45" />
+  <package id="mongocsharpdriver" version="1.8.3" targetFramework="net45" />
 </packages>

+ 5 - 5
CSharp/Game/ComponentTest/ComponentTest.csproj

@@ -37,13 +37,13 @@
     <WarningLevel>4</WarningLevel>
   </PropertyGroup>
   <ItemGroup>
-    <Reference Include="MongoDB.Bson, Version=1.8.2.34, Culture=neutral, PublicKeyToken=f686731cfb9cc103, processorArchitecture=MSIL">
+    <Reference Include="MongoDB.Bson, Version=1.8.3.9, Culture=neutral, PublicKeyToken=f686731cfb9cc103, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\..\packages\mongocsharpdriver.1.8.2\lib\net35\MongoDB.Bson.dll</HintPath>
+      <HintPath>..\..\packages\mongocsharpdriver.1.8.3\lib\net35\MongoDB.Bson.dll</HintPath>
     </Reference>
-    <Reference Include="MongoDB.Driver, Version=1.8.2.34, Culture=neutral, PublicKeyToken=f686731cfb9cc103, processorArchitecture=MSIL">
+    <Reference Include="MongoDB.Driver, Version=1.8.3.9, Culture=neutral, PublicKeyToken=f686731cfb9cc103, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\..\packages\mongocsharpdriver.1.8.2\lib\net35\MongoDB.Driver.dll</HintPath>
+      <HintPath>..\..\packages\mongocsharpdriver.1.8.3\lib\net35\MongoDB.Driver.dll</HintPath>
     </Reference>
     <Reference Include="System" />
   </ItemGroup>
@@ -79,7 +79,7 @@
     </ProjectReference>
   </ItemGroup>
   <ItemGroup>
-    <None Include="Packages.config" />
+    <None Include="packages.config" />
   </ItemGroup>
   <Choose>
     <When Condition="'$(VisualStudioVersion)' == '10.0' And '$(IsCodedUITest)' == 'True'">

+ 1 - 1
CSharp/Game/ComponentTest/Packages.config

@@ -1,4 +1,4 @@
 <?xml version="1.0" encoding="utf-8"?>
 <packages>
-  <package id="mongocsharpdriver" version="1.8.2" targetFramework="net45" />
+  <package id="mongocsharpdriver" version="1.8.3" targetFramework="net45" />
 </packages>

+ 5 - 5
CSharp/Platform/ENet/IOService.cs

@@ -2,7 +2,7 @@
 
 namespace ENet
 {
-	public class IOService: IDisposable
+	public sealed class IOService: IDisposable
 	{
 		static IOService()
 		{
@@ -19,8 +19,8 @@ namespace ENet
 			}
 		}
 
-		protected IntPtr host;
-		protected bool isRunning = true;
+		private IntPtr host;
+		private bool isRunning = true;
 		private readonly object eventsLock = new object();
 		private Action events;
 
@@ -82,13 +82,13 @@ namespace ENet
 			this.Dispose(false);
 		}
 
-		public virtual void Dispose()
+		public void Dispose()
 		{
 			this.Dispose(true);
 			GC.SuppressFinalize(this);
 		}
 
-		protected void Dispose(bool disposing)
+		private void Dispose(bool disposing)
 		{
 			if (this.host == IntPtr.Zero)
 			{

+ 6 - 3
CSharp/Platform/ENetCpp/ENetCpp.vcxproj

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <ItemGroup Label="ProjectConfigurations">
     <ProjectConfiguration Include="Debug|Win32">
       <Configuration>Debug</Configuration>
@@ -21,14 +21,14 @@
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
     <ConfigurationType>DynamicLibrary</ConfigurationType>
     <UseDebugLibraries>true</UseDebugLibraries>
-    <PlatformToolset>v110</PlatformToolset>
+    <PlatformToolset>v120</PlatformToolset>
     <CLRSupport>false</CLRSupport>
     <CharacterSet>Unicode</CharacterSet>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
     <ConfigurationType>DynamicLibrary</ConfigurationType>
     <UseDebugLibraries>false</UseDebugLibraries>
-    <PlatformToolset>v110</PlatformToolset>
+    <PlatformToolset>v120</PlatformToolset>
     <CLRSupport>true</CLRSupport>
     <CharacterSet>Unicode</CharacterSet>
   </PropertyGroup>
@@ -80,6 +80,9 @@
     <ProjectReference>
       <UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
     </ProjectReference>
+    <Bscmake>
+      <PreserveSbr>true</PreserveSbr>
+    </Bscmake>
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
     <ClCompile>

+ 6 - 11
CSharp/Platform/Helper/Helper.csproj

@@ -32,21 +32,17 @@
     <WarningLevel>4</WarningLevel>
   </PropertyGroup>
   <ItemGroup>
-    <Reference Include="MongoDB.Bson, Version=1.8.2.34, Culture=neutral, PublicKeyToken=f686731cfb9cc103, processorArchitecture=MSIL">
+    <Reference Include="MongoDB.Bson, Version=1.8.3.9, Culture=neutral, PublicKeyToken=f686731cfb9cc103, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\..\packages\mongocsharpdriver.1.8.2\lib\net35\MongoDB.Bson.dll</HintPath>
+      <HintPath>..\..\packages\mongocsharpdriver.1.8.3\lib\net35\MongoDB.Bson.dll</HintPath>
     </Reference>
-    <Reference Include="MongoDB.Driver, Version=1.8.2.34, Culture=neutral, PublicKeyToken=f686731cfb9cc103, processorArchitecture=MSIL">
+    <Reference Include="MongoDB.Driver, Version=1.8.3.9, Culture=neutral, PublicKeyToken=f686731cfb9cc103, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\..\packages\mongocsharpdriver.1.8.2\lib\net35\MongoDB.Driver.dll</HintPath>
+      <HintPath>..\..\packages\mongocsharpdriver.1.8.3\lib\net35\MongoDB.Driver.dll</HintPath>
     </Reference>
-    <Reference Include="Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
+    <Reference Include="protobuf-net, Version=2.0.0.668, Culture=neutral, PublicKeyToken=257b51d87d2e4d67, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\..\packages\Newtonsoft.Json.5.0.6\lib\net45\Newtonsoft.Json.dll</HintPath>
-    </Reference>
-    <Reference Include="protobuf-net, Version=2.0.0.640, Culture=neutral, PublicKeyToken=257b51d87d2e4d67, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\..\packages\protobuf-net.2.0.0.640\lib\net40\protobuf-net.dll</HintPath>
+      <HintPath>..\..\packages\protobuf-net.2.0.0.668\lib\net40\protobuf-net.dll</HintPath>
     </Reference>
     <Reference Include="System" />
     <Reference Include="System.Core" />
@@ -57,7 +53,6 @@
   <ItemGroup>
     <Compile Include="ByteHelper.cs" />
     <Compile Include="BigIntegerHelper.cs" />
-    <Compile Include="JsonHelper.cs" />
     <Compile Include="LoaderHelper.cs" />
     <Compile Include="ProtobufHelper.cs" />
     <Compile Include="RandomHelper.cs" />

+ 0 - 17
CSharp/Platform/Helper/JsonHelper.cs

@@ -1,17 +0,0 @@
-using Newtonsoft.Json;
-
-namespace Helper
-{
-	public static class JsonHelper
-	{
-		public static string ToString(object obj)
-		{
-			return JsonConvert.SerializeObject(obj);
-		}
-
-		public static T FromString<T>(string str)
-		{
-			return JsonConvert.DeserializeObject<T>(str);
-		}
-	}
-}

+ 2 - 3
CSharp/Platform/Helper/Packages.config

@@ -1,6 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
 <packages>
-  <package id="mongocsharpdriver" version="1.8.2" targetFramework="net45" />
-  <package id="Newtonsoft.Json" version="5.0.6" targetFramework="net45" />
-  <package id="protobuf-net" version="2.0.0.640" targetFramework="net45" />
+  <package id="mongocsharpdriver" version="1.8.3" targetFramework="net45" />
+  <package id="protobuf-net" version="2.0.0.668" targetFramework="net45" />
 </packages>

+ 5 - 3
CSharp/Platform/Log/Log.csproj

@@ -32,9 +32,9 @@
     <WarningLevel>4</WarningLevel>
   </PropertyGroup>
   <ItemGroup>
-    <Reference Include="NLog, Version=2.0.1.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
+    <Reference Include="NLog, Version=2.1.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\..\packages\NLog.2.0.1.2\lib\net45\NLog.dll</HintPath>
+      <HintPath>..\..\packages\NLog.2.1.0\lib\net45\NLog.dll</HintPath>
     </Reference>
     <Reference Include="System" />
     <Reference Include="System.Core" />
@@ -50,7 +50,9 @@
     <Folder Include="Properties\" />
   </ItemGroup>
   <ItemGroup>
-    <None Include="Packages.config" />
+    <None Include="Packages.config">
+      <SubType>Designer</SubType>
+    </None>
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Import Project="$(SolutionDir)\.nuget\nuget.targets" />

+ 1 - 1
CSharp/Platform/Log/Packages.config

@@ -1,4 +1,4 @@
 <?xml version="1.0" encoding="utf-8"?>
 <packages>
-  <package id="NLog" version="2.0.1.2" targetFramework="net45" />
+  <package id="NLog" version="2.1.0" targetFramework="net45" />
 </packages>