internal void SetSpecifiedIndex(RequestIndexId index) { if (index == null) { throw new ArgumentNullException("index"); } this.indexToUse = index; }
internal void SetDefaultIndex(RequestIndexId index) { if (index == null) { throw new ArgumentNullException("index"); } if (this.indexToUse == null) { this.indexToUse = index; } }
private void ValidateRequestIndexId(RequestIndexId requestIndexId) { if (requestIndexId == null) { throw new ArgumentNullException("requestIndexId"); } if (requestIndexId.Location != RequestIndexLocation.Mailbox) { throw new ArgumentException("This RequestIndexEntryHandler only supports saving IRequestIndexEntries to a mailbox.", "requestIndexId"); } if (requestIndexId.Mailbox == null) { throw new ArgumentException("The RequestIndexId supplied must specify a mailbox.", "requestIndexId"); } }
public static void CreateAndPopulateRequestIndexEntries(RequestJobBase requestJobBase, IConfigurationSession session) { if (requestJobBase == null) { throw new ArgumentNullException("requestJobBase"); } if (requestJobBase.IndexEntries == null) { requestJobBase.IndexEntries = new List <IRequestIndexEntry>(); } if (requestJobBase.IndexIds == null) { requestJobBase.IndexIds = new List <RequestIndexId>(); } RequestIndexId indexId = new RequestIndexId(RequestIndexLocation.AD); RequestIndexEntryProvider.Handle(indexId.RequestIndexEntryType, delegate(IRequestIndexEntryHandler handler) { IRequestIndexEntry item = handler.CreateRequestIndexEntryFromRequestJob(requestJobBase, session); requestJobBase.IndexIds.Add(indexId); requestJobBase.IndexEntries.Add(item); }); }
public override T CreateRequestIndexEntryFromRequestJob(RequestJobBase requestJob, RequestIndexId requestIndexId) { ArgumentValidator.ThrowIfNull("requestJob", requestJob); ArgumentValidator.ThrowIfNull("requestJob.TargetUser", requestJob.TargetUser); ArgumentValidator.ThrowIfNull("requestJob.TargetExchangeGuid", requestJob.TargetExchangeGuid); ArgumentValidator.ThrowIfInvalidValue <RequestJobBase>("requestJob.RequestType", requestJob, (RequestJobBase x) => x.RequestType == MRSRequestType.Sync); T result = Activator.CreateInstance <T>(); result.UpdateData(requestJob); return(result); }
public override MRSRequestMailboxEntry CreateRequestIndexEntryFromRequestJob(RequestJobBase requestJob, RequestIndexId requestIndexId) { ArgumentValidator.ThrowIfNull("requestJob", requestJob); return(new MRSRequestMailboxEntry { Type = requestJob.RequestType, Name = requestJob.Name, RequestGuid = requestJob.RequestGuid, Status = requestJob.Status, Flags = requestJob.Flags, RemoteHostName = requestJob.RemoteHostName, BatchName = requestJob.BatchName, SourceMDB = requestJob.SourceDatabase, TargetMDB = requestJob.TargetDatabase, StorageMDB = requestJob.WorkItemQueueMdb, FilePath = requestJob.FilePath, TargetUserId = requestJob.TargetUserId, SourceUserId = requestJob.SourceUserId, OrganizationId = requestJob.OrganizationId, RequestIndexId = requestIndexId }); }
public override bool Equals(object obj) { RequestIndexId requestIndexId = obj as RequestIndexId; return(requestIndexId != null && this.Location == requestIndexId.Location && this.Mailbox == requestIndexId.Mailbox); }
IRequestIndexEntry IRequestIndexEntryHandler.CreateRequestIndexEntryFromRequestJob(RequestJobBase requestJob, RequestIndexId requestIndexId) { return(this.CreateRequestIndexEntryFromRequestJob(requestJob, requestIndexId)); }
public virtual T CreateRequestIndexEntryFromRequestJob(RequestJobBase requestJob, RequestIndexId requestIndexId) { throw new NotSupportedException(); }
public RequestIndexEntryObjectId(Guid requestGuid, Guid targetExchangeGuid, MRSRequestType requestType, OrganizationId organizationId, RequestIndexId indexId, RequestBase owner = null) : this(requestGuid, requestType, organizationId, indexId, owner) { this.TargetExchangeGuid = targetExchangeGuid; }
public RequestIndexEntryObjectId(Guid requestGuid, MRSRequestType requestType, OrganizationId organizationId, RequestIndexId indexId, RequestBase owner = null) { this.RequestGuid = requestGuid; this.RequestType = requestType; this.OrganizationId = organizationId; this.IndexId = indexId; this.RequestObject = owner; }
public static void CreateAndPopulateRequestIndexEntries(RequestJobBase requestJobBase, RequestIndexId requestIndexId) { if (requestJobBase == null) { throw new ArgumentNullException("requestJobBase"); } if (requestJobBase.IndexEntries == null) { requestJobBase.IndexEntries = new List <IRequestIndexEntry>(); } if (requestJobBase.IndexIds == null) { requestJobBase.IndexIds = new List <RequestIndexId>(); } RequestIndexEntryProvider.Handle(requestIndexId.RequestIndexEntryType, delegate(IRequestIndexEntryHandler handler) { IRequestIndexEntry item = handler.CreateRequestIndexEntryFromRequestJob(requestJobBase, requestIndexId); requestJobBase.IndexIds.Add(requestIndexId); requestJobBase.IndexEntries.Add(item); }); }
public RequestIndexEntryQueryFilter(string name, ADObjectId id, MRSRequestType type, RequestIndexId idx, bool mbxSearch) { this.requestName = name; this.mailboxId = (mbxSearch ? id : null); this.dbId = (mbxSearch ? null : id); this.looseMailboxSearch = false; this.wildcardedNameSearch = false; this.requestType = type; this.indexId = idx; this.requestGuid = Guid.Empty; this.requestQueueId = null; this.batchName = null; this.sourceMailbox = null; this.targetMailbox = null; this.sourceDatabase = null; this.status = RequestStatus.None; this.flags = RequestFlags.None; this.notFlags = RequestFlags.None; }