File tree Expand file tree Collapse file tree 2 files changed +3
-27
lines changed Expand file tree Collapse file tree 2 files changed +3
-27
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ namespace BlazorApexCharts
6
6
{
7
7
public class ChartSerializer
8
8
{
9
- private static Dictionary < string , JsonSerializerOptions > _serializerOptions = new Dictionary < string , JsonSerializerOptions > ( ) ;
9
+ private static Dictionary < object , JsonSerializerOptions > _serializerOptions = new Dictionary < object , JsonSerializerOptions > ( ) ;
10
10
11
11
private JsonSerializerOptions GenerateOptions < TItem > ( ) where TItem : class
12
12
{
@@ -24,7 +24,7 @@ private JsonSerializerOptions GenerateOptions<TItem>() where TItem : class
24
24
25
25
public JsonSerializerOptions GetOptions < TItem > ( ) where TItem : class
26
26
{
27
- string key = typeof ( TItem ) . ToString ( ) ;
27
+ var key = typeof ( TItem ) ;
28
28
if ( _serializerOptions . ContainsKey ( key ) )
29
29
{
30
30
return _serializerOptions [ key ] ;
Original file line number Diff line number Diff line change @@ -17,29 +17,5 @@ public class DataPoint<TItem> : IDataPoint<TItem>
17
17
public IEnumerable < TItem > Items { get ; set ; }
18
18
19
19
}
20
-
21
- //public class DataPointComparer<TItem> : IEqualityComparer<IDataPoint<TItem>>
22
- //{
23
- // public bool Equals(IDataPoint<TItem> dataPoint1, IDataPoint<TItem> dataPoint2)
24
- // {
25
- // if (dataPoint1 == null && dataPoint2 == null) { return true; }
26
- // if (dataPoint1 == null || dataPoint2 == null) { return false; }
27
-
28
- // IDataPoint<TItem> point1 = dataPoint1;
29
- // IDataPoint<TItem> point2 = dataPoint2;
30
-
31
- // //if (point1.X.ToString() != point2.X.ToString() || point1.YObject != point2.YObject) return false;
32
- // if (point1.X.ToString() != point2.X.ToString()) return false;
33
-
34
-
35
- // return true;
36
- // }
37
-
38
-
39
-
40
- // public int GetHashCode([DisallowNull] IDataPoint<TItem> obj)
41
- // {
42
- // return obj.X.GetHashCode();
43
- // }
44
- //}
20
+
45
21
}
You can’t perform that action at this time.
0 commit comments