Bureaucrat Job Class, Seriously

I was looking through some code and found this class recently.  It almost reminds me of a class I saw called a speed up loop.  This however, is obviously more important to the grand scheme of politics eh!

[sourcecode language=”csharp”]
public class BureaucratJob : IJob
{
readonly ITradeReconciler reconciler;
readonly ICalculationQueue queue;
ILog log;

public BureaucratJob(ITradeReconciler reconciler, ICalculationQueue queue)
{
this.reconciler = reconciler;
this.queue = queue;
}

public void RedTape(object[] formsInTriplicate)
{
// intentionally doing nothing, just like any good ol American Bureaucrat!
}

public void Execute(JobExecutionContext context)
{
RedTape(new[] { "formsInTriplicate", "formsInTriplicate", "formsInTriplicate" });

log = LogManager.GetLogger(typeof(BureaucratJob));
log.Info(string.Format("Job Executing, it’s currently {0} and all is well", DateTime.Now));

log.Info("Reconciliation is starting.");

var work = IoC.Resolve<IUnitOfWorkManager>();

work.Begin();

reconciler.Go();

log.Info("Reconciliation has finished. Calculation queue is now processing.");

queue.Process();

work.Commit();
work.Complete();

log.Info("Calculation queue is queued out n’ done.");
}
}
[/sourcecode]

Hope you enjoyed the code read. 🙂 Cheers!

Shout it

One thought on “Bureaucrat Job Class, Seriously

  1. Pingback: DotNetShoutout

Comments are closed.