コード例 #1
0
ファイル: MapUtils.cs プロジェクト: 4g0st1n0/MapManager
 /// <summary>
 /// Append a value to an existing metadata or create a new tag if that doesn't exist
 /// </summary>
 /// <param name="layer">The layer object</param>
 /// <param name="key">The metadata key</param>
 /// <param name="value">The value to append</param>
 /// <param name="value">The separator to be used when appending</param>
 public static void AppendMetadata(layerObj layer, string key_to_find, string value, string separator)
 {
     string key = layer.getFirstMetaDataKey();
     while (key != null)
     {
         if (key == key_to_find)
         {
             layer.setMetaData(key_to_find, layer.getMetaData(key_to_find) + separator + value);
             return;
         }
         key = layer.getNextMetaDataKey(key);
     }
     layer.setMetaData(key_to_find, value);
 }
コード例 #2
0
        /// <summary>
        /// Append a value to an existing metadata or create a new tag if that doesn't exist
        /// </summary>
        /// <param name="layer">The layer object</param>
        /// <param name="key">The metadata key</param>
        /// <param name="value">The value to append</param>
        /// <param name="value">The separator to be used when appending</param>
        public static void AppendMetadata(layerObj layer, string key_to_find, string value, string separator)
        {
            string key = layer.getFirstMetaDataKey();

            while (key != null)
            {
                if (key == key_to_find)
                {
                    layer.setMetaData(key_to_find, layer.getMetaData(key_to_find) + separator + value);
                    return;
                }
                key = layer.getNextMetaDataKey(key);
            }
            layer.setMetaData(key_to_find, value);
        }