From 4a6722cba790a3c4d194e137716f08b8cc8a8913 Mon Sep 17 00:00:00 2001 From: Mike-EEE Date: Thu, 28 Nov 2019 01:55:13 -0500 Subject: [PATCH 1/6] Forced rebuild to documentation site. --- documentation/reference/index.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/documentation/reference/index.md b/documentation/reference/index.md index 78dc9c005..419904f25 100644 --- a/documentation/reference/index.md +++ b/documentation/reference/index.md @@ -1,2 +1,4 @@ # PLACEHOLDER TODO: Add .NET projects to the *src* folder and run `docfx` to generate **REAL** *API Documentation*! + + \ No newline at end of file From 1978bdce293556b301297d59d420010c1e2dcb0b Mon Sep 17 00:00:00 2001 From: Mike-EEE Date: Thu, 28 Nov 2019 03:43:14 -0500 Subject: [PATCH 2/6] Attended to placeholder content. --- documentation/conceptual/index.md | 5 +++ documentation/conceptual/intro.md | 1 - documentation/conceptual/toc.yml | 2 +- documentation/index.md | 31 ++++++++++++++++--- documentation/reference/index.md | 9 ++++-- .../templates/default/styles/main.css | 1 + 6 files changed, 40 insertions(+), 9 deletions(-) create mode 100644 documentation/conceptual/index.md delete mode 100644 documentation/conceptual/intro.md diff --git a/documentation/conceptual/index.md b/documentation/conceptual/index.md new file mode 100644 index 000000000..2046ab15a --- /dev/null +++ b/documentation/conceptual/index.md @@ -0,0 +1,5 @@ +# Concepts and Topics + +Here you will find articles that give a general overview and introduction to ExtendedXmlSerializer. + +**Note:** This section is a mirrored view of our [repository wiki](https://github.com/ExtendedXmlSerializer/home/wiki). All topics here can also be viewed in our wiki. Whereas the content found on site is published and refreshed with each new release of our project, our wiki is updated instantly. As a result, the information on the wiki may differ from the content found within this site. \ No newline at end of file diff --git a/documentation/conceptual/intro.md b/documentation/conceptual/intro.md deleted file mode 100644 index c0478cede..000000000 --- a/documentation/conceptual/intro.md +++ /dev/null @@ -1 +0,0 @@ -# Add your introductions here! diff --git a/documentation/conceptual/toc.yml b/documentation/conceptual/toc.yml index 6356cd8e3..8de9eda82 100644 --- a/documentation/conceptual/toc.yml +++ b/documentation/conceptual/toc.yml @@ -1,5 +1,5 @@ - name: Introduction - href: intro.md + href: index.md - name: FAQs href: documents/01.-FAQs.md - name: The Basics diff --git a/documentation/index.md b/documentation/index.md index 3ae250636..6b00fa107 100644 --- a/documentation/index.md +++ b/documentation/index.md @@ -1,4 +1,27 @@ -# This is the **HOMEPAGE**. -Refer to [Markdown](http://daringfireball.net/projects/markdown/) for how to write markdown files. -## Quick Start Notes: -1. Add images to the *images* folder if the file is referencing an image. +# Welcome! + +Welcome to the ExtendedXmlSerializer documentation site. This is an automated site that is part of our continuous integration workflow and is generated on each new release. + +### [Conceptual Topics](/conceptual/) + +If you are new to ExtendedXmlSerializer, you might benefit most by [reviewing our conceptual topics](/conceptual/) first to get an overview of our offering. + +### [API Reference](/reference/) + +Our [API reference](/reference/) is generated from the our publicly-accessible code. + +### [Releases](https://github.com/ExtendedXmlSerializer/home/releases) + +Want to see a history of our product? Then [check out our releases](https://github.com/ExtendedXmlSerializer/home/releases). + +### [CHANGELOG](https://github.com/ExtendedXmlSerializer/home/blob/master/CHANGELOG.md) + +A [single-page history](https://github.com/ExtendedXmlSerializer/home/blob/master/CHANGELOG.md) of our releases starting with `v2.2.0`. + +### [README](https://github.com/ExtendedXmlSerializer/home/blob/master/README.md) + +[Our repository document](https://github.com/ExtendedXmlSerializer/home/blob/master/README.md) that highlights important high-level information, as most repository README's do. + +### [Submit an issue](https://github.com/ExtendedXmlSerializer/home/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc) + +Found a bug or have a question? [Check out our issues](https://github.com/ExtendedXmlSerializer/home/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc) and see if we can help. \ No newline at end of file diff --git a/documentation/reference/index.md b/documentation/reference/index.md index 419904f25..14bf4264e 100644 --- a/documentation/reference/index.md +++ b/documentation/reference/index.md @@ -1,4 +1,7 @@ -# PLACEHOLDER -TODO: Add .NET projects to the *src* folder and run `docfx` to generate **REAL** *API Documentation*! +# ExtendedXmlSerializer API Reference - \ No newline at end of file +Welcome to the API Reference documentation. Here you will find all documented classes from code defined within the ExtendedXmlSerializer project. + +Start by visiting a topic within the Table of Contents. + +If you are unsure of a topic to start with, we recommend visiting the `ConfigurationContainer` ([link](/reference/ExtendedXmlSerializer.Configuration.ConfigurationContainer.html)) as that is where all the fun starts. 👍 \ No newline at end of file diff --git a/documentation/templates/default/styles/main.css b/documentation/templates/default/styles/main.css index dad5f4340..9846822b4 100644 --- a/documentation/templates/default/styles/main.css +++ b/documentation/templates/default/styles/main.css @@ -52,6 +52,7 @@ article h4 { .sidetoc, .sidefilter { margin-left: -15px; } + .row { margin-left: unset; margin-right: unset; } } @media (max-width: 767px) { From 40ae732a99d986fcd1cde42d8f904e72c494e8f2 Mon Sep 17 00:00:00 2001 From: Mike-EEE Date: Thu, 28 Nov 2019 03:46:57 -0500 Subject: [PATCH 3/6] Fixed links. --- documentation/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/documentation/index.md b/documentation/index.md index 6b00fa107..2a017c180 100644 --- a/documentation/index.md +++ b/documentation/index.md @@ -2,11 +2,11 @@ Welcome to the ExtendedXmlSerializer documentation site. This is an automated site that is part of our continuous integration workflow and is generated on each new release. -### [Conceptual Topics](/conceptual/) +### [Conceptual Topics](conceptual/) If you are new to ExtendedXmlSerializer, you might benefit most by [reviewing our conceptual topics](/conceptual/) first to get an overview of our offering. -### [API Reference](/reference/) +### [API Reference](reference/) Our [API reference](/reference/) is generated from the our publicly-accessible code. From 6d0faef8e19399013fa93cebbaaab1a7a089e21f Mon Sep 17 00:00:00 2001 From: Mike-EEE Date: Fri, 29 Nov 2019 04:23:32 -0500 Subject: [PATCH 4/6] Updating conceptual table of contents. --- documentation/conceptual/toc.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/documentation/conceptual/toc.yml b/documentation/conceptual/toc.yml index 8de9eda82..3f2523999 100644 --- a/documentation/conceptual/toc.yml +++ b/documentation/conceptual/toc.yml @@ -1,6 +1,12 @@ - name: Introduction href: index.md - name: FAQs - href: documents/01.-FAQs.md + href: documents/FAQs.md - name: The Basics - href: documents/02.-The-Basics.md \ No newline at end of file + href: documents/The-Basics.md +- name: Features + href: documents/Features.md +- name: API Overview + href: documents/API-Overview.md +- name: Example Scenarios + href: documents/Example-Scenarios.md \ No newline at end of file From e938e5ccf48f3aaa2bff6bcd74fb670fc27ac0c4 Mon Sep 17 00:00:00 2001 From: Mike-EEE Date: Fri, 29 Nov 2019 04:37:35 -0500 Subject: [PATCH 5/6] Fixed links and addressed warnings. --- README.md | 2 +- documentation/index.md | 6 +++--- .../ExtensionMethodsForContent.cs | 2 +- .../ExtensionMethodsForExtensionModel.cs | 12 ++++++------ 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 697872f78..bfdf0590f 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ ExtendedXmlSerializer addresses a lot of these problems and much much more! - Property encryption - Support `XmlElementAttribute`, `XmlRootAttribute`, and `XmlTypeAttribute` for identity resolution - Additional attribute support: `XmlIgnoreAttribute`, `XmlAttributeAttribute`, and `XmlEnumAttribute` -- Deserialization xml from classic `XmlSerializer` (mostly, [details in FAQ](https://github.com/ExtendedXmlSerializer/home/wiki/01.-FAQs#systemxmlserializer-vs-extendedxmlserializer)) +- Deserialization xml from classic `XmlSerializer` (mostly, [details in FAQ](https://github.com/ExtendedXmlSerializer/home/wiki/FAQs#systemxmlserializer-vs-extendedxmlserializer)) Supported platforms: diff --git a/documentation/index.md b/documentation/index.md index 2a017c180..1ebc31967 100644 --- a/documentation/index.md +++ b/documentation/index.md @@ -2,13 +2,13 @@ Welcome to the ExtendedXmlSerializer documentation site. This is an automated site that is part of our continuous integration workflow and is generated on each new release. -### [Conceptual Topics](conceptual/) +### [Conceptual Topics](https://extendedxmlserializer.github.io/documentation/conceptual/) If you are new to ExtendedXmlSerializer, you might benefit most by [reviewing our conceptual topics](/conceptual/) first to get an overview of our offering. -### [API Reference](reference/) +### [API Reference](https://extendedxmlserializer.github.io/documentation/reference/) -Our [API reference](/reference/) is generated from the our publicly-accessible code. +Our [API reference](/reference/) is generated from the publicly-accessible surface API of our code. ### [Releases](https://github.com/ExtendedXmlSerializer/home/releases) diff --git a/src/ExtendedXmlSerializer/ExtensionMethodsForContent.cs b/src/ExtendedXmlSerializer/ExtensionMethodsForContent.cs index a572f329c..f9ef47a28 100644 --- a/src/ExtendedXmlSerializer/ExtensionMethodsForContent.cs +++ b/src/ExtendedXmlSerializer/ExtensionMethodsForContent.cs @@ -98,7 +98,7 @@ public static ITypeConfiguration WithMonitor(this ITypeConfiguration @t /// /// The container to configure. /// The configured container. - /// + /// public static IConfigurationContainer EnableParameterizedContent(this IConfigurationContainer @this) => @this.Extend(ParameterizedMembersExtension.Default); diff --git a/src/ExtendedXmlSerializer/ExtensionMethodsForExtensionModel.cs b/src/ExtendedXmlSerializer/ExtensionMethodsForExtensionModel.cs index 192bd2b6f..6dbe09bc0 100644 --- a/src/ExtendedXmlSerializer/ExtensionMethodsForExtensionModel.cs +++ b/src/ExtendedXmlSerializer/ExtensionMethodsForExtensionModel.cs @@ -12,12 +12,12 @@ using System.Collections.Generic; using System.IO; using System.Linq; -using System.Xml; - -// ReSharper disable TooManyArguments - +using System.Xml; + +// ReSharper disable TooManyArguments + namespace ExtendedXmlSerializer -{ +{ /// /// Extension methods that assist or enable functionality found within the extension model namespace ( /// ). @@ -110,7 +110,7 @@ public static IConfigurationContainer EnableExpressions(this IConfigurationConta /// The configuration container to configure. /// The configured configuration container. /// - /// + /// /// public static IConfigurationContainer EnableMarkupExtensions(this IConfigurationContainer @this) => @this.EnableExpressions() From 60fbf47cc2ddfc110a27dddf920e507de146585e Mon Sep 17 00:00:00 2001 From: Mike-EEE Date: Fri, 29 Nov 2019 06:19:55 -0500 Subject: [PATCH 6/6] Added passing test demonstrating serializer registration for documentation. --- .../Issue282Tests.cs | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 test/ExtendedXmlSerializer.Tests.ReportedIssues/Issue282Tests.cs diff --git a/test/ExtendedXmlSerializer.Tests.ReportedIssues/Issue282Tests.cs b/test/ExtendedXmlSerializer.Tests.ReportedIssues/Issue282Tests.cs new file mode 100644 index 000000000..c03c1347c --- /dev/null +++ b/test/ExtendedXmlSerializer.Tests.ReportedIssues/Issue282Tests.cs @@ -0,0 +1,58 @@ +using ExtendedXmlSerializer.Configuration; +using ExtendedXmlSerializer.ContentModel; +using ExtendedXmlSerializer.ContentModel.Format; +using ExtendedXmlSerializer.Tests.ReportedIssues.Support; +using FluentAssertions; +using Xunit; + +namespace ExtendedXmlSerializer.Tests.ReportedIssues +{ + public sealed class Issue282Tests + { + [Fact] + void Verify() + { + var serializer = new ConfigurationContainer().Type() + .Register() + .Serializer() + .Using(SubjectSerializer.Default) + .Create() + .ForTesting(); + + var instance = new Subject("Hello World!", 123); + serializer.Assert(instance, @"Hello World!|123"); + serializer.Cycle(instance).Should().BeEquivalentTo(instance); + } + + public sealed class SubjectSerializer : ISerializer + { + public static SubjectSerializer Default { get; } = new SubjectSerializer(); + + SubjectSerializer() {} + + public Subject Get(IFormatReader parameter) + { + var parts = parameter.Content().Split('|'); + var result = new Subject(parts[0], int.Parse(parts[1])); + return result; + } + + public void Write(IFormatWriter writer, Subject instance) + { + writer.Content($"{instance.Text}|{instance.Number}"); + } + } + + public class Subject + { + public Subject(string text, int number) + { + Text = text; + Number = number; + } + + public string Text { get; } + public int Number { get; } + } + } +} \ No newline at end of file