public override bool Equals(object obj) { if (obj == null) { return(false); } if (obj.GetType() != base.GetType()) { return(false); } LTimeBase base2 = (LTimeBase)obj; return(this.internalTimeValue == base2.internalTimeValue); }
public static bool TryConvert(LTimeBase time, Type targetType, out object targetValue) { targetValue = null; if (targetType == typeof(TimeSpan)) { targetValue = time.Time; } else if (targetType == typeof(long)) { targetValue = (long)time.Ticks; } else if (targetType == typeof(ulong)) { targetValue = time.Ticks; } else if (targetType == typeof(string)) { targetValue = time.ToString(); } return(targetValue != null); }