예제 #1
0
            public void Add(string key, string value)
            {
                string    dataKey = Attributes.DataKey(key);
                Attribute attr    = new Attribute(dataKey, value);

                enclosingAttributes.Add(dataKey, attr);
            }
예제 #2
0
            public bool TryGetValue(string key, out string value)
            {
                string    dataKey = Attributes.DataKey(key);
                Attribute attr;

                if (!String.IsNullOrEmpty(key) && enclosingAttributes.TryGetValue(dataKey, out attr))
                {
                    value = attr.Value;
                    return(true);
                }
                value = null;
                return(false);
            }
예제 #3
0
 public string this[string key] {
     get {
         if (String.IsNullOrEmpty(key))
         {
             throw new KeyNotFoundException();
         }
         string    dataKey = Attributes.DataKey(key);
         Attribute attr    = enclosingAttributes[dataKey];
         return(attr.Value);
     }
     set {
         string    dataKey = Attributes.DataKey(key);
         Attribute attr    = new Attribute(dataKey, value);
         enclosingAttributes[dataKey] = attr;
     }
 }
예제 #4
0
            public bool Remove(string key)
            {
                string dataKey = Attributes.DataKey(key);

                return(!String.IsNullOrEmpty(key) && enclosingAttributes.Remove(dataKey));
            }
예제 #5
0
            public bool ContainsKey(string key)
            {
                string dataKey = Attributes.DataKey(key);

                return(!String.IsNullOrEmpty(key) && enclosingAttributes.ContainsKey(dataKey));
            }