From 84fb0e41bd727b14cf96e751dab334982638bf27 Mon Sep 17 00:00:00 2001
From: inga-lovinde <52715130+inga-lovinde@users.noreply.github.com>
Date: Mon, 2 Jan 2012 01:00:17 +0000
Subject: [PATCH] Files for previous commit
---
Web.Core/Counter.cs | 25 +++++++++++++++++++++++++
Web.Core/ILogger.cs | 15 +++++++++++++++
2 files changed, 40 insertions(+)
create mode 100644 Web.Core/Counter.cs
create mode 100644 Web.Core/ILogger.cs
diff --git a/Web.Core/Counter.cs b/Web.Core/Counter.cs
new file mode 100644
index 0000000..36cc426
--- /dev/null
+++ b/Web.Core/Counter.cs
@@ -0,0 +1,25 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Web.Core {
+ public class Counter {
+
+ private int value;
+ private readonly object locker = new object();
+
+ public Counter() {
+ this.value = 0;
+ }
+
+ public int GetCurrentValueAndIncrement() {
+ lock(this.locker) {
+ int result = this.value;
+ this.value++;
+ return result;
+ }
+ }
+
+ }
+}
diff --git a/Web.Core/ILogger.cs b/Web.Core/ILogger.cs
new file mode 100644
index 0000000..93e9017
--- /dev/null
+++ b/Web.Core/ILogger.cs
@@ -0,0 +1,15 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Web.Core {
+ public interface ILogger {
+
+ ///
+ ///
+ /// Single-line message
+ void Log(string message);
+
+ }
+}