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>()); }
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>()); }
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>()); }
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); }