/// <summary> /// Generate a copy process in the <c>JobQueue</c>. /// </summary> /// <param name="CopyEvent">COPYCL2FDS, COPYFDS2CL</param> /// <param name="UID_SourceServer">Source server</param> /// <param name="UID_DestServer">Destination server</param> /// <param name="StartTime">Start time for the process</param> /// <param name="DestDomain">Destination domain</param> public Task _SvrCopyAsync(ISession session, IEntity entity, string CopyEvent, string UID_SourceServer, string UID_DestServer, DateTime StartTime, string DestDomain, CancellationToken ct) { // missusing(Missbrauch) this method, because code is partitialy equal try { session.Variables.Put("SvrCopy", true); ModProfile.SvrCopy(entity.CreateSingleDbObject(session), CopyEvent, UID_SourceServer, UID_DestServer, StartTime, DestDomain, false); } finally { session.Variables.Remove("SvrCopy"); } return(NullTask.Instance); }
public void SvrCopy(string CopyEvent, string argUID_SourceServer, string argUID_DestServer, DateTime StartTime, string Ident_DestDomain, bool DoOffline) { using (NoRightsCheck()) { try { DbObject.Connection.Variables.Put("SvrCopy", true); //SvrCopy(ISingleDbObject oSrcProfile, string CopyEvent, string UID_SourceServer, string UID_DestServer, DateTime StartTime, string Ident_DomainTo, bool DoOffline) ModProfile.SvrCopy(DbObject, CopyEvent, argUID_SourceServer, argUID_DestServer, StartTime, Ident_DestDomain, DoOffline); } finally { DbObject.Connection.Variables.Remove("SvrCopy"); } } }