Example #1
0
        internal static QueryFilter BuildFindCookieQuery(Guid caller, BaseCookieFilter cookieFilter, bool acquireCookie)
        {
            ComparisonFilter   item         = new ComparisonFilter(ComparisonOperator.Equal, BaseCookieSchema.CallerProp, caller);
            ComparisonFilter   item2        = new ComparisonFilter(ComparisonOperator.Equal, BaseCookieSchema.AcquireCookieLockProp, acquireCookie);
            List <QueryFilter> queryFilters = cookieFilter.GetQueryFilters();

            queryFilters.Add(item);
            queryFilters.Add(item2);
            return(new AndFilter(queryFilters.ToArray()));
        }
Example #2
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>());
 }