10 |
|
|
11 |
namespace libxmltv.Core |
namespace libxmltv.Core |
12 |
{ |
{ |
13 |
|
|
14 |
public class PropertyCollection<T> : IPropertyCollection<T> |
public class PropertyCollection<T> : IPropertyCollection<T> |
15 |
{ |
{ |
16 |
private List<T> items = new List<T>(); |
private List<T> items = new List<T>(); |
26 |
public IEnumerator<T> GetEnumerator() { return items.GetEnumerator(); } |
public IEnumerator<T> GetEnumerator() { return items.GetEnumerator(); } |
27 |
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { return items.GetEnumerator(); } |
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { return items.GetEnumerator(); } |
28 |
} |
} |
29 |
public class PropertyDictionary : PropertyDictionary<string, object> |
public class PropertyDictionary : PropertyDictionary<string, object>, IPropertyDictionary |
30 |
{ |
{ |
31 |
public PropertyDictionary() : base() { } |
public PropertyDictionary() : base() { } |
32 |
public PropertyDictionary(IPropertyDictionary dictionary) : base(dictionary) { } |
public PropertyDictionary(IPropertyDictionary dictionary) : base(dictionary) { } |
116 |
public bool RemoveProperty(TKey key) { return properties.Remove(key); } |
public bool RemoveProperty(TKey key) { return properties.Remove(key); } |
117 |
public bool TryGetPropertyValue(TKey key, out TValue value) { return properties.TryGetValue(key, out value); } |
public bool TryGetPropertyValue(TKey key, out TValue value) { return properties.TryGetValue(key, out value); } |
118 |
public int PropertyCount { get { return properties.Count; } } |
public int PropertyCount { get { return properties.Count; } } |
119 |
public bool IsReadOnly { get { return (properties as ICollection<TKey>).IsReadOnly; } } |
public bool IsReadOnly { get { return (properties as IPropertyCollection<TKey>).IsReadOnly; } } |
120 |
public void AddProperty(PropertyValuePair<TKey, TValue> item) { AddProperty(item.Name, item.Value); } |
public void AddProperty(PropertyValuePair<TKey, TValue> item) { AddProperty(item.Name, item.Value); } |
121 |
public void ClearProperties() { properties.Clear(); } |
public void ClearProperties() { properties.Clear(); } |
122 |
public bool ContainsProperty(PropertyValuePair<TKey, TValue> item) { return ContainsProperty(item.Name); } |
public bool ContainsProperty(PropertyValuePair<TKey, TValue> item) { return ContainsProperty(item.Name); } |