public Dictionary <string, Func <ValueRange> > this[ITemporalHelper me] { get { return(new Dictionary <string, Func <ValueRange> >() { { nameof(ChronoField.YEAR), () => ((ITemporalField)ChronoField.YEAR).rangeRefinedBy(me) }, { nameof(ChronoField.MONTH_OF_YEAR), () => ((ITemporalField)ChronoField.MONTH_OF_YEAR).rangeRefinedBy(me) }, { nameof(ChronoField.DAY_OF_YEAR), () => ((ITemporalField)ChronoField.DAY_OF_YEAR).rangeRefinedBy(me) }, { nameof(ChronoField.DAY_OF_WEEK), () => ((ITemporalField)ChronoField.DAY_OF_WEEK).rangeRefinedBy(me) }, { nameof(ChronoField.DAY_OF_MONTH), () => ((ITemporalField)ChronoField.DAY_OF_MONTH).rangeRefinedBy(me) }, { nameof(ChronoField.CLOCK_HOUR_OF_AMPM), () => ((ITemporalField)ChronoField.CLOCK_HOUR_OF_AMPM).rangeRefinedBy(me) }, { nameof(ChronoField.CLOCK_HOUR_OF_DAY), () => ((ITemporalField)ChronoField.CLOCK_HOUR_OF_DAY).rangeRefinedBy(me) }, { nameof(ChronoField.HOUR_OF_DAY), () => ((ITemporalField)ChronoField.HOUR_OF_DAY).rangeRefinedBy(me) }, { nameof(ChronoField.HOUR_OF_AMPM), () => ((ITemporalField)ChronoField.HOUR_OF_AMPM).rangeRefinedBy(me) }, { nameof(ChronoField.MINUTE_OF_DAY), () => ((ITemporalField)ChronoField.MINUTE_OF_DAY).rangeRefinedBy(me) }, { nameof(ChronoField.MINUTE_OF_HOUR), () => ((ITemporalField)ChronoField.MINUTE_OF_HOUR).rangeRefinedBy(me) }, { nameof(ChronoField.SECOND_OF_DAY), () => ((ITemporalField)ChronoField.SECOND_OF_DAY).rangeRefinedBy(me) }, { nameof(ChronoField.SECOND_OF_MINUTE), () => ((ITemporalField)ChronoField.SECOND_OF_MINUTE).rangeRefinedBy(me) }, { nameof(ChronoField.MILLI_OF_DAY), () => ((ITemporalField)ChronoField.MILLI_OF_DAY).rangeRefinedBy(me) }, { nameof(ChronoField.MILLI_OF_SECOND), () => ((ITemporalField)ChronoField.MILLI_OF_SECOND).rangeRefinedBy(me) }, { nameof(ChronoField.MICRO_OF_DAY), () => ((ITemporalField)ChronoField.MICRO_OF_DAY).rangeRefinedBy(me) }, { nameof(ChronoField.MICRO_OF_SECOND), () => ((ITemporalField)ChronoField.MICRO_OF_SECOND).rangeRefinedBy(me) }, { nameof(ChronoField.NANO_OF_DAY), () => ((ITemporalField)ChronoField.NANO_OF_DAY).rangeRefinedBy(me) }, { nameof(ChronoField.NANO_OF_SECOND), () => ((ITemporalField)ChronoField.NANO_OF_SECOND).rangeRefinedBy(me) } }); } }
public static bool isSupported(ITemporalHelper me, ITemporalField field) { if (field is ChronoField) { return(isSupported(me.isSupportedHandlers, (ChronoField)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 static int get(ITemporalHelper me, ITemporalField field) { int?rslt = getIntFromLong(getLong(me, field)); if (rslt.HasValue) { return(rslt.Value); } throw new ArgumentException("Invalid argument type", nameof(field)); }
public static long getLong(ITemporalHelper me, ITemporalField field) { if (field is ChronoField) { long?rslt = get(me.getHandlers, (ChronoField)field); if (rslt.HasValue) { return(rslt.Value); } } throw new ArgumentException("Invalid argument type", nameof(field)); }
public static ValueRange range(ITemporalHelper me, ITemporalField field) { if (field is ChronoField) { ValueRange rslt = range(rangeHandlers[me], (ChronoField)field); if (rslt != null) { return(rslt); } } throw new ArgumentException("Invalid argument type", nameof(field)); }
public static ITemporal adjustInto(ITemporalHelper me, ITemporal temporal) { throw new NotImplementedException(); }
public static R query <V, R>(ITemporalHelper me, Func <V, R> del) where V : ITemporalAccessor { return(del((V)(ITemporalAccessor)me)); }
public static ITemporal with(ITemporalHelper me, ITemporalField field, long newValue) { throw new NotImplementedException(); }
public static ITemporal with(ITemporalHelper me, ITemporalAdjuster adjuster) { throw new NotImplementedException(); }
public static long until(ITemporalHelper me, ITemporal endExclusive, ITemporalUnit unit) { return(unit.between(me, endExclusive)); }
public static ITemporal plus(ITemporalHelper me, ITemporalAmount amount) { return(plus(me.addSubrtactHandlers, amount)); }
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))); }