public T GetObject <T>(Action callback) where T : class { lock (locker) { if (DateTime.Now > copyCreation.AddSeconds(600)) { copyCreation = DateTime.Now; copy = JsonSerialization.CreateDeepCopy((T)data); } callback.Invoke(); return((T)copy); } }