Ejemplo n.º 1
0
 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);
 }
Ejemplo n.º 2
0
        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);
        }