private static string GetAdapterName(IExternalAdapter adapter)
        {
            ExternalAdapterAttribute attribute = adapter.GetType().GetCustomAttributes(typeof(ExternalAdapterAttribute), false).FirstOrDefault() as ExternalAdapterAttribute;

            if (attribute == null)
            {
                return(null);
            }
            return(attribute.FriendlyName);
        }
        private static bool Exists(IExternalAdapter adapterInfo)
        {
            ExternalAdapterAttribute attribute = adapterInfo.GetType().GetCustomAttributes(typeof(ExternalAdapterAttribute), false).FirstOrDefault() as ExternalAdapterAttribute;

            if (attribute == null)
            {
                return(false);
            }
            return(attribute.ProcessNames.All(p => ExistsOnPath(p)));
        }
예제 #3
0
 private static ExternalAdapterAttribute GetAdapterAttribute(IExternalAdapter adapter)
 {
     return(adapter.GetType().GetCustomAttributes(typeof(ExternalAdapterAttribute), false).FirstOrDefault() as ExternalAdapterAttribute);
 }