Skip to content

Commit c1e8f7b

Browse files
committed
Clean code
Remove Old PCL/ NETCORE1.x.NERSTANDARD1.x specificity
1 parent 8f4b290 commit c1e8f7b

File tree

3 files changed

+3
-24
lines changed

3 files changed

+3
-24
lines changed

Sources/AuditTrail/AuditTrailViewModel.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,7 @@ public AuditTrailViewModel()
7878
{
7979
_Current = this;
8080
};
81-
82-
//Logs = new List<AuditTrail>();
81+
8382
Logs = new ObservableCollection<AuditTrail>();
8483

8584
Logs.Add(new AuditTrail { Message = "Welcome to AT ..." });

Sources/CS/ObjectExtensions.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@
44
//using System.Threading.Tasks;
55
using System.Reflection;
66
using System.Diagnostics;
7-
8-
#if !PCL
97
using System.Data;
10-
#endif
118

129

1310
namespace ZPF
@@ -111,7 +108,7 @@ public static void CopyPropertyValues(this object destination, object source, bo
111108
}
112109
}
113110

114-
#if !PCL && !NETCOREAPP1_0 && !NETSTANDARD1_2 && !NETSTANDARD1_3 && !NETSTANDARD1_4
111+
115112
public static void CopyDataRowValues(this object destination, DataRow source, bool IgnoreCase = false, bool ToUniversalTime = false )
116113
{
117114
if (destination is IEnumerable)
@@ -348,6 +345,6 @@ public static void CopyDataRowValues(this object destination, DataRow source, bo
348345
}
349346
}
350347
}
351-
#endif
348+
352349
}
353350
}

Sources/CS/PhoneticKey.cs

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -143,27 +143,10 @@ public static string RemoveDiacritics(string text)
143143
}
144144
string Result = text;
145145

146-
#if WebService
147-
string formD = text.Normalize(NormalizationForm.FormD);
148-
StringBuilder sb = new StringBuilder();
149146

150-
foreach (char ch in formD)
151-
{
152-
UnicodeCategory uc = CharUnicodeInfo.GetUnicodeCategory(ch);
153-
if (uc != UnicodeCategory.NonSpacingMark)
154-
{
155-
sb.Append(ch);
156-
}
157-
}
158-
159-
Result = sb.ToString().Normalize(NormalizationForm.FormC);
160-
#endif
161-
162-
#if NETFX_CORE || NETSTANDARD2_0
163147
byte[] tempBytes;
164148
tempBytes = System.Text.Encoding.GetEncoding("ISO-8859-8").GetBytes(text);
165149
Result = System.Text.Encoding.UTF8.GetString(tempBytes,0, text.Length);
166-
#endif
167150

168151
return Result;
169152
}

0 commit comments

Comments
 (0)