private NativeCommon.IFabricAsyncOperationContext PartitionBackupOperationBeginWrapper( Uri serviceName, Guid partitionId, Guid operationId, BackupNowConfiguration configuration, TimeSpan timeout, NativeCommon.IFabricAsyncOperationCallback callback) { var timeoutMilliseconds = Utility.ToMilliseconds(timeout, "timeout"); var partitionInfo = new BackupPartitionInfo { PartitionId = partitionId, ServiceName = serviceName.ToString(), }; using (var pin = new PinCollection()) { return(this._nativeAgent.BeginPartitionBackupOperation( partitionInfo.ToNative(pin), operationId, configuration.ToNative(pin), timeoutMilliseconds, callback)); } }
private NativeCommon.IFabricAsyncOperationContext UpdateBackupSchedulePolicyBeginWrapper( Uri serviceName, Guid partitionId, BackupPolicy policy, TimeSpan timeout, NativeCommon.IFabricAsyncOperationCallback callback) { var timeoutMilliseconds = Utility.ToMilliseconds(timeout, "timeout"); var partitionInfo = new BackupPartitionInfo { PartitionId = partitionId, ServiceName = serviceName.ToString(), }; using (var pin = new PinCollection()) { return(this._nativeAgent.BeginUpdateBackupSchedulePolicy( partitionInfo.ToNative(pin), policy == null ? IntPtr.Zero : policy.ToNative(pin), timeoutMilliseconds, callback)); } }