SuperMap.WindowsPhone.Core.CoordinateReferenceSystemConverter.ConvertFrom C# (CSharp) Method

ConvertFrom() public method

${WP_core_CRSTypeConverter_method_ConvertFrom_D}
public ConvertFrom ( ITypeDescriptorContext context, CultureInfo culture, object value ) : object
context ITypeDescriptorContext ${WP_core_CRSTypeConverter_method_ConvertFrom_param_context}
culture System.Globalization.CultureInfo ${WP_core_CRSTypeConverter_method_ConvertFrom_param_culture}
value object ${WP_core_CRSTypeConverter_method_ConvertFrom_param_value}
return object
        public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
        {
            string str = value as string;
            if (str != null)
            {

                int wkid = Convert.ToInt32(str,CultureInfo.InvariantCulture);
                return new CoordinateReferenceSystem(wkid);
            }
            throw new NotSupportedException(ExceptionStrings.InvalidToCRS);
            //TODO:资源 Cannot convert to CoordinateReferenceSystem
        }
CoordinateReferenceSystemConverter