35 lines
849 B
C#
35 lines
849 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading;
|
|
using Taloyhtio.CondoUpdate.Common;
|
|
|
|
namespace Taloyhtio.CondoUpdate.TestImpl
|
|
{
|
|
public class UpdaterTestImpl : ICondoUpdater
|
|
{
|
|
public event EventHandler<LogEventArgs> OnNotify;
|
|
public void Update(object args)
|
|
{
|
|
string url = args as string;
|
|
if (string.IsNullOrEmpty(url))
|
|
{
|
|
this.notify("Url is empty");
|
|
return;
|
|
}
|
|
|
|
Thread.Sleep(1000);
|
|
this.notify(string.Format("Updated '{0}'", url));
|
|
}
|
|
|
|
private void notify(string msg)
|
|
{
|
|
if (this.OnNotify != null)
|
|
{
|
|
this.OnNotify(this, new LogEventArgs {Message = msg});
|
|
}
|
|
}
|
|
}
|
|
}
|