public LensManager(LensManager <T> other, Func <List <T>, T> inEvaluateFunc = null) { evaluateFunc = inEvaluateFunc != null ? inEvaluateFunc : other.evaluateFunc; activeRequests = other.activeRequests; cachedResult = other.cachedResult; OnEvaluate = other.OnEvaluate; OnValueChanged = other.OnValueChanged; EvaluateRequests(); }
private void AddLens() { var lastLens = LensManager.GetList().OrderByDescending(x => x.Id).FirstOrDefault(); var id = 0; if (lastLens != null) { id = lastLens.Id + 1; } Lens lens = new Lens() { Id = id, Name = LensName, FocalLenght = FocalLenght }; LensManager.Add(lens); }