private ToUInt64 ( DateTime value ) : ulong | ||
value | DateTime | |
Результат | ulong |
public static ulong ToUInt64(DateTime value)
{
return ((IConvertible)value).ToUInt64(null);
}
Convert::ToUInt64 ( String value ) : ulong | |
Convert::ToUInt64 ( String value, IFormatProvider provider ) : ulong | |
Convert::ToUInt64 ( String value, int fromBase ) : ulong | |
Convert::ToUInt64 ( UInt64 value ) : ulong | |
Convert::ToUInt64 ( bool value ) : ulong | |
Convert::ToUInt64 ( byte value ) : ulong | |
Convert::ToUInt64 ( char value ) : ulong | |
Convert::ToUInt64 ( decimal value ) : ulong | |
Convert::ToUInt64 ( double value ) : ulong | |
Convert::ToUInt64 ( float value ) : ulong | |
Convert::ToUInt64 ( int value ) : ulong | |
Convert::ToUInt64 ( long value ) : ulong | |
Convert::ToUInt64 ( object value ) : ulong | |
Convert::ToUInt64 ( object value, IFormatProvider provider ) : ulong | |
Convert::ToUInt64 ( sbyte value ) : ulong | |
Convert::ToUInt64 ( short value ) : ulong | |
Convert::ToUInt64 ( uint value ) : ulong | |
Convert::ToUInt64 ( ushort value ) : ulong |
/// <summary> /// Converts the specified search criterion dto. /// </summary> /// <param name="searchCriterionDto">The search criterion dto.</param> /// <returns>ICriterion.</returns> /// <exception cref="ArgumentException">Input has to have at least 3 arguments</exception> /// <exception cref="ArgumentOutOfRangeException"></exception> /// <exception cref="Exception">change this</exception> public ICriterion Convert(SearchCriterionDto searchCriterionDto) { var terminal = (TerminalSearchCriterionDto)searchCriterionDto; var args = terminal.Args; if (args.Length < 3) { throw new ArgumentException("Input has to have at least 3 arguments"); } var reg = Register.Lookup(args[0]); if (reg == null) { throw new ArgumentOutOfRangeException(); } switch (args[1]) { case "-eq": return(new RegisterEqualsCriterion(reg, Conv.ToUInt64(args[2]).ToHexString())); case "-between": var low = Conv.ToUInt64(args[2]); var hi = Conv.ToUInt64(args[3]); // todo: check before return(new RegisterBetweenCriterion(reg, low.ToHexString(), hi.ToHexString())); default: throw new Exception("change this"); } }