public static void SiteOp(string siteUrl, Action<SPSite> op)
{
using (var site = new SPSite(siteUrl))
{
try
{
op(site);
}
catch (Exception ex)
{
DiagnosticLog.Error(op.Method.Name, ex +
(ex.InnerException != null ? "::" + ex.InnerException : string.Empty));
throw;
}
}
}