Example #1
0
        public T?GetValue <T>(IEnumerable <M3U8TagInstance> tags) where T : struct
        {
            ValueTagInstance valueTagInstance = this.Find(tags);

            if (null == valueTagInstance)
            {
                return(new T?());
            }
            return(new T?((T)valueTagInstance.Value));
        }
Example #2
0
        public T GetObject <T>(IEnumerable <M3U8TagInstance> tags) where T : class
        {
            ValueTagInstance valueTagInstance = this.Find(tags);

            if (null == valueTagInstance)
            {
                return(default(T));
            }
            return((T)valueTagInstance.Value);
        }
 internal static ValueTagInstance CreateLong(M3U8Tag tag, string value)
 {
     return(ValueTagInstance.Create(tag, value, (Func <string, object>)(v => (object)long.Parse(v, (IFormatProvider)CultureInfo.InvariantCulture))));
 }