Esempio n. 1
0
        public LineData()
        {
            UniquenessValidator    = new LineUniquenessValidator(this);
            PointsNotSameValidator = new PointsNotSameValidator(EnumeratePoints());

            NameUpdated.Subscribe(PointsNotSameValidator.Update);
        }
Esempio n. 2
0
        private void OnDeserialized()
        {
            UniquenessValidator    = new LineUniquenessValidator(this);
            PointsNotSameValidator = new PointsNotSameValidator(EnumeratePoints());

            NameUpdated.Subscribe(PointsNotSameValidator.Update);
            PointsNotSameValidator.Update();
        }
Esempio n. 3
0
 public void Handle(NameUpdated e)
 {
     _elastic.Update <Responses.Index, Object>(x => x
                                               .Id(e.CountryId)
                                               .Doc(new { Name = e.Name })
                                               .RetryOnConflict(3)
                                               .Refresh()
                                               );
 }
Esempio n. 4
0
        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();
        }
Esempio n. 5
0
 /// <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);
 }
Esempio n. 6
0
 protected virtual void OnNameUpdated()
 => NameUpdated?.Invoke(this, EventArgs.Empty);