string GetHostInfo() { var hostInfo = new HostInfo { PackageRoot = PackageRoot, RuntimeRoot = RuntimeRoot, UserLibraryPath = UserLibraryPath.Replace("\\", "/"), ProxyLibraryPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "ClrBridge.dll").Replace("\\", "/"), }; var jsc = new DataContractJsonSerializer(typeof(HostInfo)); using (var ms = new MemoryStream()) { jsc.WriteObject(ms, hostInfo); ms.Position = 0; return(new StreamReader(ms).ReadToEnd()); } }
string GetHostInfo() { var hostInfo = new HostInfo { PackageRoot = PackageRoot, RuntimeRoot = RuntimeRoot, UserLibraryPath = UserLibraryPath.Replace("\\", "/"), ProxyLibraryPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "ClrBridge.dll").Replace("\\", "/"), }; var jsc = new DataContractJsonSerializer(typeof(HostInfo)); using (var ms = new MemoryStream()) { jsc.WriteObject(ms, hostInfo); ms.Position = 0; return new StreamReader(ms).ReadToEnd(); } }