private void Assign(ILoggerDecorator decorator = null, ILoggerAdatper adapter = null) { if (!timer.IsRunning) { timer.Start(); } if (decorator == null) { this.decorator = new NormalDecorator(); } else { this.decorator = decorator; } this.adapter = adapter; LoggerBegin(); }
public Logger(Stream stream, ILoggerDecorator decorator = null) { Assign(decorator, new StreamAdapter(stream)); }
public Logger(string filename, ILoggerDecorator decorator = null) : this(new FileStream(filename, FileMode.Create), decorator) { }
public Logger(ILoggerDecorator decorator = null, ILoggerAdatper adapter = null) { Assign(decorator, adapter); }