File tree Expand file tree Collapse file tree 1 file changed +13
-10
lines changed
src/DistributedCache/Extensions Expand file tree Collapse file tree 1 file changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -4,25 +4,28 @@ namespace DistributedCache.Extensions;
4
4
5
5
public static class StringExtensions
6
6
{
7
- public static string PrefixWith ( this string value , string prefix )
8
- {
9
- return $ "{ prefix } { value } ";
10
- }
11
7
12
- public static string PrefixWith ( this string value , Assembly assembly )
8
+ public static string PrefixWithAssemblyName ( this string value )
13
9
{
14
- return $ "{ assembly . GetName ( ) . Name } :{ value } ";
10
+ var assembly = Assembly . GetCallingAssembly ( ) ;
11
+ return value . PrefixWith ( assembly . GetName ( )
12
+ . Name ! ) ;
15
13
}
16
14
17
- public static List < string > PrefixWith ( this IEnumerable < string > values , string prefix )
15
+ public static List < string > PrefixWithAssemblyName ( this IEnumerable < string > values )
18
16
{
19
- return values . Select ( x => x . PrefixWith ( prefix ) )
17
+ var assembly = Assembly . GetCallingAssembly ( ) . GetName ( ) . Name ;
18
+ return values . Select ( x => x . PrefixWith ( assembly ! ) )
20
19
. ToList ( ) ;
21
20
}
22
21
23
- public static List < string > PrefixWith ( this IEnumerable < string > values , Assembly assembly )
22
+ public static string PrefixWith ( this string value , string prefix )
23
+ {
24
+ return $ "{ prefix } { value } ";
25
+ }
26
+ public static List < string > PrefixWith ( this IEnumerable < string > values , string prefix )
24
27
{
25
- return values . Select ( x => x . PrefixWith ( assembly ) )
28
+ return values . Select ( x => x . PrefixWith ( prefix ) )
26
29
. ToList ( ) ;
27
30
}
28
31
}
You can’t perform that action at this time.
0 commit comments