@ -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;
@ -0,0 +1,15 @@
public interface ILogger {
/// <summary>
/// </summary>
/// <param name="message">Single-line message</param>
void Log(string message);