public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { if (!string.IsNullOrEmpty("" + value) && Configurazione.UserConfigLumen.compNumFoto) { return(CompNumFoto.getLongValue("" + value)); } return(value); }
public void CompNumFotoTest1() { string enc = CompNumFoto.getStringValue(36); long dec = CompNumFoto.getLongValue(enc); Assert.IsTrue(36 == dec); Console.WriteLine("From {0}, to {1}, to {2}", 36, enc, dec); }
public void CompNumFotoTest2() { for (long i = 0; i < 400000; ++i) { string enc = CompNumFoto.getStringValue(i); long dec = CompNumFoto.getLongValue(enc); Assert.IsTrue(i == dec); Console.WriteLine("From {0}, to {1}, to {2}", i, enc, dec); } }