Esempio n. 1
0
 public override object ConvertFromInvariantString(string file)
 {
     if (file != null)
     {
         return((FileVideoSource)VideoSource.FromFile(file));
     }
     object[] objArray1 = new object[] { typeof(FileVideoSource) };
     throw new InvalidOperationException($"Cannot convert file into {(object[]) objArray1}");
 }
        public override object ConvertFromInvariantString(string value)
        {
            Uri uri;

            if (value == null)
            {
                return(null);
            }
            if (Uri.TryCreate(value, (UriKind)UriKind.Absolute, out uri) && (uri.Scheme != "file"))
            {
                return(VideoSource.FromUri(uri));
            }
            return(VideoSource.FromFile(value));
        }