Beispiel #1
0
 public IEnumerable <UnpublishedObject> FindUnpublishedObjects(string serviceInstance)
 {
     if (string.IsNullOrEmpty(serviceInstance))
     {
         throw new ArgumentNullException("serviceInstance");
     }
     return(this.DataProvider.Find <UnpublishedObject>(SyncSession.BuildFindUnpublishedObjectQuery(serviceInstance), null, true, null).Cast <UnpublishedObject>());
 }
Beispiel #2
0
 public IEnumerable <UnsyncedObject> FindUnsyncedObjects(string serviceInstance, ADObjectId tenantId = null, TimeSpan?cooldown = null)
 {
     if (string.IsNullOrEmpty(serviceInstance))
     {
         throw new ArgumentNullException("serviceInstance");
     }
     return(this.DataProvider.Find <UnsyncedObject>(SyncSession.BuildFindUnsyncedObjectQuery(serviceInstance, tenantId, cooldown ?? SyncSession.DefaultCooldown), null, true, null).Cast <UnsyncedObject>());
 }
Beispiel #3
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 #4
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);
 }