/[xmltv_parser]/trunk/libxmltv/Core/ExtraMetaData.cs
ViewVC logotype

Contents of /trunk/libxmltv/Core/ExtraMetaData.cs

Parent Directory Parent Directory | Revision Log Revision Log


Revision 106 - (show annotations) (download)
Sun Mar 10 12:25:54 2013 UTC (6 years, 6 months ago) by william
File size: 1334 byte(s)

1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Text;
5 using libxmltv.Interfaces;
6 using System.Xml.Linq;
7
8 namespace libxmltv.Core
9 {
10 internal class ExtraMetaData : ExtraMetaData<XElement>, IExtraMetaData
11 {
12 public ExtraMetaData() : base() { }
13 public ExtraMetaData(XElement value) : base(value) { }
14 }
15 internal class ExtraMetaData<TValue> : IExtraMetaData<TValue>
16 where TValue: XElement
17 {
18 public ExtraMetaData() : this(default(TValue)) { }
19 public ExtraMetaData(TValue value)
20 {
21 if (value == null) { throw new ArgumentNullException("value", "cannot be null"); }
22 if (value.Name == null) { throw new ArgumentNullException("value.Name", "cannot be null"); }
23 this.Name = value.Name.ToString();
24 this.Value = value;
25 }
26 #region IExtraMetaData<TKey,TValue> memebers
27 #endregion
28 private string _name;
29 public string Name { get { return _name; } protected set { _name = value; } }
30 private TValue _value;
31 public TValue Value { get { return _value; } protected set { _value = value; } }
32 public override string ToString()
33 {
34 return string.Format("{0}", this.Name);
35 }
36 }
37 }

  ViewVC Help
Powered by ViewVC 1.1.22