[NClay.MVC.LogicAspect(typeof(Logic.SysUser.IBlogConfig),
typeof(Logic.SysUser.IEditUserInfo))] public class BlogConfigCache : NClay.MVC.IAspect
{
#region IAspect 成员 public void Aspect(object source, NClay.MVC.AspectHandler e)
{
if (source is Logic.SysUser.IBlogConfig)
{
Logic.SysUser.IBlogConfig config = (Logic.SysUser.IBlogConfig)source;
config.OwnerConfig = CacheUnit.GetBlogConfig();
if (config.OwnerConfig == null)
{
e.Execute(source);
CacheUnit.SetBlogConfig(config.OwnerConfig);
}
}
if (source is Logic.SysUser.IEditUserInfo)
{
e.Execute(source);
CacheUnit.ClearBlogConfig();
}
}
#endregion
}
|