-Updated Sandcastle
This commit is contained in:
+22
-64
@@ -32,9 +32,9 @@
|
|||||||
<BuildLogFile>
|
<BuildLogFile>
|
||||||
</BuildLogFile>
|
</BuildLogFile>
|
||||||
<HelpFileFormat>Website</HelpFileFormat>
|
<HelpFileFormat>Website</HelpFileFormat>
|
||||||
<FrameworkVersion>.NET Framework 4.0</FrameworkVersion>
|
<FrameworkVersion>.NET Framework 4.5.1</FrameworkVersion>
|
||||||
<HelpTitle>Json.NET - Documentation</HelpTitle>
|
<HelpTitle>Json.NET - Documentation</HelpTitle>
|
||||||
<PresentationStyle>vs2005</PresentationStyle>
|
<PresentationStyle>VS2005</PresentationStyle>
|
||||||
<NamingMethod>MemberName</NamingMethod>
|
<NamingMethod>MemberName</NamingMethod>
|
||||||
<DocumentationSourcePath>..\Src\Newtonsoft.Json\bin\Release</DocumentationSourcePath>
|
<DocumentationSourcePath>..\Src\Newtonsoft.Json\bin\Release</DocumentationSourcePath>
|
||||||
<DocumentationSources>
|
<DocumentationSources>
|
||||||
@@ -55,77 +55,35 @@
|
|||||||
<RootNamespaceContainer>True</RootNamespaceContainer>
|
<RootNamespaceContainer>True</RootNamespaceContainer>
|
||||||
<RootNamespaceTitle>API Reference</RootNamespaceTitle>
|
<RootNamespaceTitle>API Reference</RootNamespaceTitle>
|
||||||
<ComponentConfigurations>
|
<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">
|
<ComponentConfig id="Code Block Component" enabled="True">
|
||||||
<component id="Code Block Component" type="SandcastleBuilder.Components.CodeBlockComponent" assembly="{@SHFBFolder}SandcastleBuilder.Components.dll">
|
<component id="Code Block Component" type="SandcastleBuilder.Components.CodeBlockComponent" assembly="{@SHFBFolder}SandcastleBuilder.Components.dll">
|
||||||
<basePath value="{@HtmlEncProjectFolder}" />
|
<basePath value="{@HtmlEncProjectFolder}" />
|
||||||
<languageFilter value="true" />
|
<outputPaths>{@HelpFormatOutputPaths}</outputPaths>
|
||||||
<allowMissingSource value="false" />
|
<allowMissingSource value="false" />
|
||||||
<removeRegionMarkers 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" />
|
<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>
|
|
||||||
<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>
|
</component>
|
||||||
</ComponentConfig>
|
</ComponentConfig>
|
||||||
</ComponentConfigurations>
|
</ComponentConfigurations>
|
||||||
<IndentHtml>False</IndentHtml>
|
<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>
|
</PropertyGroup>
|
||||||
<!-- There are no properties for these two groups but they need to appear in
|
<!-- There are no properties for these two groups but they need to appear in
|
||||||
order for Visual Studio to perform the build. -->
|
order for Visual Studio to perform the build. -->
|
||||||
|
|||||||
@@ -75,4 +75,4 @@ using System.Security;
|
|||||||
// You can specify all the values or you can default the Revision and Build Numbers
|
// You can specify all the values or you can default the Revision and Build Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
[assembly: AssemblyVersion("4.5.0.0")]
|
[assembly: AssemblyVersion("4.5.0.0")]
|
||||||
[assembly: AssemblyFileVersion("5.0.7.16613")]
|
[assembly: AssemblyFileVersion("5.0.8.16617")]
|
||||||
|
|||||||
@@ -84,17 +84,21 @@ namespace Newtonsoft.Json.Tests.Serialization
|
|||||||
public void DeserializeListInterface()
|
public void DeserializeListInterface()
|
||||||
{
|
{
|
||||||
string json = @"[
|
string json = @"[
|
||||||
""One"",
|
'Volibear',
|
||||||
""II"",
|
'Teemo',
|
||||||
""3""
|
'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);
|
Console.WriteLine(champions[0]);
|
||||||
Assert.AreEqual("One", l[0]);
|
// Volibear
|
||||||
Assert.AreEqual("II", l[1]);
|
|
||||||
Assert.AreEqual("3", l[2]);
|
Assert.AreEqual(3, champions.Count);
|
||||||
|
Assert.AreEqual("Volibear", champions[0]);
|
||||||
|
Assert.AreEqual("Teemo", champions[1]);
|
||||||
|
Assert.AreEqual("Katarina", champions[2]);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|||||||
@@ -135,6 +135,40 @@ namespace Newtonsoft.Json.Tests.Serialization
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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 class ExtensionDataTestClass
|
||||||
{
|
{
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
|
|||||||
@@ -92,6 +92,6 @@ using System.Security;
|
|||||||
// You can specify all the values or you can default the Revision and Build Numbers
|
// You can specify all the values or you can default the Revision and Build Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
[assembly: AssemblyVersion("4.5.0.0")]
|
[assembly: AssemblyVersion("4.5.0.0")]
|
||||||
[assembly: AssemblyFileVersion("5.0.7.16613")]
|
[assembly: AssemblyFileVersion("5.0.8.16617")]
|
||||||
|
|
||||||
[assembly: CLSCompliant(true)]
|
[assembly: CLSCompliant(true)]
|
||||||
|
|||||||
Reference in New Issue
Block a user