SuperMap.Connector.DataProvider.GetFieldInfo C# (CSharp) Method

GetFieldInfo() public method

public GetFieldInfo ( string datasourceName, string datasetName, string fieldName ) : FieldInfo
datasourceName string
datasetName string
fieldName string
return FieldInfo
        public FieldInfo GetFieldInfo(string datasourceName, string datasetName, string fieldName)
        {
#if NET40
            if (string.IsNullOrWhiteSpace(datasourceName))
            {
                throw new ArgumentNullException("datasourceName", Resources.ArgumentIsNotNull);
            }
            if (string.IsNullOrWhiteSpace(datasetName))
            {
                throw new ArgumentNullException("datasetName", Resources.ArgumentIsNotNull);
            }
            if (string.IsNullOrWhiteSpace(fieldName))
            {
                throw new ArgumentNullException("fieldName", Resources.ArgumentIsNotNull);
            }
#else
            if (string.IsNullOrEmpty(datasourceName))
            {
                throw new ArgumentNullException("datasourceName", Resources.ArgumentIsNotNull);
            }
            if (string.IsNullOrEmpty(datasetName))
            {
                throw new ArgumentNullException("datasetName", Resources.ArgumentIsNotNull);
            }
            if (string.IsNullOrEmpty(fieldName))
            {
                throw new ArgumentNullException("fieldName", Resources.ArgumentIsNotNull);
            }
#endif
            string uri = string.Format("{0}/data/datasources/{1}/datasets/{2}/fields/{3}.json?",
               this._serviceUrl, HttpUtility.UrlEncode(datasourceName), HttpUtility.UrlEncode(datasetName), HttpUtility.UrlEncode(fieldName));
            string result = SynchHttpRequest.GetRequestString(uri);
            Dictionary<string, object> hashFieldInfo = JsonConvert.DeserializeObject<Dictionary<string, object>>(result);
            if (hashFieldInfo != null && hashFieldInfo.ContainsKey("fieldInfo") && hashFieldInfo["fieldInfo"] != null)
            {
                return JsonConvert.DeserializeObject<FieldInfo>(hashFieldInfo["fieldInfo"].ToString());
            }
            else
            {
                return null;
            }
        }