protected override void InternalProcessRecord() { this.DataObject.SetExchangeVersion(ExchangeObjectVersion.Exchange2010); if (this.Enabled) { this.DataObject.State = ResubmitRequestState.Running; } else { this.DataObject.State = ResubmitRequestState.Paused; } try { base.InternalProcessRecord(); } catch (RpcException rpcException) { GetResubmitRequest.ProcessRpcError(rpcException, this.Server.Fqdn, this); } catch (ResubmitRequestException exception) { base.WriteError(exception, ErrorCategory.InvalidArgument, null); } catch (LocalizedException exception2) { base.WriteError(exception2, ExchangeErrorCategory.Client, null); } }
protected override void InternalProcessRecord() { try { base.InternalProcessRecord(); } catch (RpcException rpcException) { GetResubmitRequest.ProcessRpcError(rpcException, this.Server.Fqdn, this); } catch (ResubmitRequestException exception) { base.WriteError(exception, ErrorCategory.InvalidArgument, null); } catch (LocalizedException exception2) { base.WriteError(exception2, ExchangeErrorCategory.Client, null); } }
protected override void InternalProcessRecord() { try { MessageResubmissionRpcClientImpl messageResubmissionRpcClientImpl = new MessageResubmissionRpcClientImpl(this.Server.Fqdn); string[] unresponsivePrimaryServers = (this.UnresponsivePrimaryServers != null) ? this.UnresponsivePrimaryServers.ToArray() : null; byte[] reservedBytes = null; if (this.TestOnly) { MdbefPropertyCollection mdbefPropertyCollection = new MdbefPropertyCollection(); mdbefPropertyCollection[65547U] = true; reservedBytes = mdbefPropertyCollection.GetBytes(); } AddResubmitRequestStatus addResubmitRequestStatus; if (string.IsNullOrEmpty(this.conditionalString)) { addResubmitRequestStatus = messageResubmissionRpcClientImpl.AddMdbResubmitRequest((this.CorrelationId == Guid.Empty) ? Guid.NewGuid() : this.CorrelationId, new Guid(this.DataObject.Destination), this.StartTime.ToUniversalTime().Ticks, this.EndTime.ToUniversalTime().Ticks, unresponsivePrimaryServers, reservedBytes); } else { addResubmitRequestStatus = messageResubmissionRpcClientImpl.AddConditionalResubmitRequest((this.CorrelationId == Guid.Empty) ? Guid.NewGuid() : this.CorrelationId, this.StartTime.ToUniversalTime().Ticks, this.EndTime.ToUniversalTime().Ticks, this.conditionalString, unresponsivePrimaryServers, reservedBytes); } if (addResubmitRequestStatus != AddResubmitRequestStatus.Success) { base.WriteError(new LocalizedException(Strings.AddResubmitRequestFailed(addResubmitRequestStatus)), ErrorCategory.NotSpecified, null); } } catch (RpcException rpcException) { GetResubmitRequest.ProcessRpcError(rpcException, this.Server.Fqdn, this); } catch (ResubmitRequestException exception) { base.WriteError(exception, ErrorCategory.InvalidArgument, null); } catch (LocalizedException exception2) { base.WriteError(exception2, ExchangeErrorCategory.Client, null); } }