Beispiel #1
0
 public T[] FindCookies <T>(BaseCookieFilter filter) where T : IConfigurable, new()
 {
     if (filter == null)
     {
         throw new ArgumentException("filter");
     }
     if (this.Caller == Guid.Empty)
     {
         throw new IllegalOperationNoCallerSpecifiedException();
     }
     return(this.DataProvider.Find <T>(SyncSession.BuildFindCookieQuery(this.Caller, filter, false), null, true, null).Cast <T>().ToArray <T>());
 }
Beispiel #2
0
 public bool AcquireTenantCookie(TenantCookieFilter filter, out TenantCookie cookie)
 {
     if (filter == null)
     {
         throw new ArgumentException("filter");
     }
     if (this.Caller == Guid.Empty)
     {
         throw new IllegalOperationNoCallerSpecifiedException();
     }
     IConfigurable[] source = this.DataProvider.Find <TenantCookie>(SyncSession.BuildFindCookieQuery(this.Caller, filter, true), null, true, null);
     cookie = (source.FirstOrDefault <IConfigurable>() as TenantCookie);
     return(cookie != null);
 }