public void AddNewRequest(AsyncQueueRequest request, DateTime?scheduleTime = null)
 {
     if (request == null)
     {
         throw new ArgumentNullException("request");
     }
     if (scheduleTime != null)
     {
         request[AsyncQueueRequestSchema.ScheduleTimeProperty] = scheduleTime.Value;
     }
     this.Save(this.dataProviderDirectory, request);
 }
        public IEnumerable <T> FindMigrationReport <T>(QueryFilter filter) where T : IConfigurable, new()
        {
            object obj;

            if (!DalHelper.TryFindPropertyValueByName(filter, "organizationalUnitRoot", out obj))
            {
                throw new ArgumentException("Parameter 'Organization' was not specified in the query filter");
            }
            AsyncQueueRequest asyncQueueRequest = this.GetAsyncQueueRequests((Guid)obj, "MigrateData1415", null, null, null, null, null, 1).FirstOrDefault <AsyncQueueRequest>();

            if (asyncQueueRequest == null)
            {
                return(null);
            }
            QueryFilter filter2 = QueryFilter.AndTogether(new QueryFilter[]
            {
                AsyncQueueSession.NewComparisonFilter(AsyncQueueCommonSchema.OrganizationalUnitRootProperty, asyncQueueRequest.OrganizationalUnitRoot),
                AsyncQueueSession.NewComparisonFilter(AsyncQueueCommonSchema.RequestIdProperty, asyncQueueRequest.RequestId),
                AsyncQueueSession.NewComparisonFilter(AsyncQueueLogSchema.ProcessStartDatetimeProperty, asyncQueueRequest.CreationTime.AddHours(-1.0)),
                AsyncQueueSession.NewComparisonFilter(AsyncQueueLogSchema.ProcessEndDatetimeProperty, asyncQueueRequest.LastModifiedTime.AddHours(1.0))
            });

            return(this.dataProviderMtrt.Find <T>(filter2, null, false, null).Cast <T>());
        }