Skip to content

Commit

Permalink
-Updated Sandcastle
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesNK committed Oct 16, 2013
1 parent 9c32238 commit 56ee111
Show file tree
Hide file tree
Showing 5 changed files with 75 additions and 79 deletions.
94 changes: 26 additions & 68 deletions Doc/doc.shfbproj
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
<BuildLogFile>
</BuildLogFile>
<HelpFileFormat>Website</HelpFileFormat>
<FrameworkVersion>.NET Framework 4.0</FrameworkVersion>
<FrameworkVersion>.NET Framework 4.5.1</FrameworkVersion>
<HelpTitle>Json.NET - Documentation</HelpTitle>
<PresentationStyle>vs2005</PresentationStyle>
<PresentationStyle>VS2005</PresentationStyle>
<NamingMethod>MemberName</NamingMethod>
<DocumentationSourcePath>..\Src\Newtonsoft.Json\bin\Release</DocumentationSourcePath>
<DocumentationSources>
Expand All @@ -55,77 +55,35 @@
<RootNamespaceContainer>True</RootNamespaceContainer>
<RootNamespaceTitle>API Reference</RootNamespaceTitle>
<ComponentConfigurations>
<ComponentConfig id="Post-transform Component" enabled="True">
<component id="Post-transform Component" type="SandcastleBuilder.Components.PostTransformComponent" assembly="{@SHFBFolder}SandcastleBuilder.Components.dll">
<!-- Code colorizer files (required).
Attributes:
Stylesheet file (required)
Script file (required)
"Copy" image file (required) -->
<colorizer stylesheet="{@SHFBFolder}Colorizer\highlight.css" scriptFile="{@SHFBFolder}Colorizer\highlight.js" copyImage="{@SHFBFolder}Colorizer\CopyCode.gif" />
<!-- Base output paths for the files (required). These should match the parent folder of the output path
of the HTML files (see each of the SaveComponent instances in the configuration files). -->
<outputPaths>
{@HelpFormatOutputPaths}
</outputPaths>
<!-- Logo image file (optional). Filename is required. The height, width, altText, placement, and
alignment attributes are optional. -->
<logoFile filename="{@ProjectFolder}logo.jpg" height="0" width="0" altText="Json.NET" placement="left" alignment="left" />
</component>
</ComponentConfig>
<ComponentConfig id="Code Block Component" enabled="True">
<component id="Code Block Component" type="SandcastleBuilder.Components.CodeBlockComponent" assembly="{@SHFBFolder}SandcastleBuilder.Components.dll">
<basePath value="{@HtmlEncProjectFolder}" />
<languageFilter value="true" />
<allowMissingSource value="false" />
<removeRegionMarkers value="false" />
<colorizer syntaxFile="{@SHFBFolder}Colorizer\highlight.xml" styleFile="{@SHFBFolder}Colorizer\highlight.xsl" copyImageUrl="../icons/CopyCode.gif" language="cs" tabSize="0" numberLines="true" outlining="false" keepSeeTags="false" defaultTitle="true" />
</component>
</ComponentConfig>
<ComponentConfig id="Cached Reflection Index Data" enabled="True">
<component id="Cached Reflection Index Data" type="SandcastleBuilder.Components.CachedCopyFromIndexComponent" assembly="{@SHFBFolder}SandcastleBuilder.Components.dll">
<index name="reflection" value="/reflection/apis/api" key="@id" cache="10">
<cache base="{@SandcastlePath}Data\Reflection" recurse="true" files="*.xml" cacheFile="{@LocalDataFolder}Cache\Reflection.cache" />
<data files="reflection.xml" />
</index>
<copy name="reflection" source="*" target="/document/reference" />
</component>
</ComponentConfig>
<ComponentConfig id="Cached MSDN URL References" enabled="True">
<component id="Cached MSDN URL References" type="SandcastleBuilder.Components.CachedResolveReferenceLinksComponent" assembly="{@SHFBFolder}SandcastleBuilder.Components.dll" locale="{@Locale}" linkTarget="{@SdkLinkTarget}">
<helpOutput format="HtmlHelp1">
<cache filename="{@LocalDataFolder}Cache\MsdnUrl.cache" />
<targets base="{@SandcastlePath}Data\Reflection" recurse="true" files="*.xml" type="{@HtmlSdkLinkType}" />
<targets files="reflection.xml" type="Local" />
</helpOutput>
<helpOutput format="MSHelp2">
<cache filename="{@LocalDataFolder}Cache\MsdnUrl.cache" />
<targets base="{@SandcastlePath}Data\Reflection" recurse="true" files="*.xml" type="{@MSHelp2SdkLinkType}" />
<targets files="reflection.xml" type="Index" />
</helpOutput>
<helpOutput format="MSHelpViewer">
<cache filename="{@LocalDataFolder}Cache\MsdnUrl.cache" />
<targets base="{@SandcastlePath}Data\Reflection" recurse="true" files="*.xml" type="{@MSHelpViewerSdkLinkType}" />
<targets files="reflection.xml" type="Id" />
</helpOutput>
<helpOutput format="Website">
<cache filename="{@LocalDataFolder}Cache\MsdnUrl.cache" />
<targets base="{@SandcastlePath}Data\Reflection" recurse="true" files="*.xml" type="{@WebsiteSdkLinkType}" />
<targets files="reflection.xml" type="Local" />
</helpOutput>
</component>
</ComponentConfig>
<ComponentConfig id="Cached Framework Comments Index Data" enabled="True">
<component id="Cached Framework Comments Index Data" type="SandcastleBuilder.Components.CachedCopyFromIndexComponent" assembly="{@SHFBFolder}SandcastleBuilder.Components.dll">
<index name="comments" value="/doc/members/member" key="@name" cache="100">
{@CachedFrameworkCommentList}
{@CommentFileList}
</index>
<copy name="comments" source="*" target="/document/comments" />
</component>
<basePath value="{@HtmlEncProjectFolder}" />
<outputPaths>{@HelpFormatOutputPaths}</outputPaths>
<allowMissingSource value="false" />
<removeRegionMarkers value="false" />
<colorizer syntaxFile="{@SHFBFolder}Colorizer\highlight.xml" styleFile="{@SHFBFolder}Colorizer\highlight.xsl" stylesheet="{@SHFBFolder}Colorizer\highlight.css" scriptFile="{@SHFBFolder}Colorizer\highlight.js" language="cs" tabSize="0" numberLines="true" outlining="false" keepSeeTags="false" defaultTitle="true" />
</component>
</ComponentConfig>
</ComponentConfigurations>
<IndentHtml>False</IndentHtml>
<BuildAssemblerVerbosity>OnlyWarningsAndErrors</BuildAssemblerVerbosity>
<KeepLogFile>True</KeepLogFile>
<DisableCodeBlockComponent>False</DisableCodeBlockComponent>
<CppCommentsFixup>False</CppCommentsFixup>
<CleanIntermediates>True</CleanIntermediates>
<SyntaxFilters>CSharp</SyntaxFilters>
<SdkLinkTarget>Blank</SdkLinkTarget>
<Preliminary>False</Preliminary>
<Language>en-US</Language>
<ContentPlacement>AboveNamespaces</ContentPlacement>
<TransformComponentArguments>
<Argument Key="logoFile" Value="logo.jpg" />
<Argument Key="logoHeight" Value="" />
<Argument Key="logoWidth" Value="" />
<Argument Key="logoAltText" Value="Json.NET" />
<Argument Key="logoPlacement" Value="left" />
<Argument Key="logoAlignment" Value="left" />
</TransformComponentArguments>
</PropertyGroup>
<!-- There are no properties for these two groups but they need to appear in
order for Visual Studio to perform the build. -->
Expand Down
2 changes: 1 addition & 1 deletion Src/Newtonsoft.Json.Tests/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,4 @@
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("4.5.0.0")]
[assembly: AssemblyFileVersion("5.0.7.16613")]
[assembly: AssemblyFileVersion("5.0.8.16617")]
Original file line number Diff line number Diff line change
Expand Up @@ -84,17 +84,21 @@ public void DeserializeList()
public void DeserializeListInterface()
{
string json = @"[
""One"",
""II"",
""3""
]";
'Volibear',
'Teemo',
'Katarina'
]";

IImmutableList<string> l = JsonConvert.DeserializeObject<IImmutableList<string>>(json);
// what sorcery is this?!
IImmutableList<string> champions = JsonConvert.DeserializeObject<IImmutableList<string>>(json);

Assert.AreEqual(3, l.Count);
Assert.AreEqual("One", l[0]);
Assert.AreEqual("II", l[1]);
Assert.AreEqual("3", l[2]);
Console.WriteLine(champions[0]);
// Volibear

Assert.AreEqual(3, champions.Count);
Assert.AreEqual("Volibear", champions[0]);
Assert.AreEqual("Teemo", champions[1]);
Assert.AreEqual("Katarina", champions[2]);
}
#endregion

Expand Down
34 changes: 34 additions & 0 deletions Src/Newtonsoft.Json.Tests/Serialization/JsonSerializerTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,40 @@ public class NonGenericClass : GenericClass<GenericItem<string>, string>

}

public class CustomerInvoice
{
// we're only modifing the tax rate
public decimal TaxRate { get; set; }

// everything else gets stored here
[JsonExtensionData]
private IDictionary<string, JToken> _additionalData;
}

[Test]
public void ExtensionDataExample()
{
string json = @"{
'HourlyRate': 150,
'Hours': 40,
'TaxRate': 0.125
}";

var invoice = JsonConvert.DeserializeObject<CustomerInvoice>(json);

// increase tax to 15%
invoice.TaxRate = 0.15m;

string result = JsonConvert.SerializeObject(invoice);
// {
// 'TaxRate': 0.15,
// 'HourlyRate': 150,
// 'Hours': 40
// }

Assert.AreEqual(@"{""TaxRate"":0.15,""HourlyRate"":150,""Hours"":40}", result);
}

public class ExtensionDataTestClass
{
public string Name { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion Src/Newtonsoft.Json/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,6 @@
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("4.5.0.0")]
[assembly: AssemblyFileVersion("5.0.7.16613")]
[assembly: AssemblyFileVersion("5.0.8.16617")]

[assembly: CLSCompliant(true)]

0 comments on commit 56ee111

Please sign in to comment.