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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 105 by william, Sun Mar 10 11:35:26 2013 UTC revision 106 by william, Sun Mar 10 12:25:54 2013 UTC
# Line 3  using System.Collections.Generic; Line 3  using System.Collections.Generic;
3  using System.Linq;  using System.Linq;
4  using System.Text;  using System.Text;
5  using libxmltv.Interfaces;  using libxmltv.Interfaces;
6    using System.Xml.Linq;
7    
8  namespace libxmltv.Core  namespace libxmltv.Core
9  {  {
10      internal class ExtraMetaData : IExtraMetaData      internal class ExtraMetaData : ExtraMetaData<XElement>, IExtraMetaData
11      {      {
12          #region IExtraMetaData memebers          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          #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  }  }

Legend:
Removed from v.105  
changed lines
  Added in v.106

  ViewVC Help
Powered by ViewVC 1.1.22