/// <summary>
 ///
 /// </summary>
 /// <param name="name"></param>
 /// <returns></returns>
 public TemplateAction this[string name]
 {
     get
     {
         lock (_niz) lock (_originalniNiz) lock (_actions)
                 {
                     if (_actions.ContainsKey(name))
                     {
                         return(_actions[name]);
                     }
                     return(null);
                 }
     }
     set
     {
         lock (_niz) lock (_originalniNiz) lock (_actions)
                 {
                     //if (value == null)
                     //{
                     //    _actions.Remove(name);
                     //    return;
                     //}
                     TemplateAction _tmpAction = value;
                     if (SafeMode)
                     {
                         _tmpAction.Data = WebUtility.HtmlEncode(value.Data);
                     }
                     if (!_actions.ContainsKey(name))
                     {
                         _actions.Add(name, _tmpAction);
                         _posodobljenNiz = true;
                     }
                     else
                     {
                         _actions[name]  = _tmpAction;
                         _posodobljenNiz = true;
                     }
                 }
     }
 }
Exemple #2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="name"></param>
 /// <returns></returns>
 public TemplateAction this[string name]
 {
     get
     {
         lock (_actions)
         {
             if (_actions.ContainsKey(name))
             {
                 return(_actions[name]);
             }
             return(null);
         }
     }
     set
     {
         lock (_actions)
         {
             if (value == null)
             {
                 _actions.Remove(name);
                 return;
             }
             TemplateAction _tmpAction = value;
             if (SafeMode)
             {
                 _tmpAction.Data = WebUtility.HtmlEncode(value.Data);
             }
             if (!_actions.ContainsKey(name))
             {
                 _actions.Add(name, _tmpAction);
             }
             else
             {
                 _actions[name] = _tmpAction;
             }
         }
     }
 }