@@ -25,7 +25,7 @@ public partial class ModelInputClass : ModelInputClassBase
25
25
/// </summary>
26
26
public virtual string TransformText ( )
27
27
{
28
- Write ( @"//*****************************************************************************************
28
+ this . Write ( @"//*****************************************************************************************
29
29
//* *
30
30
//* This is an auto-generated file by Microsoft ML.NET CLI (Command-Line Interface) tool. *
31
31
//* *
@@ -34,15 +34,15 @@ public virtual string TransformText()
34
34
using Microsoft.ML.Data;
35
35
36
36
namespace " ) ;
37
- Write ( ToStringHelper . ToStringWithCulture ( Namespace ) ) ;
38
- Write ( ".Model.DataModels\r \n {\r \n public class ModelInput\r \n {\r \n " ) ;
37
+ this . Write ( this . ToStringHelper . ToStringWithCulture ( Namespace ) ) ;
38
+ this . Write ( ".Model.DataModels\r \n {\r \n public class ModelInput\r \n {\r \n " ) ;
39
39
foreach ( var label in ClassLabels ) {
40
- Write ( " " ) ;
41
- Write ( ToStringHelper . ToStringWithCulture ( label ) ) ;
42
- Write ( "\r \n " ) ;
40
+ this . Write ( " " ) ;
41
+ this . Write ( this . ToStringHelper . ToStringWithCulture ( label ) ) ;
42
+ this . Write ( "\r \n " ) ;
43
43
}
44
- Write ( "}\r \n }\r \n " ) ;
45
- return GenerationEnvironment . ToString ( ) ;
44
+ this . Write ( "}\r \n }\r \n " ) ;
45
+ return this . GenerationEnvironment . ToString ( ) ;
46
46
}
47
47
48
48
public IList < string > ClassLabels { get ; set ; }
@@ -72,15 +72,15 @@ protected System.Text.StringBuilder GenerationEnvironment
72
72
{
73
73
get
74
74
{
75
- if ( ( generationEnvironmentField == null ) )
75
+ if ( ( this . generationEnvironmentField == null ) )
76
76
{
77
- generationEnvironmentField = new global ::System . Text . StringBuilder ( ) ;
77
+ this . generationEnvironmentField = new global ::System . Text . StringBuilder ( ) ;
78
78
}
79
- return generationEnvironmentField ;
79
+ return this . generationEnvironmentField ;
80
80
}
81
81
set
82
82
{
83
- generationEnvironmentField = value ;
83
+ this . generationEnvironmentField = value ;
84
84
}
85
85
}
86
86
/// <summary>
@@ -90,11 +90,11 @@ public System.CodeDom.Compiler.CompilerErrorCollection Errors
90
90
{
91
91
get
92
92
{
93
- if ( ( errorsField == null ) )
93
+ if ( ( this . errorsField == null ) )
94
94
{
95
- errorsField = new global ::System . CodeDom . Compiler . CompilerErrorCollection ( ) ;
95
+ this . errorsField = new global ::System . CodeDom . Compiler . CompilerErrorCollection ( ) ;
96
96
}
97
- return errorsField ;
97
+ return this . errorsField ;
98
98
}
99
99
}
100
100
/// <summary>
@@ -104,11 +104,11 @@ private System.Collections.Generic.List<int> indentLengths
104
104
{
105
105
get
106
106
{
107
- if ( ( indentLengthsField == null ) )
107
+ if ( ( this . indentLengthsField == null ) )
108
108
{
109
- indentLengthsField = new global ::System . Collections . Generic . List < int > ( ) ;
109
+ this . indentLengthsField = new global ::System . Collections . Generic . List < int > ( ) ;
110
110
}
111
- return indentLengthsField ;
111
+ return this . indentLengthsField ;
112
112
}
113
113
}
114
114
/// <summary>
@@ -118,7 +118,7 @@ public string CurrentIndent
118
118
{
119
119
get
120
120
{
121
- return currentIndentField ;
121
+ return this . currentIndentField ;
122
122
}
123
123
}
124
124
/// <summary>
@@ -128,11 +128,11 @@ public string CurrentIndent
128
128
{
129
129
get
130
130
{
131
- return sessionField ;
131
+ return this . sessionField ;
132
132
}
133
133
set
134
134
{
135
- sessionField = value ;
135
+ this . sessionField = value ;
136
136
}
137
137
}
138
138
#endregion
@@ -148,59 +148,59 @@ public void Write(string textToAppend)
148
148
}
149
149
// If we're starting off, or if the previous text ended with a newline,
150
150
// we have to append the current indent first.
151
- if ( ( ( GenerationEnvironment . Length == 0 )
152
- || endsWithNewline ) )
151
+ if ( ( ( this . GenerationEnvironment . Length == 0 )
152
+ || this . endsWithNewline ) )
153
153
{
154
- GenerationEnvironment . Append ( currentIndentField ) ;
155
- endsWithNewline = false ;
154
+ this . GenerationEnvironment . Append ( this . currentIndentField ) ;
155
+ this . endsWithNewline = false ;
156
156
}
157
157
// Check if the current text ends with a newline
158
158
if ( textToAppend . EndsWith ( global ::System . Environment . NewLine , global ::System . StringComparison . CurrentCulture ) )
159
159
{
160
- endsWithNewline = true ;
160
+ this . endsWithNewline = true ;
161
161
}
162
162
// This is an optimization. If the current indent is "", then we don't have to do any
163
163
// of the more complex stuff further down.
164
- if ( ( currentIndentField . Length == 0 ) )
164
+ if ( ( this . currentIndentField . Length == 0 ) )
165
165
{
166
- GenerationEnvironment . Append ( textToAppend ) ;
166
+ this . GenerationEnvironment . Append ( textToAppend ) ;
167
167
return ;
168
168
}
169
169
// Everywhere there is a newline in the text, add an indent after it
170
- textToAppend = textToAppend . Replace ( global ::System . Environment . NewLine , ( global ::System . Environment . NewLine + currentIndentField ) ) ;
170
+ textToAppend = textToAppend . Replace ( global ::System . Environment . NewLine , ( global ::System . Environment . NewLine + this . currentIndentField ) ) ;
171
171
// If the text ends with a newline, then we should strip off the indent added at the very end
172
172
// because the appropriate indent will be added when the next time Write() is called
173
- if ( endsWithNewline )
173
+ if ( this . endsWithNewline )
174
174
{
175
- GenerationEnvironment . Append ( textToAppend , 0 , ( textToAppend . Length - currentIndentField . Length ) ) ;
175
+ this . GenerationEnvironment . Append ( textToAppend , 0 , ( textToAppend . Length - this . currentIndentField . Length ) ) ;
176
176
}
177
177
else
178
178
{
179
- GenerationEnvironment . Append ( textToAppend ) ;
179
+ this . GenerationEnvironment . Append ( textToAppend ) ;
180
180
}
181
181
}
182
182
/// <summary>
183
183
/// Write text directly into the generated output
184
184
/// </summary>
185
185
public void WriteLine ( string textToAppend )
186
186
{
187
- Write ( textToAppend ) ;
188
- GenerationEnvironment . AppendLine ( ) ;
189
- endsWithNewline = true ;
187
+ this . Write ( textToAppend ) ;
188
+ this . GenerationEnvironment . AppendLine ( ) ;
189
+ this . endsWithNewline = true ;
190
190
}
191
191
/// <summary>
192
192
/// Write formatted text directly into the generated output
193
193
/// </summary>
194
194
public void Write ( string format , params object [ ] args )
195
195
{
196
- Write ( string . Format ( global ::System . Globalization . CultureInfo . CurrentCulture , format , args ) ) ;
196
+ this . Write ( string . Format ( global ::System . Globalization . CultureInfo . CurrentCulture , format , args ) ) ;
197
197
}
198
198
/// <summary>
199
199
/// Write formatted text directly into the generated output
200
200
/// </summary>
201
201
public void WriteLine ( string format , params object [ ] args )
202
202
{
203
- WriteLine ( string . Format ( global ::System . Globalization . CultureInfo . CurrentCulture , format , args ) ) ;
203
+ this . WriteLine ( string . Format ( global ::System . Globalization . CultureInfo . CurrentCulture , format , args ) ) ;
204
204
}
205
205
/// <summary>
206
206
/// Raise an error
@@ -209,7 +209,7 @@ public void Error(string message)
209
209
{
210
210
System . CodeDom . Compiler . CompilerError error = new global ::System . CodeDom . Compiler . CompilerError ( ) ;
211
211
error . ErrorText = message ;
212
- Errors . Add ( error ) ;
212
+ this . Errors . Add ( error ) ;
213
213
}
214
214
/// <summary>
215
215
/// Raise a warning
@@ -219,7 +219,7 @@ public void Warning(string message)
219
219
System . CodeDom . Compiler . CompilerError error = new global ::System . CodeDom . Compiler . CompilerError ( ) ;
220
220
error . ErrorText = message ;
221
221
error . IsWarning = true ;
222
- Errors . Add ( error ) ;
222
+ this . Errors . Add ( error ) ;
223
223
}
224
224
/// <summary>
225
225
/// Increase the indent
@@ -230,23 +230,23 @@ public void PushIndent(string indent)
230
230
{
231
231
throw new global ::System . ArgumentNullException ( "indent" ) ;
232
232
}
233
- currentIndentField = ( currentIndentField + indent ) ;
234
- indentLengths . Add ( indent . Length ) ;
233
+ this . currentIndentField = ( this . currentIndentField + indent ) ;
234
+ this . indentLengths . Add ( indent . Length ) ;
235
235
}
236
236
/// <summary>
237
237
/// Remove the last indent that was added with PushIndent
238
238
/// </summary>
239
239
public string PopIndent ( )
240
240
{
241
241
string returnValue = "" ;
242
- if ( ( indentLengths . Count > 0 ) )
242
+ if ( ( this . indentLengths . Count > 0 ) )
243
243
{
244
- int indentLength = indentLengths [ ( indentLengths . Count - 1 ) ] ;
245
- indentLengths . RemoveAt ( ( indentLengths . Count - 1 ) ) ;
244
+ int indentLength = this . indentLengths [ ( this . indentLengths . Count - 1 ) ] ;
245
+ this . indentLengths . RemoveAt ( ( this . indentLengths . Count - 1 ) ) ;
246
246
if ( ( indentLength > 0 ) )
247
247
{
248
- returnValue = currentIndentField . Substring ( ( currentIndentField . Length - indentLength ) ) ;
249
- currentIndentField = currentIndentField . Remove ( ( currentIndentField . Length - indentLength ) ) ;
248
+ returnValue = this . currentIndentField . Substring ( ( this . currentIndentField . Length - indentLength ) ) ;
249
+ this . currentIndentField = this . currentIndentField . Remove ( ( this . currentIndentField . Length - indentLength ) ) ;
250
250
}
251
251
}
252
252
return returnValue ;
@@ -256,8 +256,8 @@ public string PopIndent()
256
256
/// </summary>
257
257
public void ClearIndent ( )
258
258
{
259
- indentLengths . Clear ( ) ;
260
- currentIndentField = "" ;
259
+ this . indentLengths . Clear ( ) ;
260
+ this . currentIndentField = "" ;
261
261
}
262
262
#endregion
263
263
#region ToString Helpers
@@ -274,13 +274,13 @@ public System.IFormatProvider FormatProvider
274
274
{
275
275
get
276
276
{
277
- return formatProviderField ;
277
+ return this . formatProviderField ;
278
278
}
279
279
set
280
280
{
281
281
if ( ( value != null ) )
282
282
{
283
- formatProviderField = value ;
283
+ this . formatProviderField = value ;
284
284
}
285
285
}
286
286
}
@@ -303,7 +303,7 @@ public string ToStringWithCulture(object objectToConvert)
303
303
else
304
304
{
305
305
return ( ( string ) ( method . Invoke ( objectToConvert , new object [ ] {
306
- formatProviderField } ) ) ) ;
306
+ this . formatProviderField } ) ) ) ;
307
307
}
308
308
}
309
309
}
@@ -315,7 +315,7 @@ public ToStringInstanceHelper ToStringHelper
315
315
{
316
316
get
317
317
{
318
- return toStringHelperField ;
318
+ return this . toStringHelperField ;
319
319
}
320
320
}
321
321
#endregion
0 commit comments