Пример #1
0
        public static Profile PullProfile(string customerId)
        {
            Profile customProfile = null;
            string  profileJson   = GetJsonFromUrl(String.Format(@"{0}/{1}", PROFILE_PULL_URL, customerId));

            if (!String.IsNullOrWhiteSpace(profileJson) && profileJson != "null")
            {
                ProfilePull fullProfile = GetObjectFromJson <ProfilePull>(profileJson);
                customProfile = fullProfile.GetCustomProfile();
            }

            return(customProfile);
        }
Пример #2
0
 public static Profile PullProfile(string customerId)
 {
     Profile customProfile = null;
     //string profileJson = GetJsonFromUrl(String.Format(@"{0}/{1}", PROFILE_PULL_URL, customerId));
     string profileJson = File.ReadAllText("");//give json file path here
     if(!String.IsNullOrWhiteSpace(profileJson))
     {
         ProfilePull fullProfile = GetObjectFromJson<ProfilePull>(profileJson);
         customProfile = fullProfile.GetCustomProfile();
     }
     
     return customProfile;
 }