File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
Elastic.Documentation.Configuration
Elastic.Documentation/Extensions Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -54,8 +54,9 @@ private StreamReader GetLocalOrEmbedded(EmbeddedResource resource)
5454
5555 private static StreamReader GetEmbeddedStream ( EmbeddedResource resource )
5656 {
57- var stream = resource . GetStream ( ) ;
58- var reader = new StreamReader ( stream , leaveOpen : false ) ;
57+ var name = resource . GetResourceName ( ) . Replace ( ".......config." , "." ) ;
58+ var resourceStream = typeof ( EmbeddedResource ) . Assembly . GetManifestResourceStream ( name ) ! ;
59+ var reader = new StreamReader ( resourceStream , leaveOpen : false ) ;
5960 return reader ;
6061 }
6162
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ public static class IFileInfoExtensions
1010{
1111 public static string ReadToEnd ( this IFileInfo fileInfo )
1212 {
13+ fileInfo . Refresh ( ) ;
1314 if ( ! fileInfo . Exists )
1415 return string . Empty ;
1516
You can’t perform that action at this time.
0 commit comments