private static Type GetParameterAsType(object parameter)
        {
            if (parameter == null)
            {
                return(null);
            }

            string typeName = string.Format("{0}", parameter);

            if (string.IsNullOrWhiteSpace(typeName))
            {
                return(null);
            }

            return(TypeResolutionService.ResolveType(typeName));
        }
        private Type ValueToCompareToType(IFormatProvider provider)
        {
            Type type = Value as Type;

            if (type != null)
            {
                return(type);
            }

            string name = ValueToCompareToString(provider, true);

            if (string.IsNullOrEmpty(name))
            {
                return(null);
            }

            return(TypeResolutionService.ResolveType(name));
        }