public void ResetCookie(BaseCookie cookie) { if (cookie == null) { throw new ArgumentNullException("cookie"); } if (this.Caller == Guid.Empty) { throw new IllegalOperationNoCallerSpecifiedException(); } cookie[BaseCookieSchema.CallerProp] = this.Caller; cookie[BaseCookieSchema.AllowNullCookieProp] = true; this.DataProvider.Save(cookie); }
public void Save(IConfigurable configurable) { if (configurable == null) { throw new ArgumentNullException("configurable"); } BaseCookie baseCookie = configurable as BaseCookie; if (baseCookie != null) { if (this.Caller == Guid.Empty) { throw new IllegalOperationNoCallerSpecifiedException(); } baseCookie.ActiveMachine = Environment.MachineName; baseCookie[BaseCookieSchema.CallerProp] = this.Caller; baseCookie[BaseCookieSchema.AllowNullCookieProp] = false; } this.DataProvider.Save(configurable); }