예제 #1
0
 public void UpdateWith(FieldValueList updateList)
 {
     for (int j = 0; j < internalList.Count; j++)
     {
         internalList[j].value = updateList[j].value;
     }
 }
예제 #2
0
        private void BuildAttributesJson(StringBuilder jsonBuilder, FieldValueList fieldValues, long objectId, bool isUpdating)
        {
            FieldValue fv = null;

            jsonBuilder.Append("attributes:{");

            if (isUpdating)
            {
                jsonBuilder.Append(string.Format("OBJECTID:{0},", objectId));
                if (this.UpdateMode == FeatureLayerUpdateMode.GeometryOnly)
                {
                    jsonBuilder.Append(string.Format("LAST_UPDATED:\"{0:G}\"}}", DateTime.Now));
                    return;
                }
            }

            for (int j = 0; j < fieldValues.Count; j++)
            {
                fv = fieldValues[j];
                jsonBuilder.Append(fv.name);
                jsonBuilder.Append(":");
                jsonBuilder.Append((fv.type == typeof(string) || fv.type == typeof(DateTime)) ? ("\"" + fv.value + "\"") : fv.value);
                jsonBuilder.Append(",");
            }

            jsonBuilder.Append(string.Format("LAST_UPDATED:\"{0:G}\"}}", DateTime.Now));
        }
예제 #3
0
        public bool Equals(FieldValueList compareList)
        {
            if (compareList == null)
            {
                return(false);
            }

            for (int j = 0; j < internalList.Count; j++)
            {
                if (!internalList[j].value.Equals(compareList[j].value))
                {
                    return(false);
                }
            }

            return(true);
        }