summaryrefslogtreecommitdiff
path: root/product/client/server/domain/payroll/One.cs
diff options
context:
space:
mode:
Diffstat (limited to 'product/client/server/domain/payroll/One.cs')
-rw-r--r--product/client/server/domain/payroll/One.cs20
1 files changed, 20 insertions, 0 deletions
diff --git a/product/client/server/domain/payroll/One.cs b/product/client/server/domain/payroll/One.cs
new file mode 100644
index 0000000..c3475d7
--- /dev/null
+++ b/product/client/server/domain/payroll/One.cs
@@ -0,0 +1,20 @@
+using System;
+using System.Linq;
+
+namespace presentation.windows.server.domain.payroll
+{
+ public class One<T> : Fraction where T : Denominator, new()
+ {
+ T denominator = new T();
+
+ public void each(Action<int> action)
+ {
+ denominator.each(x => action(x));
+ }
+
+ public int of(int number)
+ {
+ return number / denominator.each_possible_value().Count();
+ }
+ }
+} \ No newline at end of file