Пример #1
0
 private static void HandlePlus(PatternCursor pattern, SteppedPatternBuilder <Offset, OffsetParseBucket> builder)
 {
     builder.AddField(PatternFields.Sign, pattern.Current);
     builder.AddRequiredSign((bucket, positive) => bucket.IsNegative = !positive, offset => offset.Milliseconds >= 0);
 }
Пример #2
0
 private static void HandlePlus(PatternCursor pattern, SteppedPatternBuilder <Duration, DurationParseBucket> builder)
 {
     builder.AddField(PatternFields.Sign, pattern.Current);
     builder.AddRequiredSign((bucket, positive) => bucket.IsNegative = !positive, duration => duration.FloorDays >= 0);
 }