Beispiel #1
0
        public bool Equals(SpatialObject obj, FeatureLayerUpdateMode mode, bool updateWith)
        {
            bool isEqual = true;

            if (mode == FeatureLayerUpdateMode.GeometryOnly)
            {
                isEqual = this.x == obj.x && this.y == obj.y;
            }
            else if (mode == FeatureLayerUpdateMode.GeometryAndAttributes)
            {
                isEqual = this.x == obj.x && this.y == obj.y && this.fieldValues.Equals(obj.fieldValues);
            }
            else if ((int)mode > 1) // AttributesOnly || NoGeometry || NoGeometryAndID
            {
                isEqual = this.fieldValues.Equals(obj.fieldValues);
            }

            if (!isEqual && updateWith)
            {
                this.x = obj.x;
                this.y = obj.y;
                this.fieldValues.UpdateWith(obj.fieldValues);
            }

            return(isEqual);
        }
Beispiel #2
0
 public LayerUpdatingRunner(string username, string password, AgolFeatureLayer featureLayer, string connectionString, EventLogCallback callback)
 {
     this.TokenUsername    = username;
     this.TokenPassword    = password;
     this.FeatureLayer     = featureLayer;
     this.ConnectionString = connectionString;
     this.logCallback      = callback;
     this.UpdateMode       = (FeatureLayerUpdateMode)Enum.Parse(typeof(FeatureLayerUpdateMode), featureLayer.UpdateMode);
 }