public string ConvertFrom(EncodeType fromEncodeType, string text) { var fromMap = fromEncodeType.CharMap(); text = DecodeInternal(text, fromMap); text = EncodeInternal(text, myMap); return(text); }
public string ConvertTo(EncodeType toEncodeType, string text) { var toMap = toEncodeType.CharMap(); text = DecodeInternal(text, myMap); text = EncodeInternal(text, toMap); return(text); }
public Func <EncodeType, Func <string, string> > FromTo(EncodeType fromEncodeType) { var fromMap = fromEncodeType.CharMap(); return((toEncodeType) => { var toMap = toEncodeType.CharMap(); return (string text) => { text = DecodeInternal(text, fromMap); text = EncodeInternal(text, toMap); return text; }; }); }
private Converter(EncodeType baseEncodeType) { this.baseEncodeType = baseEncodeType; this.myMap = baseEncodeType.CharMap(); }