public LineData() { UniquenessValidator = new LineUniquenessValidator(this); PointsNotSameValidator = new PointsNotSameValidator(EnumeratePoints()); NameUpdated.Subscribe(PointsNotSameValidator.Update); }
private void OnDeserialized() { UniquenessValidator = new LineUniquenessValidator(this); PointsNotSameValidator = new PointsNotSameValidator(EnumeratePoints()); NameUpdated.Subscribe(PointsNotSameValidator.Update); PointsNotSameValidator.Update(); }
public void Handle(NameUpdated e) { _elastic.Update <Responses.Index, Object>(x => x .Id(e.CountryId) .Doc(new { Name = e.Name }) .RetryOnConflict(3) .Refresh() ); }
private void OnDeserialized() { PointsAreInOnePlaneValidator = new PolygonPointsAreInOnePlaneValidator(this); PointsAreOnSameLineValidator = new PolygonPointsAreOnSameLineValidator(this); LinesDontIntersectValidator = new PolygonLinesDontIntersectValidator(this); PolygonUniquenessValidator = new PolygonUniquenessValidator(this); PointsNotSameValidator = new PointsNotSameValidator(EnumeratePoints()); NameUpdated.Subscribe(PointsNotSameValidator.Update); PointsAreInOnePlaneValidator.Update(); PointsAreOnSameLineValidator.Update(); LinesDontIntersectValidator.Update(); PointsNotSameValidator.Update(); }
/// <summary> /// Sets the unique name of the sprite sheet. /// </summary> /// <param name="uniqueName"> /// A name that is unique among sprite sheets in the project. /// </param> public void SetName(string uniqueName) { Name = uniqueName; NameUpdated?.Invoke(uniqueName); }
protected virtual void OnNameUpdated() => NameUpdated?.Invoke(this, EventArgs.Empty);