File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -85,8 +85,16 @@ private static TryParseApiName GetTryParseApiName(IServiceProvider provider)
8585 {
8686 var serviceDirectory = provider . GetRequiredService < ManagementServiceDirectory > ( ) ;
8787
88- return file => from informationFile in ApiInformationFile . TryParse ( file , serviceDirectory )
89- select informationFile . Parent . Name ;
88+ return file => tryParseNameFromInformationFile ( file ) | tryParseNameFromSpecificationFile ( file ) ;
89+
90+ Option < ApiName > tryParseNameFromInformationFile ( FileInfo file ) =>
91+ from informationFile in ApiInformationFile . TryParse ( file , serviceDirectory )
92+ select informationFile . Parent . Name ;
93+
94+ Option < ApiName > tryParseNameFromSpecificationFile ( FileInfo file ) =>
95+ from apiDirectory in ApiDirectory . TryParse ( file . Directory , serviceDirectory )
96+ where Common . SpecificationFileNames . Contains ( file . Name )
97+ select apiDirectory . Name ;
9098 }
9199
92100 private static void ConfigureIsApiNameInSourceControl ( IHostApplicationBuilder builder )
You can’t perform that action at this time.
0 commit comments