44using  System . Collections . Generic ; 
55using  System . Diagnostics ; 
66using  System . Diagnostics . CodeAnalysis ; 
7- using  System . Globalization ; 
87using  System . IO ; 
98using  System . Linq ; 
109using  System . Net ; 
@@ -2120,7 +2119,7 @@ private List<FileInfo> InternalSynchronizeDirectories(string sourcePath, string
21202119        { 
21212120            if  ( ! Directory . Exists ( sourcePath ) ) 
21222121            { 
2123-                 throw  new  FileNotFoundException ( string . Format ( "Source directory not found: {0}"  ,   sourcePath ) ) ; 
2122+                 throw  new  FileNotFoundException ( $ "Source directory not found: { sourcePath } " ) ; 
21242123            } 
21252124
21262125            var  uploadedFiles  =  new  List < FileInfo > ( ) ; 
@@ -2170,7 +2169,7 @@ private List<FileInfo> InternalSynchronizeDirectories(string sourcePath, string
21702169
21712170                    if  ( isDifferent ) 
21722171                    { 
2173-                         var  remoteFileName  =  string . Format ( CultureInfo . InvariantCulture ,   @"{0 }/{1}" ,   destinationPath ,   localFile . Name ) ; 
2172+                         var  remoteFileName  =  $ " { destinationPath } /{ localFile . Name } " ; 
21742173                        try 
21752174                        { 
21762175                            using  ( var  file  =  File . OpenRead ( localFile . FullName ) ) 
@@ -2237,7 +2236,7 @@ private List<ISftpFile> InternalListDirectory(string path, SftpListDirectoryAsyn
22372236            if  ( ! basePath . EndsWith ( "/" ,  StringComparison . Ordinal ) ) 
22382237#endif
22392238            { 
2240-                 basePath  =  string . Format ( "{0 }/",   fullPath ) ; 
2239+                 basePath  =  $ " { fullPath } /"; 
22412240            } 
22422241
22432242            var  result  =  new  List < ISftpFile > ( ) ; 
@@ -2249,7 +2248,7 @@ private List<ISftpFile> InternalListDirectory(string path, SftpListDirectoryAsyn
22492248                foreach  ( var  f  in  files ) 
22502249                { 
22512250                    result . Add ( new  SftpFile ( _sftpSession , 
2252-                                             string . Format ( CultureInfo . InvariantCulture ,   "{0}{1}" ,   basePath ,   f . Key ) , 
2251+                                             $ " { basePath } { f . Key } " , 
22532252                                            f . Value ) ) ; 
22542253                } 
22552254
0 commit comments