static bool PropSuccess(MediaProperties props) { if (props.Type == MediaType.NotSupported) { return(false); } else { return(true); } }
public static MediaProperties Parse(Stream stream) { if (stream == null) { throw new ArgumentNullException("stream"); } if (!stream.CanSeek) { throw new ArgumentException("Stream must be seekable."); } foreach (var f in mediaDispatch) { stream.Position = 0; MediaProperties props = f(stream); if (PropSuccess(props)) { return(props); } } return(new MediaProperties()); }