Exemplo n.º 1
0
        public object GetData(string name)
        {
            if (AdditionalData.ContainsKey(name))
                return AdditionalData[name];
            return null;


        }
Exemplo n.º 2
0
 public void AddAdditionalData(string key, int valueNo, string value)
 {
     if (!AdditionalData.ContainsKey(key))
     {
         AdditionalData.Add(key, new Dictionary <int, string>());
     }
     AdditionalData[key].Add(valueNo, value);
 }
Exemplo n.º 3
0
        public virtual JToken TryGetAdditionalData(string key)
        {
            if (AdditionalData == null)
            {
                return(null);
            }

            return(AdditionalData.ContainsKey(key) ? AdditionalData[key] : null);
        }
Exemplo n.º 4
0
 public bool AdditionalDataExists(string key = "")
 {
     if (key == "")
     {
         return(AdditionalData != null);
     }
     else
     {
         return(AdditionalData.ContainsKey(key.ToLowerInvariant()));
     }
 }
Exemplo n.º 5
0
 public void RegisterAdditional(string key, string value)
 {
     if (!AdditionalData.ContainsKey(key))
     {
         AdditionalData.Add(key, value);
     }
     else
     {
         AdditionalData[key] = value;
     }
 }
Exemplo n.º 6
0
 public bool TryGetAdditionalData(string key, int valueNo, out string value)
 {
     if (AdditionalData.ContainsKey(key) &&
         AdditionalData[key].ContainsKey(valueNo) &&
         !string.IsNullOrEmpty(AdditionalData[key][valueNo]))
     {
         value = AdditionalData[key][valueNo];
         return(true);
     }
     value = null;
     return(false);
 }
Exemplo n.º 7
0
        //private void Execute()
        //{
        //    executing = true;
        //    engine.Execute(jsCode);
        //    executing = false;
        //}

        public void RegisterAdditional(string key, string value)
        {
            //if (executing)
            //{
            //    return;
            //}

            if (!AdditionalData.ContainsKey(key))
            {
                AdditionalData.Add(key, value);
            }
            else
            {
                AdditionalData[key] = value;
            }
        }
Exemplo n.º 8
0
        /// <summary>
        /// Adds additional data information to the AdditionalData property of the node.
        /// </summary>
        /// <param name="additionalData">A dictionary of key value pairs that contain information about a node.</param>
        public void AddAdditionalData(Dictionary <string, List <string> > additionalData)
        {
            Utils.CheckArgumentNull(additionalData, nameof(additionalData));

            foreach (var item in additionalData)
            {
                if (AdditionalData.ContainsKey(item.Key))
                {
                    AdditionalData[item.Key] = item.Value;
                }
                else
                {
                    AdditionalData.Add(item.Key, item.Value);
                }
            }
        }
Exemplo n.º 9
0
 /// <summary>
 /// Checks whether the specified user ID exists in the data.
 /// </summary>
 /// <param name="key">The user ID to check for.</param>
 /// <returns>
 /// <c>true</c> if <paramref name="key" /> exists among the user IDs; otherwise, <c>false</c>.
 /// </returns>
 public bool ContainsUser(UserId key) => AdditionalData.ContainsKey(key);
Exemplo n.º 10
0
 /// <summary>
 /// Returns a boolean value indicating whether the specified key (event ID) is present.
 /// </summary>
 /// <param name="key">The key (event ID) to check.</param>
 /// <returns><c>true</c> if the specified key exists; otherwise, <c>false</c>.</returns>
 public bool ContainsEvent(string key) => AdditionalData.ContainsKey(key);