Skip to content

Instantly share code, notes, and snippets.

@hishaamn
Last active May 28, 2017 16:52
Show Gist options
  • Save hishaamn/f28e450e1f2e0b4468d6f8273f156f40 to your computer and use it in GitHub Desktop.
Save hishaamn/f28e450e1f2e0b4468d6f8273f156f40 to your computer and use it in GitHub Desktop.
private List<string> ProfileCards = new List<string> { "{A7D2A5CA-9C01-4D37-A723-DECB23AE32BE}", "{3D34DCD2-D3B8-4BE7-A2F8-63C7F2570153}", "{33AF4F2F-75AF-4755-9533-AD4EF077C54C}" };
private List<PresetInfo> GetProfileCard(ProfileItem profileItem)
{
var presetInfoList = new List<PresetInfo>();
foreach (var profileCard in ProfileCards)
{
var preset = profileItem.ProfileCards[new ID(profileCard)].InnerItem;
string str = HttpUtility.HtmlEncode(ProfileUtil.GetPresetName(preset));
PresetInfo presetInfo = new PresetInfo
{
ID = preset.ID,
ShortID = preset.ID.ToShortID().ToString(),
Name = str,
Key = preset.Key,
Details = preset["Details"]
};
presetInfoList.Add(presetInfo);
}
return presetInfoList;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment