private bool IsTimeOfActivationValid(Activation activation) { var difference = activation.TimeOfActivation - DateTime.Now; return(difference <= TimeSpan.FromMinutes(5) && difference >= -TimeSpan.FromHours(5)); }
public void SaveActivation(Activation activation) { // sideeffects only: save activation in registry }
// ================================FUNCTION IMPLEMENTATION END================================ \\ private bool HasValidActivationTime(Activation activation) { return(IsTimeOfActivationValid(activation) || activation.Ok); }