internal static List <CodeNamePair> GetCodeNamePairList(string domainName, string key, CodeNamePairAppendItemType appendItemType) { CodeNamePair getCustomAppendSelectedItem; CodeNamePair getCustomAppendAllItem; List <CodeNamePair> returnList = CodeNamePairManager.GetList(domainName, key, out getCustomAppendSelectedItem, out getCustomAppendAllItem); CodeNamePair selectedItem; CodeNamePair allItem; CodeNamePairManager.GetDefaultAppendItem(out selectedItem, out allItem); switch (appendItemType) { case CodeNamePairAppendItemType.All: returnList.Insert(0, allItem); break; case CodeNamePairAppendItemType.Select: returnList.Insert(0, selectedItem); break; case CodeNamePairAppendItemType.Custom_Select: returnList.Insert(0, getCustomAppendSelectedItem); break; case CodeNamePairAppendItemType.Custom_All: returnList.Insert(0, getCustomAppendAllItem); break; default: break; } return(returnList); }
public BatchCodeNamePairList GetCodeNamePairs(CodeNamePairQueryFilter query) { BatchCodeNamePairList returnList = new BatchCodeNamePairList(); if (query != null && query.Keys != null && query.Keys.Length > 0) { foreach (var key in query.Keys) { returnList.Add(key, CodeNamePairManager.GetCodeNamePairList(query.DomainName, key, query.AppendItemType)); } } return(returnList); }
public List <CodeNamePair> GetCodeNamePairByKey(CodeNamePairQueryFilter query) { return(CodeNamePairManager.GetCodeNamePairList(query.DomainName, query.Keys[0], query.AppendItemType)); }