File tree Expand file tree Collapse file tree 3 files changed +55
-8
lines changed
src/Umbraco.Core/Configuration/UmbracoSettings Expand file tree Collapse file tree 3 files changed +55
-8
lines changed Original file line number Diff line number Diff line change
1
+ namespace Umbraco . Cms . Core . Configuration . UmbracoSettings
2
+ {
3
+ public class CharacterReplacement
4
+ {
5
+ /// <summary>
6
+ /// The character to replace
7
+ /// </summary>
8
+ public string Char { get ; set ; }
9
+
10
+ /// <summary>
11
+ /// The replacement character
12
+ /// </summary>
13
+ public string Replacement { get ; set ; }
14
+ }
15
+ }
Original file line number Diff line number Diff line change
1
+ using System . Collections . Generic ;
2
+
3
+ namespace Umbraco . Cms . Core . Configuration . UmbracoSettings
4
+ {
5
+ public class CharacterReplacementEqualityComparer : IEqualityComparer < CharacterReplacement >
6
+ {
7
+ public bool Equals ( CharacterReplacement x , CharacterReplacement y )
8
+ {
9
+ if ( ReferenceEquals ( x , y ) )
10
+ {
11
+ return true ;
12
+ }
13
+
14
+ if ( x is null )
15
+ {
16
+ return false ;
17
+ }
18
+
19
+ if ( y is null )
20
+ {
21
+ return false ;
22
+ }
23
+
24
+ if ( x . GetType ( ) != y . GetType ( ) )
25
+ {
26
+ return false ;
27
+ }
28
+
29
+ return x . Char == y . Char && x . Replacement == y . Replacement ;
30
+ }
31
+
32
+ public int GetHashCode ( CharacterReplacement obj )
33
+ {
34
+ unchecked
35
+ {
36
+ return ( ( obj . Char != null ? obj . Char . GetHashCode ( ) : 0 ) * 397 ) ^ ( obj . Replacement != null ? obj . Replacement . GetHashCode ( ) : 0 ) ;
37
+ }
38
+ }
39
+ }
40
+ }
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments