Skip to content

Commit

Permalink
changes
Browse files Browse the repository at this point in the history
  • Loading branch information
joemoceri committed Aug 1, 2021
1 parent 646c771 commit 079ea9a
Show file tree
Hide file tree
Showing 11 changed files with 156 additions and 369 deletions.
229 changes: 0 additions & 229 deletions docs/api/Io.JoeMoceri.FieldMapper.FieldMapper.html

This file was deleted.

119 changes: 0 additions & 119 deletions docs/api/Io.JoeMoceri.FieldMapper.html

This file was deleted.

17 changes: 15 additions & 2 deletions docs/articles/Examples.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,23 @@ <h3 id="examples">Examples</h3>
<h4 id="description">Description</h4>
<p>To see these in action, check out the <a href="https://github.com/joemoceri/field-mapper-dotnet/tree/main/src/FieldMapperForDotNet.Tests">Tests Project</a> and <a href="https://github.com/joemoceri/field-mapper-dotnet/tree/main/src/FieldMapperForDotNet.Sample">Sample Project</a>.</p>
<h4 id="field-mapper">Field Mapper</h4>
<p>Map values out of a given string.</p>
<pre><code class="lang-csharp">public void Example()
<p>Map a first name out of a given string.</p>
<pre><code class="lang-csharp">public void MapFirstName()
{
// Arrange
string key = &quot;First Name:&quot;;
string value = &quot;Joe&quot;;

var content = $&quot;{key} {value}&quot;;
var mappings = new List&lt;string&gt;();
mappings.Add(key);

// Act
var parser = new FieldMapper();
var result = parser.Get(content, mappings);

// Assert
Assert.AreEqual(value, result[key]);
}
</code></pre>
</article>
Expand Down
2 changes: 2 additions & 0 deletions docs/articles/FieldMapper.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@
<article class="content wrap" id="_content" data-uid="">
<h3 id="field-mapper">Field Mapper</h3>

<p>This class is used for parsing data out of plain-text and html body contact form submission emails. Given a set of mappings, it will identify values from left-to-right, map them, and return a dictionary as the result.</p>
<p>This class can be customized using <a href="../api/FieldMapperForDotNet.FieldMapperConfiguration.html">Configurations</a>. Right now this supports de-entitizing html body emails and allowing or disabling separating mappings with line breaks. Default settings are recommended. When using plain-text, disabling de-entitizing is helpful to keep mappings consisent.</p>
</article>
</div>

Expand Down
2 changes: 2 additions & 0 deletions docs/articles/Overview.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ <h2 id="overview">Overview</h2>
<li><a href="#links">Links</a></li>
</ul>
<h3 id="field-mapper">Field Mapper</h3>
<p>C# .NET Library that will map out values from a given string. This is primarily used for parsing data out of html and plain-text body contact form submission emails, such as those from Contact Form 7 and WPForms on Wordpress. It will return a Dictionary with the mapping / value mapped as the key-value pair.</p>
<h3 id="not-supported">Not Supported</h3>
<p>Having the same key multiple times.</p>
<h3 id="links">Links</h3>
<p>Please see <a href="Examples.html">Examples</a> for how to use.</p>
</article>
Expand Down
Loading

0 comments on commit 079ea9a

Please sign in to comment.