@@ -99,12 +99,7 @@ private struct Size
9999 int scaledSize = ImageScalingHelper . GetScaledSize ( imageSize ) ;
100100
101101 Guid shellItemImageFactoryGuid = new ( "BCC18B79-BA16-442F-80C4-8A59C30C463B" ) ;
102- SHCreateItemFromParsingName (
103- filePath ,
104- IntPtr . Zero ,
105- shellItemImageFactoryGuid ,
106- out imageFactory
107- ) ;
102+ SHCreateItemFromParsingName ( filePath , IntPtr . Zero , shellItemImageFactoryGuid , out imageFactory ) ;
108103
109104 Size size = new ( ) { cx = scaledSize , cy = scaledSize } ;
110105 imageFactory . GetImage ( size , SiigbfResizetofit , out IntPtr hBitmap ) ;
@@ -184,7 +179,12 @@ uint uFlags
184179 private const uint FileAttributeNormal = 0x00000080 ;
185180 private const uint FileAttributeDirectory = 0x00000010 ;
186181
187- public static ImageSource ? GetImage ( string path , bool isFile , int iconSize , Action < ImageSource > ? onUpdated = null )
182+ public static ImageSource ? GetImage (
183+ string path ,
184+ bool isFile ,
185+ int iconSize ,
186+ Action < ImageSource > ? onUpdated = null
187+ )
188188 {
189189 int iconIndexByExt ;
190190 if ( isFile )
@@ -201,7 +201,7 @@ uint uFlags
201201 iconIndexByExt = _fallbackDirectoryIconIndex ;
202202 }
203203
204- var iconByIndexAndScaleCacheKey = iconIndexByExt + "_" + iconSize ;
204+ var iconByIndexAndScaleCacheKey = iconIndexByExt + "_" + iconSize ;
205205 if ( ! IconByIndexAndScaleCache . TryGetValue ( iconByIndexAndScaleCacheKey , out var iconByExtAndScale ) )
206206 {
207207 iconByExtAndScale = GetIconFromSystemImageList ( iconIndexByExt , iconSize ) ;
@@ -244,7 +244,8 @@ private static int GetIconIndex(string path, IconIndexType indexType)
244244 {
245245 fileAttributes = FileAttributeNormal ;
246246 flags |= ShgfiUsefileattributes ;
247- } else if ( indexType == IconIndexType . DirectoryName )
247+ }
248+ else if ( indexType == IconIndexType . DirectoryName )
248249 {
249250 fileAttributes = FileAttributeDirectory ;
250251 flags |= ShgfiUsefileattributes ;
@@ -257,9 +258,9 @@ enum IconIndexType
257258 {
258259 ByFileName ,
259260 ByFilePath ,
260- DirectoryName
261+ DirectoryName ,
261262 }
262-
263+
263264 private const int IldTransparent = 0x00000001 ;
264265 private const int ShilLarge = 0 ;
265266 private const int ShilSmall = 1 ;
0 commit comments