33
44using System ;
55using System . Collections . Generic ;
6- using System . IO ;
76using System . Linq ;
87using System . Text . Json ;
98using AutoRest . CSharp . AutoRest . Communication ;
@@ -17,7 +16,6 @@ internal class MgmtTestConfiguration
1716 private const string TestGenOptionsFormat = $ "{ TestGenOptionsRoot } .{{0}}";
1817
1918 public string ? SourceCodePath { get ; }
20- public string ? OutputFolder { get ; }
2119 public bool Sample { get ; }
2220 public IReadOnlyList < string > SkippedOperations { get ; }
2321 public bool ClearOutputFolder { get ; }
@@ -26,13 +24,11 @@ public MgmtTestConfiguration(
2624 IReadOnlyList < string > skippedOperations ,
2725 JsonElement ? sourceCodePath = default ,
2826 JsonElement ? sample = default ,
29- JsonElement ? outputFolder = default ,
3027 JsonElement ? clearOutputFolder = default )
3128 {
3229 SkippedOperations = skippedOperations ;
3330 SourceCodePath = ! Configuration . IsValidJsonElement ( sourceCodePath ) ? null : sourceCodePath . ToString ( ) ;
3431 Sample = Configuration . DeserializeBoolean ( sample , true ) ;
35- OutputFolder = ! Configuration . IsValidJsonElement ( outputFolder ) ? null : Configuration . TrimFileSuffix ( outputFolder . ToString ( ) ?? "" ) ;
3632 ClearOutputFolder = Configuration . DeserializeBoolean ( clearOutputFolder , false ) ;
3733 }
3834
@@ -46,7 +42,6 @@ public MgmtTestConfiguration(
4642 testGenRoot . TryGetProperty ( Options . SkippedOperations , out var skippedOperationsElement ) ;
4743 testGenRoot . TryGetProperty ( Options . SourcePath , out var sourceCodePath ) ;
4844 testGenRoot . TryGetProperty ( Options . Sample , out var sample ) ;
49- testGenRoot . TryGetProperty ( Options . OutputFolder , out var testGenOutputFolder ) ;
5045 testGenRoot . TryGetProperty ( Options . ClearOutputFolder , out var testGenClearOutputFolder ) ;
5146
5247 var skippedOperations = Configuration . DeserializeArray ( skippedOperationsElement ) ;
@@ -55,7 +50,6 @@ public MgmtTestConfiguration(
5550 skippedOperations ,
5651 sourceCodePath : sourceCodePath ,
5752 sample : sample ,
58- outputFolder : testGenOutputFolder ,
5953 clearOutputFolder : testGenClearOutputFolder ) ;
6054 }
6155
@@ -68,7 +62,6 @@ public MgmtTestConfiguration(
6862 skippedOperations : autoRest . GetValue < string [ ] ? > ( string . Format ( TestGenOptionsFormat , "skipped-operations" ) ) . GetAwaiter ( ) . GetResult ( ) ?? Array . Empty < string > ( ) ,
6963 sourceCodePath : autoRest . GetValue < JsonElement ? > ( string . Format ( TestGenOptionsFormat , "source-path" ) ) . GetAwaiter ( ) . GetResult ( ) ,
7064 sample : autoRest . GetValue < JsonElement ? > ( string . Format ( TestGenOptionsFormat , "sample" ) ) . GetAwaiter ( ) . GetResult ( ) ,
71- outputFolder : autoRest . GetValue < JsonElement ? > ( string . Format ( TestGenOptionsFormat , "output-folder" ) ) . GetAwaiter ( ) . GetResult ( ) ,
7265 clearOutputFolder : autoRest . GetValue < JsonElement ? > ( string . Format ( TestGenOptionsFormat , "clear-output-folder" ) ) . GetAwaiter ( ) . GetResult ( ) ) ;
7366 }
7467
@@ -80,8 +73,6 @@ private static class Options
8073
8174 internal const string Sample = "sample" ;
8275
83- internal const string OutputFolder = "output-folder" ;
84-
8576 internal const string ClearOutputFolder = "clear-output-folder" ;
8677 }
8778
@@ -97,9 +88,6 @@ internal void SaveConfiguration(Utf8JsonWriter writer)
9788 if ( Sample )
9889 writer . WriteBoolean ( Options . Sample , Sample ) ;
9990
100- if ( OutputFolder is not null )
101- writer . WriteString ( Options . OutputFolder , Path . GetRelativePath ( Configuration . OutputFolder , OutputFolder ) ) ;
102-
10391 if ( ! ClearOutputFolder )
10492 writer . WriteBoolean ( Options . ClearOutputFolder , ClearOutputFolder ) ;
10593
0 commit comments