Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/10/10 16:37:52 (14 years ago)
Author:
epitzer
Message:

add justifications for rejecting a type for serialization in ICompositeSerializer (#548)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Number2StringSerializer.cs

    r1853 r2993  
    11using System;
     2using System.Linq;
    23using HeuristicLab.Persistence.Interfaces;
    34using HeuristicLab.Persistence.Core;
     
    4344    public bool CanSerialize(Type type) {
    4445      return numberParsers.ContainsKey(type);
     46    }
     47
     48    public string JustifyRejection(Type type) {
     49      return string.Format("not a number type (one of {0})",
     50        string.Join(", ", numberTypes.Select(n => n.Name).ToArray()));
    4551    }
    4652
Note: See TracChangeset for help on using the changeset viewer.