Esempio n. 1
0
        private Type GetClientType(ISmartResultProfile profile, Client type)
        {
            var mobileType = (Type)profile.GetType().GetProperty(type.ToString())
                             .GetValue(profile, null);

            return(mobileType);
        }
Esempio n. 2
0
        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);
        }