Changeset 2993 for trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/KeyValuePairSerializer.cs
- Timestamp:
- 03/10/10 16:37:52 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/KeyValuePairSerializer.cs
r1823 r2993 16 16 } 17 17 18 private static readonly Type genericKeyValuePairType = 19 typeof(KeyValuePair<int, int>).GetGenericTypeDefinition(); 18 20 19 21 public bool CanSerialize(Type type) { 20 22 return type.IsGenericType && 21 type.GetGenericTypeDefinition() == 22 typeof(KeyValuePair<int, int>).GetGenericTypeDefinition(); 23 type.GetGenericTypeDefinition() == genericKeyValuePairType; 24 } 25 26 public string JustifyRejection(Type type) { 27 if (!type.IsGenericType) 28 return "not even generic"; 29 return "not generic KeyValuePair<,>"; 23 30 } 24 31
Note: See TracChangeset
for help on using the changeset viewer.