@@ -45,34 +45,34 @@ internal void RaiseException()
45
45
{
46
46
var sb = new StringBuilder ( _log . Select ( ( e ) => e . Basename ? . Length ?? 0 + e . FullPath ? . Length ?? 0 + 20 )
47
47
. Sum ( ) ) ;
48
- sb . AppendFormat ( "Looking for \" {0}\" RID=\" {1}-{2}\" , IsUnix={3}, IsDotNetCore={4} RelativeSearchPath=\" {5}\" \n " ,
48
+ sb . AppendFormat ( CultureInfo . InvariantCulture , "Looking for \" {0}\" RID=\" {1}-{2}\" , IsUnix={3}, IsDotNetCore={4} RelativeSearchPath=\" {5}\" \n " ,
49
49
Filename ,
50
50
RuntimeFileLocator . PlatformRuntimePrefix . Value ,
51
51
RuntimeFileLocator . ArchitectureSubdir . Value , RuntimeFileLocator . IsUnix ,
52
52
RuntimeFileLocator . IsDotNetCore . Value ,
53
53
AppDomain . CurrentDomain . RelativeSearchPath ) ;
54
54
if ( FirstException != null )
55
55
{
56
- sb . AppendFormat ( "Before searching: {0}\n " , FirstException . Message ) ;
56
+ sb . AppendFormat ( CultureInfo . InvariantCulture , "Before searching: {0}\n " , FirstException . Message ) ;
57
57
}
58
58
59
59
foreach ( var e in _log )
60
60
{
61
61
if ( e . PreviouslyLoaded )
62
62
{
63
- sb . AppendFormat ( "\" {0}\" is already {1}" , e . Basename , Verb ) ;
63
+ sb . AppendFormat ( CultureInfo . InvariantCulture , "\" {0}\" is already {1}" , e . Basename , Verb ) ;
64
64
}
65
65
else if ( ! e . FileExists )
66
66
{
67
- sb . AppendFormat ( "File not found: {0}" , e . FullPath ) ;
67
+ sb . AppendFormat ( CultureInfo . InvariantCulture , "File not found: {0}" , e . FullPath ) ;
68
68
}
69
69
else if ( e . LoadErrorCode . HasValue )
70
70
{
71
71
string errorCode = e . LoadErrorCode . Value < 0
72
72
? string . Format ( CultureInfo . InvariantCulture , "0x{0:X8}" , e . LoadErrorCode . Value )
73
73
: e . LoadErrorCode . Value . ToString ( CultureInfo . InvariantCulture ) ;
74
74
75
- sb . AppendFormat ( "Error \" {0}\" ({1}) loading {2} from {3}" ,
75
+ sb . AppendFormat ( CultureInfo . InvariantCulture , "Error \" {0}\" ({1}) loading {2} from {3}" ,
76
76
new Win32Exception ( e . LoadErrorCode . Value ) . Message ,
77
77
errorCode ,
78
78
e . Basename , e . FullPath ) ;
@@ -83,7 +83,7 @@ internal void RaiseException()
83
83
var installed = Environment . Is64BitProcess ? "32-bit (x86)" : "64-bit (x86_64)" ;
84
84
var needed = Environment . Is64BitProcess ? "64-bit (x86_64)" : "32-bit (x86)" ;
85
85
86
- sb . AppendFormat ( "\n > You have installed a {0} copy of imageflow.dll but need the {1} version" ,
86
+ sb . AppendFormat ( CultureInfo . InvariantCulture , "\n > You have installed a {0} copy of imageflow.dll but need the {1} version" ,
87
87
installed , needed ) ;
88
88
}
89
89
@@ -93,12 +93,12 @@ internal void RaiseException()
93
93
var crtLink = "https://aka.ms/vs/16/release/vc_redist."
94
94
+ ( Environment . Is64BitProcess ? "x64.exe" : "x86.exe" ) ;
95
95
96
- sb . AppendFormat ( "\n > You may need to install the C Runtime from {0}" , crtLink ) ;
96
+ sb . AppendFormat ( CultureInfo . InvariantCulture , "\n > You may need to install the C Runtime from {0}" , crtLink ) ;
97
97
}
98
98
}
99
99
else
100
100
{
101
- sb . AppendFormat ( "{0} {1} in {2}" , Verb , e . Basename , e . FullPath ) ;
101
+ sb . AppendFormat ( CultureInfo . InvariantCulture , "{0} {1} in {2}" , Verb , e . Basename , e . FullPath ) ;
102
102
}
103
103
sb . Append ( '\n ' ) ;
104
104
}
@@ -262,7 +262,7 @@ private static IEnumerable<Tuple<bool, string>> BaseFolders(IEnumerable<string>?
262
262
try {
263
263
// Look in the folder that *this* assembly is located.
264
264
assemblyLocation = Path . GetDirectoryName ( Assembly . GetExecutingAssembly ( ) . Location ) ;
265
-
265
+
266
266
} catch ( NotImplementedException ) {
267
267
// ignored
268
268
}
@@ -352,7 +352,7 @@ private static string GetFilenameWithoutDirectory(string basename) => RuntimeFil
352
352
353
353
private static readonly Lazy < ConcurrentDictionary < string , string > > ExecutablePathsByName = new Lazy < ConcurrentDictionary < string , string > > ( ( ) => new ConcurrentDictionary < string , string > ( StringComparer . OrdinalIgnoreCase ) , LazyThreadSafetyMode . PublicationOnly ) ;
354
354
355
- // Not yet implemented.
355
+ // Not yet implemented.
356
356
// static readonly Lazy<ConcurrentDictionary<string, IntPtr>> LibraryHandlesByFullPath = new Lazy<ConcurrentDictionary<string, IntPtr>>(() => new ConcurrentDictionary<string, IntPtr>(StringComparer.OrdinalIgnoreCase), LazyThreadSafetyMode.PublicationOnly);
357
357
358
358
/// <summary>
@@ -429,7 +429,7 @@ internal static class NativeLibraryLoader
429
429
caughtException = b ;
430
430
}
431
431
432
- //Try loading
432
+ //Try loading
433
433
var logger = new LoadLogger
434
434
{ FirstException = caughtException , Filename = GetFilenameWithoutDirectory ( basename ) } ;
435
435
if ( TryLoadByBasename ( basename , logger , out _ , customSearchDirectories ) )
@@ -449,7 +449,7 @@ internal static class NativeLibraryLoader
449
449
450
450
private static readonly Lazy < ConcurrentDictionary < string , IntPtr > > LibraryHandlesByBasename = new Lazy < ConcurrentDictionary < string , IntPtr > > ( ( ) => new ConcurrentDictionary < string , IntPtr > ( StringComparer . OrdinalIgnoreCase ) , LazyThreadSafetyMode . PublicationOnly ) ;
451
451
452
- // Not yet implemented.
452
+ // Not yet implemented.
453
453
// static readonly Lazy<ConcurrentDictionary<string, IntPtr>> LibraryHandlesByFullPath = new Lazy<ConcurrentDictionary<string, IntPtr>>(() => new ConcurrentDictionary<string, IntPtr>(StringComparer.OrdinalIgnoreCase), LazyThreadSafetyMode.PublicationOnly);
454
454
455
455
/// <summary>
@@ -536,7 +536,7 @@ internal static class WindowsLoadLibrary
536
536
537
537
public static IntPtr Execute ( string fileName )
538
538
{
539
- // Look in the library dir instead of the process dir
539
+ // Look in the library dir instead of the process dir
540
540
const uint loadWithAlteredSearchPath = 0x00000008 ;
541
541
return LoadLibraryEx ( fileName , IntPtr . Zero , loadWithAlteredSearchPath ) ;
542
542
}
0 commit comments