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); }
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); }