private Type GetClientType(ISmartResultProfile profile, Client type) { var mobileType = (Type)profile.GetType().GetProperty(type.ToString()) .GetValue(profile, null); return(mobileType); }
private ISmartResultProfile GetProfile(Type desktopType) { ISmartResultProfile profile = null; foreach (var smartProfile in _configuration.Profiles) { var baseType = smartProfile.GetType().GetProperty("Desktop") .GetValue(smartProfile, null); if (baseType != null && (Type)baseType == desktopType) { profile = smartProfile; break; } } return(profile); }