Пример #1
0
        public static string GetMinimalSupportedVersion(EntryPointNotFoundException ex)
        {
            MinimalLibVlcVersion minVersion = (MinimalLibVlcVersion)Attribute.GetCustomAttribute(ex.TargetSite, typeof(MinimalLibVlcVersion));

            if (minVersion != null)
            {
                return(minVersion.MinimalVersion);
            }

            return(string.Empty);
        }
        internal void HandleMissingApi(MinimalLibVlcVersion minVer)
        {
            Version supportedVersion = new Version(minVer.MinimalVersion);

            if (m_currentVersion < supportedVersion)
            {
                string msg = string.Format("Using libVLC {0}, while requested API available with libVLC {1} or higher",
                                           m_currentVersion, minVer.MinimalVersion);
                throw new LibVlcFutureVersionException(msg);
            }
        }
Пример #3
0
 private void TrySetupLogging()
 {
     try
     {
         m_log = new LogSubscriber(m_logger);
     }
     catch (EntryPointNotFoundException ex)
     {
         MinimalLibVlcVersion minVersion = (MinimalLibVlcVersion)Attribute.GetCustomAttribute(ex.TargetSite, typeof(MinimalLibVlcVersion));
         if (minVersion != null)
         {
             string msg = string.Format("libVLC logging functinality enabled staring libVLC version {0} while you are using version {1}", minVersion.MinimalVersion, Version);
             m_logger.Warning(msg);
         }
     }
     catch (Exception ex)
     {
         string msg = string.Format("Failed to setup logging, reason : {0}", ex.Message);
         m_logger.Error(msg);
     }
 }