forked from dotnet/runtime
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCodeCompilerTests.cs
More file actions
669 lines (538 loc) · 28.9 KB
/
CodeCompilerTests.cs
File metadata and controls
669 lines (538 loc) · 28.9 KB
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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Collections.Generic;
using System.IO;
using Xunit;
namespace System.CodeDom.Compiler.Tests
{
public class CodeCompilerTests
{
public static IEnumerable<object[]> CodeCompileUnit_TestData()
{
yield return new object[] { null };
yield return new object[] { new CodeCompileUnit() };
var unit = new CodeCompileUnit();
unit.ReferencedAssemblies.Add("assembly1");
unit.ReferencedAssemblies.Add("assembly2");
yield return new object[] { unit };
var referencedUnit = new CodeCompileUnit();
referencedUnit.ReferencedAssemblies.Add("referenced");
referencedUnit.ReferencedAssemblies.Add("assembly1");
yield return new object[] { referencedUnit };
}
[Theory]
[MemberData(nameof(CodeCompileUnit_TestData))]
public void CompileAssemblyFromDom_ValidCodeCompileUnit_ReturnsExpected(CodeCompileUnit compilationUnit)
{
ICodeCompiler compiler = new StubCompiler();
var options = new CompilerParameters();
options.ReferencedAssemblies.Add("referenced");
Assert.Null(compiler.CompileAssemblyFromDom(options, compilationUnit));
}
[Theory]
[MemberData(nameof(CodeCompileUnit_TestData))]
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void CompileAssemblyFromDom_ValidCodeCompileUnit_ThrowsPlatformNotSupportedException(CodeCompileUnit compilationUnit)
{
ICodeCompiler compiler = new Compiler();
var options = new CompilerParameters();
options.ReferencedAssemblies.Add("referenced");
Assert.Throws<PlatformNotSupportedException>(() => compiler.CompileAssemblyFromDom(options, compilationUnit));
}
[Fact]
public void CompileAssemblyFromDom_NullOptions_ThrowsArgumentNullException()
{
ICodeCompiler compiler = new Compiler();
AssertExtensions.Throws<ArgumentNullException>("options", () => compiler.CompileAssemblyFromDom(null, new CodeCompileUnit()));
}
[Theory]
[MemberData(nameof(CodeCompileUnit_TestData))]
public void FromDom_ValidCodeCompileUnit_ReturnsExpected(CodeCompileUnit compilationUnit)
{
var compiler = new StubCompiler();
var options = new CompilerParameters();
options.ReferencedAssemblies.Add("referenced");
Assert.Null(compiler.FromDomEntryPoint(options, compilationUnit));
}
[Theory]
[MemberData(nameof(CodeCompileUnit_TestData))]
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void FromDom_ValidCodeCompileUnit_ThrowsPlatformNotSupportedException(CodeCompileUnit compilationUnit)
{
var compiler = new Compiler();
var options = new CompilerParameters();
options.ReferencedAssemblies.Add("referenced");
Assert.Throws<PlatformNotSupportedException>(() => compiler.FromDomEntryPoint(options, compilationUnit));
}
[Fact]
public void FromDom_NullOptions_ThrowsArgumentNullException()
{
var compiler = new Compiler();
AssertExtensions.Throws<ArgumentNullException>("options", () => compiler.FromDomEntryPoint(null, new CodeCompileUnit()));
}
public static IEnumerable<object[]> CodeCompileUnits_TestData()
{
yield return new object[] { new CodeCompileUnit[0] };
yield return new object[] { new CodeCompileUnit[] { null } };
var unit = new CodeCompileUnit();
unit.ReferencedAssemblies.Add("assembly1");
unit.ReferencedAssemblies.Add("assembly2");
yield return new object[] { new CodeCompileUnit[] { new CodeCompileUnit(), unit } };
}
[Theory]
[MemberData(nameof(CodeCompileUnits_TestData))]
public void CompileAssemblyFromDomBatch_ValidCodeCompileUnits_ReturnsExpected(CodeCompileUnit[] compilationUnits)
{
ICodeCompiler compiler = new StubCompiler();
Assert.Null(compiler.CompileAssemblyFromDomBatch(new CompilerParameters(), compilationUnits));
}
[Theory]
[MemberData(nameof(CodeCompileUnits_TestData))]
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void CompileAssemblyFromDomBatch_ValidCodeCompileUnits_ThrowsPlatformNotSupportedException(CodeCompileUnit[] compilationUnits)
{
ICodeCompiler compiler = new Compiler();
Assert.Throws<PlatformNotSupportedException>(() => compiler.CompileAssemblyFromDomBatch(new CompilerParameters(), compilationUnits));
}
[Fact]
public void CompileAssemblyFromDomBatch_NullOptions_ThrowsArgumentNullException()
{
ICodeCompiler compiler = new Compiler();
AssertExtensions.Throws<ArgumentNullException>("options", () => compiler.CompileAssemblyFromDomBatch(null, new CodeCompileUnit[0]));
}
[Fact]
public void CompileAssemblyFromDomBatch_NullCompileUnits_ThrowsArgumentNullException()
{
ICodeCompiler compiler = new Compiler();
AssertExtensions.Throws<ArgumentNullException>("ea", () => compiler.CompileAssemblyFromDomBatch(new CompilerParameters(), null));
}
[Theory]
[MemberData(nameof(CodeCompileUnits_TestData))]
public void FromDomBatch_ValidCodeCompileUnits_ReturnsExpected(CodeCompileUnit[] compilationUnits)
{
var compiler = new StubCompiler();
Assert.Null(compiler.FromDomBatchEntryPoint(new CompilerParameters(), compilationUnits));
}
[Theory]
[MemberData(nameof(CodeCompileUnits_TestData))]
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void FromDomBatch_ValidCodeCompileUnits_ThrowsPlatformNotSupportedException(CodeCompileUnit[] compilationUnits)
{
var compiler = new Compiler();
Assert.Throws<PlatformNotSupportedException>(() => compiler.FromDomBatchEntryPoint(new CompilerParameters(), compilationUnits));
}
[Fact]
public void FromDomBatch_NullOptions_ThrowsArgumentNullException()
{
var compiler = new Compiler();
AssertExtensions.Throws<ArgumentNullException>("options", () => compiler.FromDomBatchEntryPoint(null, new CodeCompileUnit[0]));
}
[Fact]
public void FromDomBatch_NullCompileUnits_ThrowsArgumentNullException()
{
var compiler = new Compiler();
AssertExtensions.Throws<ArgumentNullException>("ea", () => compiler.FromDomBatchEntryPoint(new CompilerParameters(), null));
}
[Fact]
public void CompileAssemblyFromFile_FileExists_ReturnsExpected()
{
ICodeCompiler compiler = new StubCompiler();
using (var file = new TempFile(Path.GetTempFileName(), 0))
{
Assert.Null(compiler.CompileAssemblyFromFile(new CompilerParameters(), file.Path));
}
}
[Fact]
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void CompileAssemblyFromFile_FileExists_ThrowsPlatformNotSupportedException()
{
ICodeCompiler compiler = new Compiler();
using (var file = new TempFile(Path.GetTempFileName(), 0))
{
Assert.Throws<PlatformNotSupportedException>(() => compiler.CompileAssemblyFromFile(new CompilerParameters(), file.Path));
}
}
[Fact]
public void CompileAssemblyFromFile_NullOptions_ThrowsArgumentNullException()
{
ICodeCompiler compiler = new Compiler();
AssertExtensions.Throws<ArgumentNullException>("options", () => compiler.CompileAssemblyFromFile(null, "fileName"));
}
[Fact]
public void CompileAssemblyFromFile_NullFileName_ThrowsArgumentNullException()
{
ICodeCompiler compiler = new Compiler();
AssertExtensions.Throws<ArgumentNullException>("fileName", () => compiler.CompileAssemblyFromFile(new CompilerParameters(), null));
}
[Fact]
public void CompileAssemblyFromFile_EmptyFileName_ThrowsArgumentException()
{
ICodeCompiler compiler = new Compiler();
AssertExtensions.Throws<ArgumentException>("path", null, () => compiler.CompileAssemblyFromFile(new CompilerParameters(), ""));
}
[Fact]
public void CompileAssemblyFromFile_NoSuchFile_ThrowsFileNotFoundException()
{
ICodeCompiler compiler = new Compiler();
Assert.Throws<FileNotFoundException>(() => compiler.CompileAssemblyFromFile(new CompilerParameters(), "noSuchFile"));
}
[Fact]
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void FromFile_FileExists_ThrowsPlatformNotSupportedException()
{
var compiler = new Compiler();
using (var file = new TempFile(Path.GetTempFileName(), 0))
{
Assert.Throws<PlatformNotSupportedException>(() => compiler.FromFileEntryPoint(new CompilerParameters(), file.Path));
}
}
[Fact]
public void FromFile_NullOptions_ThrowsArgumentNullException()
{
var compiler = new Compiler();
AssertExtensions.Throws<ArgumentNullException>("options", () => compiler.FromFileEntryPoint(null, "fileName"));
}
[Fact]
public void FromFile_NullFileName_ThrowsArgumentNullException()
{
var compiler = new Compiler();
AssertExtensions.Throws<ArgumentNullException>("fileName", () => compiler.FromFileEntryPoint(new CompilerParameters(), null));
}
[Fact]
public void FromFile_EmptyFileName_ThrowsArgumentException()
{
var compiler = new Compiler();
AssertExtensions.Throws<ArgumentException>("path", null, () => compiler.FromFileEntryPoint(new CompilerParameters(), ""));
}
[Fact]
public void FromFile_NoSuchFile_ThrowsFileNotFoundException()
{
var compiler = new Compiler();
Assert.Throws<FileNotFoundException>(() => compiler.FromFileEntryPoint(new CompilerParameters(), "noSuchFile"));
}
[Fact]
public void CompileAssemblyFromFileBatch_ValidFileNames_ReturnsExpected()
{
using (var file = new TempFile(Path.GetTempFileName(), 0))
{
ICodeCompiler compiler = new StubCompiler();
Assert.Null(compiler.CompileAssemblyFromFileBatch(new CompilerParameters(), new string[] { file.Path }));
}
}
[Fact]
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void CompileAssemblyFromFileBatch_ValidFileNames_ThrowsPlatformNotSupportedException()
{
using (var file = new TempFile(Path.GetTempFileName(), 0))
{
ICodeCompiler compiler = new Compiler();
Assert.Throws<PlatformNotSupportedException>(() => compiler.CompileAssemblyFromFileBatch(new CompilerParameters(), new string[] { file.Path }));
}
}
[Fact]
public void CompileAssemblyFromFileBatch_NullOptions_ThrowsArgumentNullException()
{
ICodeCompiler compiler = new Compiler();
AssertExtensions.Throws<ArgumentNullException>("options", () => compiler.CompileAssemblyFromFileBatch(null, new string[0]));
}
[Fact]
public void CompileAssemblyFromFileBatch_NullFileNames_ThrowsArgumentNullException()
{
ICodeCompiler compiler = new Compiler();
AssertExtensions.Throws<ArgumentNullException>("fileNames", () => compiler.CompileAssemblyFromFileBatch(new CompilerParameters(), null));
}
[Fact]
public void CompileAssemblyFromFileBatch_NullFileNameInFileNames_ThrowsArgumentNullException()
{
ICodeCompiler compiler = new Compiler();
AssertExtensions.Throws<ArgumentNullException>("path", () => compiler.CompileAssemblyFromFileBatch(new CompilerParameters(), new string[] { null }));
}
[Fact]
public void CompileAssemblyFromFileBatch_EmptyFileNameInFileNames_ThrowsArgumentException()
{
ICodeCompiler compiler = new Compiler();
AssertExtensions.Throws<ArgumentException>("path", null, () => compiler.CompileAssemblyFromFileBatch(new CompilerParameters(), new string[] { "" }));
}
[Fact]
public void CompileAssemblyFromFileBatch_NoSuchFileInFileNames_ThrowsFileNotFoundException()
{
ICodeCompiler compiler = new Compiler();
Assert.Throws<FileNotFoundException>(() => compiler.CompileAssemblyFromFileBatch(new CompilerParameters(), new string[] { "noSuchFile" }));
}
public static IEnumerable<object[]> FromFileBatch_TestData()
{
yield return new object[] { new string[0] };
yield return new object[] { new string[] { null } };
yield return new object[] { new string[] { "" } };
yield return new object[] { new string[] { "noSuchFile" } };
}
[Theory]
[MemberData(nameof(FromFileBatch_TestData))]
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void FromFileBatch_ValidFileNames_ThrowsPlatformNotSupportedException(string[] fileNames)
{
var compiler = new Compiler();
Assert.Throws<PlatformNotSupportedException>(() => compiler.FromFileBatchEntryPoint(new CompilerParameters(), fileNames));
}
[Fact]
public void FromFileBatch_NullOptions_ThrowsArgumentNullException()
{
var compiler = new Compiler();
AssertExtensions.Throws<ArgumentNullException>("options", () => compiler.FromFileBatchEntryPoint(null, new string[0]));
}
[Fact]
public void FromFileBatch_NullFileNames_ThrowsArgumentNullException()
{
var compiler = new Compiler();
AssertExtensions.Throws<ArgumentNullException>("fileNames", () => compiler.FromFileBatchEntryPoint(new CompilerParameters(), null));
}
public static IEnumerable<object[]> Source_TestData()
{
yield return new object[] { null };
yield return new object[] { "" };
yield return new object[] { "source" };
}
[Theory]
[MemberData(nameof(Source_TestData))]
public void CompileAssemblyFromSource_ValidSource_ReturnsExpected(string source)
{
ICodeCompiler compiler = new StubCompiler();
Assert.Null(compiler.CompileAssemblyFromSource(new CompilerParameters(), source));
}
[Theory]
[MemberData(nameof(Source_TestData))]
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void CompileAssemblyFromSource_ValidSource_ThrowsPlatformNotSupportedException(string source)
{
ICodeCompiler compiler = new Compiler();
Assert.Throws<PlatformNotSupportedException>(() => compiler.CompileAssemblyFromSource(new CompilerParameters(), source));
}
[Fact]
public void CompileAssemblyFromSource_NullOptions_ThrowsArgumentNullException()
{
ICodeCompiler compiler = new Compiler();
AssertExtensions.Throws<ArgumentNullException>("options", () => compiler.CompileAssemblyFromSource(null, "source"));
}
[Theory]
[MemberData(nameof(Source_TestData))]
public void FromSource_ValidSource_ReturnsExpected(string source)
{
var compiler = new StubCompiler();
Assert.Null(compiler.FromSourceEntryPoint(new CompilerParameters(), source));
}
[Theory]
[MemberData(nameof(Source_TestData))]
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void FromSource_ValidSource_ThrowsPlatformNotSupportedException(string source)
{
var compiler = new Compiler();
Assert.Throws<PlatformNotSupportedException>(() => compiler.FromSourceEntryPoint(new CompilerParameters(), source));
}
[Fact]
public void FromSource_NullOptions_ThrowsArgumentNullException()
{
var compiler = new Compiler();
AssertExtensions.Throws<ArgumentNullException>("options", () => compiler.FromSourceEntryPoint(null, "source"));
}
public static IEnumerable<object[]> Sources_TestData()
{
yield return new object[] { new string[0] };
yield return new object[] { new string[] { null } };
yield return new object[] { new string[] { "" } };
yield return new object[] { new string[] { "source1", "source2" } };
}
[Theory]
[MemberData(nameof(Sources_TestData))]
public void CompileAssemblyFromSourceBatch_ValidSources_ReturnsExpected(string[] sources)
{
ICodeCompiler compiler = new StubCompiler();
Assert.Null(compiler.CompileAssemblyFromSourceBatch(new CompilerParameters(), sources));
}
[Theory]
[MemberData(nameof(Sources_TestData))]
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void CompileAssemblyFromSourceBatch_ValidSources_ThrowsPlatformNotSupportedException(string[] sources)
{
ICodeCompiler compiler = new Compiler();
Assert.Throws<PlatformNotSupportedException>(() => compiler.CompileAssemblyFromSourceBatch(new CompilerParameters(), sources));
}
[Fact]
public void CompileAssemblyFromSourceBatch_NullOptions_ThrowsArgumentNullException()
{
ICodeCompiler compiler = new Compiler();
AssertExtensions.Throws<ArgumentNullException>("options", () => compiler.CompileAssemblyFromSourceBatch(null, new string[] { "source" }));
}
[Fact]
public void CompileAssemblyFromSourceBatch_NullSources_ThrowsArgumentNullException()
{
ICodeCompiler compiler = new Compiler();
AssertExtensions.Throws<ArgumentNullException>("sources", () => compiler.CompileAssemblyFromSourceBatch(new CompilerParameters(), null));
}
[Theory]
[MemberData(nameof(Sources_TestData))]
public void FromSourceBatch_ValidSources_ReturnsExpected(string[] sources)
{
var compiler = new StubCompiler();
Assert.Null(compiler.FromSourceBatchEntryPoint(new CompilerParameters(), sources));
}
[Theory]
[MemberData(nameof(Sources_TestData))]
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void FromSourceBatch_ValidSources_ThrowsPlatformNotSupportedException(string[] sources)
{
var compiler = new Compiler();
Assert.Throws<PlatformNotSupportedException>(() => compiler.FromSourceBatchEntryPoint(new CompilerParameters(), sources));
}
[Fact]
public void FromSourceBatch_NullOptions_ThrowsArgumentNullException()
{
var compiler = new Compiler();
AssertExtensions.Throws<ArgumentNullException>("options", () => compiler.FromSourceBatchEntryPoint(null, new string[] { "source" }));
}
[Fact]
public void FromSourceBatch_NullSources_ThrowsArgumentNullException()
{
var compiler = new Compiler();
AssertExtensions.Throws<ArgumentNullException>("sources", () => compiler.FromSourceBatchEntryPoint(new CompilerParameters(), null));
}
[Theory]
[InlineData(null)]
[InlineData("")]
[InlineData("cmdArgs")]
public void GetResponseFileCmdArgs_ValidCmdArgs_ReturnsExpected(string cmdArgs)
{
var compiler = new Compiler();
string args = compiler.GetResponseFileCmdArgsEntryPoint(new CompilerParameters(), cmdArgs);
Assert.StartsWith("@\"", args);
Assert.EndsWith("\"", args);
}
[Fact]
public void GetResponseFileCmdArgs_NullOptions_ThrowsNullReferenceException()
{
var compiler = new Compiler();
Assert.Throws<NullReferenceException>(() => compiler.GetResponseFileCmdArgsEntryPoint(null, "cmdArgs"));
}
public static IEnumerable<object[]> JoinStringArray_TestData()
{
yield return new object[] { null, ", ", "" };
yield return new object[] { new string[0], ", ", "" };
yield return new object[] { new string[] { "a" }, ", ", "\"a\"" };
yield return new object[] { new string[] { "a", "b" }, ", ", "\"a\", \"b\"" };
yield return new object[] { new string[] { "a", "b" }, null, "\"a\"\"b\"" };
yield return new object[] { new string[] { "a", "b" }, "", "\"a\"\"b\"" };
}
[Theory]
[MemberData(nameof(JoinStringArray_TestData))]
public void JoinStringArray_Invoke_ReturnsExpected(string[] sa, string separator, string expected)
{
var compiler = new Compiler();
Assert.Equal(expected, compiler.JoinStringArrayEntryPoint(sa, separator));
}
public class Compiler : CodeCompiler
{
public CompilerResults FromDomEntryPoint(CompilerParameters options, CodeCompileUnit e) => FromDom(options, e);
public CompilerResults FromDomBatchEntryPoint(CompilerParameters options, CodeCompileUnit[] ea) => FromDomBatch(options, ea);
public CompilerResults FromFileEntryPoint(CompilerParameters options, string fileName) => FromFile(options, fileName);
public CompilerResults FromFileBatchEntryPoint(CompilerParameters options, string[] fileNames) => FromFileBatch(options, fileNames);
public CompilerResults FromSourceEntryPoint(CompilerParameters options, string source) => FromSource(options, source);
public CompilerResults FromSourceBatchEntryPoint(CompilerParameters options, string[] sources) => FromSourceBatch(options, sources);
public string GetResponseFileCmdArgsEntryPoint(CompilerParameters options, string cmdArgs) => GetResponseFileCmdArgs(options, cmdArgs);
public string JoinStringArrayEntryPoint(string[] sa, string separator) => JoinStringArray(sa, separator);
protected override string CompilerName => throw new NotImplementedException();
protected override string FileExtension => ".cs";
protected override string NullToken => throw new NotImplementedException();
protected override string CmdArgsFromParameters(CompilerParameters options)
{
throw new NotImplementedException();
}
protected override string CreateEscapedIdentifier(string value)
{
throw new NotImplementedException();
}
protected override string CreateValidIdentifier(string value)
{
throw new NotImplementedException();
}
protected override void GenerateArgumentReferenceExpression(CodeArgumentReferenceExpression e) { }
protected override void GenerateArrayCreateExpression(CodeArrayCreateExpression e) { }
protected override void GenerateArrayIndexerExpression(CodeArrayIndexerExpression e) { }
protected override void GenerateAssignStatement(CodeAssignStatement e) { }
protected override void GenerateAttachEventStatement(CodeAttachEventStatement e) { }
protected override void GenerateAttributeDeclarationsEnd(CodeAttributeDeclarationCollection attributes) { }
protected override void GenerateAttributeDeclarationsStart(CodeAttributeDeclarationCollection attributes) { }
protected override void GenerateBaseReferenceExpression(CodeBaseReferenceExpression e) { }
protected override void GenerateCastExpression(CodeCastExpression e) { }
protected override void GenerateComment(CodeComment e) { }
protected override void GenerateConditionStatement(CodeConditionStatement e) { }
protected override void GenerateConstructor(CodeConstructor e, CodeTypeDeclaration c) { }
protected override void GenerateDelegateCreateExpression(CodeDelegateCreateExpression e) { }
protected override void GenerateDelegateInvokeExpression(CodeDelegateInvokeExpression e) { }
protected override void GenerateEntryPointMethod(CodeEntryPointMethod e, CodeTypeDeclaration c) { }
protected override void GenerateEvent(CodeMemberEvent e, CodeTypeDeclaration c) { }
protected override void GenerateEventReferenceExpression(CodeEventReferenceExpression e) { }
protected override void GenerateExpressionStatement(CodeExpressionStatement e) { }
protected override void GenerateField(CodeMemberField e) { }
protected override void GenerateFieldReferenceExpression(CodeFieldReferenceExpression e) { }
protected override void GenerateGotoStatement(CodeGotoStatement e) { }
protected override void GenerateIndexerExpression(CodeIndexerExpression e) { }
protected override void GenerateIterationStatement(CodeIterationStatement e) { }
protected override void GenerateLabeledStatement(CodeLabeledStatement e) { }
protected override void GenerateLinePragmaEnd(CodeLinePragma e) { }
protected override void GenerateLinePragmaStart(CodeLinePragma e) { }
protected override void GenerateMethod(CodeMemberMethod e, CodeTypeDeclaration c) { }
protected override void GenerateMethodInvokeExpression(CodeMethodInvokeExpression e) { }
protected override void GenerateMethodReferenceExpression(CodeMethodReferenceExpression e) { }
protected override void GenerateMethodReturnStatement(CodeMethodReturnStatement e) { }
protected override void GenerateNamespaceEnd(CodeNamespace e) { }
protected override void GenerateNamespaceImport(CodeNamespaceImport e) { }
protected override void GenerateNamespaceStart(CodeNamespace e) { }
protected override void GenerateObjectCreateExpression(CodeObjectCreateExpression e) { }
protected override void GenerateProperty(CodeMemberProperty e, CodeTypeDeclaration c) { }
protected override void GeneratePropertyReferenceExpression(CodePropertyReferenceExpression e) { }
protected override void GeneratePropertySetValueReferenceExpression(CodePropertySetValueReferenceExpression e) { }
protected override void GenerateRemoveEventStatement(CodeRemoveEventStatement e) { }
protected override void GenerateSnippetExpression(CodeSnippetExpression e) { }
protected override void GenerateSnippetMember(CodeSnippetTypeMember e) { }
protected override void GenerateThisReferenceExpression(CodeThisReferenceExpression e) { }
protected override void GenerateThrowExceptionStatement(CodeThrowExceptionStatement e) { }
protected override void GenerateTryCatchFinallyStatement(CodeTryCatchFinallyStatement e) { }
protected override void GenerateTypeConstructor(CodeTypeConstructor e) { }
protected override void GenerateTypeEnd(CodeTypeDeclaration e) { }
protected override void GenerateTypeStart(CodeTypeDeclaration e) { }
protected override void GenerateVariableDeclarationStatement(CodeVariableDeclarationStatement e) { }
protected override void GenerateVariableReferenceExpression(CodeVariableReferenceExpression e) { }
protected override string GetTypeOutput(CodeTypeReference value)
{
throw new NotImplementedException();
}
protected override bool IsValidIdentifier(string value)
{
throw new NotImplementedException();
}
protected override void OutputType(CodeTypeReference typeRef)
{
throw new NotImplementedException();
}
protected override void ProcessCompilerOutputLine(CompilerResults results, string line)
{
throw new NotImplementedException();
}
protected override string QuoteSnippetString(string value)
{
throw new NotImplementedException();
}
protected override bool Supports(GeneratorSupport support)
{
throw new NotImplementedException();
}
}
public class StubCompiler : Compiler
{
protected override CompilerResults FromFileBatch(CompilerParameters options, string[] fileNames)
{
return null;
}
}
}
}