This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Test] | |
public void IsMultipleTests() | |
{ | |
// true | |
Console.WriteLine(IsMultiple(0.0075, 0.0001)); | |
Console.WriteLine(IsMultiple(500.4, 0.001)); | |
Console.WriteLine(IsMultiple(500.4, 0.0001)); | |
Console.WriteLine(IsMultiple(500.4, 0.00001)); | |
Console.WriteLine(IsMultiple(500.4, 0.000001)); | |
Console.WriteLine(IsMultiple(500.4, 0.0000001)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> | |
<metadata> | |
<id>Newtonsoft.Json</id> | |
<version></version> | |
<title>Json.NET</title> | |
<description>Json.NET is a popular high-performance JSON framework for .NET</description> | |
<authors>James Newton-King</authors> | |
<language>en-US</language> | |
<projectUrl>http://www.newtonsoft.com/json</projectUrl> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set OLDDIR=%CD% | |
rmdir /s /q .\Working | |
mkdir .\Working | |
chdir Working | |
call git clone git://github.com/JamesNK/Newtonsoft.Json.git | |
rmdir Newtonsoft.Json\.git /s /q | |
chdir Newtonsoft.Json\Build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var data = new | |
{ | |
hello = "world", | |
people = new[] { "James", "Brendan", "Amy" } | |
}; | |
string dson = DsonConvert.SerializeObject(data, Formatting.Indented); | |
// such | |
// "hello" is "world", | |
// "people" is so |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#region License | |
// Copyright (c) 2007 James Newton-King | |
// | |
// Permission is hereby granted, free of charge, to any person | |
// obtaining a copy of this software and associated documentation | |
// files (the "Software"), to deal in the Software without | |
// restriction, including without limitation the rights to use, | |
// copy, modify, merge, publish, distribute, sublicense, and/or sell | |
// copies of the Software, and to permit persons to whom the | |
// Software is furnished to do so, subject to the following |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#region License | |
// Copyright (c) 2007 James Newton-King | |
// | |
// Permission is hereby granted, free of charge, to any person | |
// obtaining a copy of this software and associated documentation | |
// files (the "Software"), to deal in the Software without | |
// restriction, including without limitation the rights to use, | |
// copy, modify, merge, publish, distribute, sublicense, and/or sell | |
// copies of the Software, and to permit persons to whom the | |
// Software is furnished to do so, subject to the following |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set OLDDIR=%CD% | |
rmdir /s /q .\Working | |
mkdir .\Working | |
chdir Working | |
call git clone git://github.com/JamesNK/Newtonsoft.Json.git | |
rmdir Newtonsoft.Json\.git /s /q | |
chdir Newtonsoft.Json\Build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MetroPropertyNameResolver : DefaultContractResolver | |
{ | |
protected internal override string ResolvePropertyName(string propertyName) | |
{ | |
return ":::" + propertyName.ToUpper() + ":::"; | |
} | |
} | |
public class MetroStringConverter : JsonConverter | |
{ |
NewerOlder