public virtual bool isSupported(ITemporalUnit field) { if (field is ChronoUnit) { return(isSupported(isSupportedHandlers, (ChronoUnit)field)); } throw new ArgumentException("Invalid argument type", nameof(field)); }
public static bool isSupported(ITemporalHelper me, ITemporalUnit unit) { if (unit is ChronoUnit) { return(isSupported(me.isSupportedHandlers, (ChronoUnit)unit)); } throw new ArgumentException("Invalid argument type", nameof(unit)); }
public long get(ITemporalUnit unit) { if (unit.ToString() == _unit.ToString()) { return(_amt); } throw new ArgumentException(); }
private ChronoField(string pName, string pDisplayName, ITemporalUnit pBaseUnit, ITemporalUnit pRangeUnit, rangeDel1 pRange1, rangeDel2 pRange2, adjustDel pAdjust, resolveDel pResolve, fromDel pFrom, supportedByDel pSupportedBy) { _name = pName; _displayName = pDisplayName; _baseUnit = pBaseUnit; _rangeUnit = pRangeUnit; _range1 = pRange1; _range2 = pRange2; _adjust = pAdjust; _resolve = pResolve; _from = pFrom; _supportedBy = pSupportedBy; }
public Duration(long amt, ITemporalUnit unit) { _amt = amt; _unit = unit; }
long ITemporal.until(ITemporal endExclusive, ITemporalUnit unit) { return(TemporalHelper.until(this, endExclusive, unit)); }
ITemporal ITemporal.plus(long amountToAdd, ITemporalUnit unit) { return(TemporalHelper.plus(this, amountToAdd, unit)); }
ITemporal ITemporal.minus(long amountToSubtract, ITemporalUnit unit) { return(TemporalHelper.minus(this, amountToSubtract, unit)); }
bool ITemporal.isSupported(ITemporalUnit field) { return(TemporalHelper.isSupported(this, field)); }
public virtual ITemporal minus(long amountToSubtract, ITemporalUnit unit) { return(((ITemporal)this).minus(new Duration(amountToSubtract, unit))); }
public abstract long until(ITemporal endExclusive, ITemporalUnit unit);
public static long until(ITemporalHelper me, ITemporal endExclusive, ITemporalUnit unit) { return(unit.between(me, endExclusive)); }
public static ITemporal plus(ITemporalHelper me, long amountToAdd, ITemporalUnit unit) { return(((ITemporal)me).plus(new Duration(amountToAdd, unit))); }
public static ITemporal minus(ITemporalHelper me, long amountToSubtract, ITemporalUnit unit) { return(((ITemporal)me).minus(new Duration(amountToSubtract, unit))); }
public override long until(ITemporal endExclusive, ITemporalUnit unit) { throw new NotImplementedException(); }
public override bool isSupported(ITemporalUnit field) { throw new NotImplementedException(); }