summaryrefslogtreecommitdiff
path: root/ThirdParty/CsvHelper-master/docs/migration/v22/index.html
blob: 9e1defcd50728ebfbf2ec6b42f427a61a01e38ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
<!DOCTYPE html>
<html lang="en-us">
<head>
	<meta charSet="UTF-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1" />
	<link rel="apple-touch-icon" sizes="57x57" href="/CsvHelper/favicons/apple-icon-57x57.png" />
	<link rel="apple-touch-icon" sizes="60x60" href="/CsvHelper/favicons/apple-icon-60x60.png" />
	<link rel="apple-touch-icon" sizes="72x72" href="/CsvHelper/favicons/apple-icon-72x72.png" />
	<link rel="apple-touch-icon" sizes="76x76" href="/CsvHelper/favicons/apple-icon-76x76.png" />
	<link rel="apple-touch-icon" sizes="114x114" href="/CsvHelper/favicons/apple-icon-114x114.png" />
	<link rel="apple-touch-icon" sizes="120x120" href="/CsvHelper/favicons/apple-icon-120x120.png" />
	<link rel="apple-touch-icon" sizes="144x144" href="/CsvHelper/favicons/apple-icon-144x144.png" />
	<link rel="apple-touch-icon" sizes="152x152" href="/CsvHelper/favicons/apple-icon-152x152.png" />
	<link rel="apple-touch-icon" sizes="180x180" href="/CsvHelper/favicons/apple-icon-180x180.png" />
	<link rel="icon" type="image/png" sizes="192x192" href="/CsvHelper/favicons/android-icon-192x192.png" />
	<link rel="icon" type="image/png" sizes="32x32" href="/CsvHelper/favicons/favicon-32x32.png" />
	<link rel="icon" type="image/png" sizes="96x96" href="/CsvHelper/favicons/favicon-96x96.png" />
	<link rel="icon" type="image/png" sizes="16x16" href="/CsvHelper/favicons/favicon-16x16.png" />
	<link rel="manifest" href="/CsvHelper/manifest.json" />
	<meta name="msapplication-TileColor" content="#ffffff" />
	<meta name="msapplication-TileImage" content="/ms-icon-144x144.png" />
	<meta name="theme-color" content="#ffffff" />
	<title>V22 | CsvHelper</title>

	
	
		<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.9.1/css/bulma.min.css" />
	
	<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/styles/default.min.css" />
	<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/styles/vs.min.css" />
	<link rel="stylesheet" href="/CsvHelper/styles/index.css" />

	<script defer src="https://use.fontawesome.com/releases/v5.14.0/js/all.js"></script>
	<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/highlight.min.js"></script>
</head>
<body>
	<header id="header" class="header">
	<nav class="navbar is-light">
		<div class="navbar-brand">
			<a class="navbar-item" href="/CsvHelper">
				<img src="/CsvHelper/images/logo.svg" width="66" height="28" />
			</a>
			<div id="navbar-burger" class="navbar-burger">
				<span></span>
				<span></span>
				<span></span>
			</div>
		</div>
		<div id="navbar-menu" class="navbar-menu">
			<div class="navbar-start">
				<a class="navbar-item" href="/CsvHelper/getting-started">Getting Started</a>
				<a class="navbar-item" href="/CsvHelper/examples">Examples</a>
				<a class="navbar-item" href="/CsvHelper/migration">Migration</a>
				<a class="navbar-item" href="/CsvHelper/change-log">Change Log</a>
			</div>
			<div class="navbar-end">
				<a class="navbar-item" href="https://twitter.com/JoshClose">
					<span class="icon">
						<i class="fab fa-twitter"></i>
					</span>
				</a>
				<a class="navbar-item" href="https://github.com/JoshClose/CsvHelper">
					<span class="icon">
						<i class="fab fa-github"></i>
					</span>
				</a>
			</div>
		</div>
	</nav>
</header>


	<main id="main" class="container is-fluid">
		<div class="columns is-variable is-1">
				<div class="column">
					<div class="content">
						<h1 id="migrating-from-version-21-to-22">Migrating from version 21 to 22</h1>
<h2 id="parsermode">ParserMode</h2>
<p>Name change to <code>CsvMode</code>.</p>
<pre><code class="language-cs">// v21
ParserMode.RFC4180

//v22
CsvMode.RFC4180
</code></pre>
<h2 id="shouldquote">ShouldQuote</h2>
<pre><code class="language-cs">// v21
var config = new CsvConfiguration(CultureInfo.InvariantCulture)
{
	ShouldQuote = (field, context) =&gt; true,
};

// v22
var config = new CsvConfiguration(CultureInfo.InvariantCulture)
{
	ShouldQuote = (field, context, row) =&gt; true,
};
</code></pre>
<h2 id="enumconverter">EnumConverter</h2>
<p><code>EnumConverter</code> was changed to case sensitive by default.</p>
<p>If you want Enums to ignore case, you need to set a type converter option.</p>
<pre><code class="language-cs">Map(m =&gt; m.Property).TypeConverterOption.EnumIgnoreCase();
</code></pre>
<h2 id="iparserconfiguration">IParserConfiguration</h2>
<ul>
<li>Added <code>ProcessFieldBufferSizse</code>.</li>
</ul>
<p>Any class that implements <code>IParserConfiguration</code> will need these changes applied to it.</p>
<h2 id="iwriterconfiguration">IWriterConfiguration</h2>
<ul>
<li>Added <code>Mode</code>.</li>
</ul>
<p>Any class that implements <code>IWriterConfiguration</code> will need these changes applied to it.</p>

					</div>
				</div>
		</div>
	</main>

	<br /><br />

	<footer id="footer" class="footer">
	<div class="has-text-centered">&copy; 2009-2022 Josh Close</div>
</footer>



	<script>
		hljs.configure({
			tabReplace: "    "
		});
		hljs.initHighlightingOnLoad();
	</script>
	<script src="/CsvHelper/scripts/header.js"></script>
	<script src="/CsvHelper/scripts/sidebar.js"></script>
	
</body>
</html>