Skip to content

Commit 1ee4e37

Browse files
committed
Update classes
Update class names, and location
1 parent c2ed6a6 commit 1ee4e37

File tree

3 files changed

+55
-8
lines changed

3 files changed

+55
-8
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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+
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
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+
}

src/Umbraco.Core/Configuration/UmbracoSettings/IChar.cs

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)