Dev2.DataList.FuzzyMatchVo.FetchMatch C# (CSharp) Method

FetchMatch() private method

Fetches the match.
private FetchMatch ( string token, string recset ) : string
token string The token.
recset string
return string
        internal string FetchMatch(string token,string recset)
        {
            string result;

            RecordsetColumnsToName.TryGetValue(new Tuple<string, string>(token,recset), out result);

            return result;
        }

Usage Example

コード例 #1
0
        string CreateInjectValue(bool isOutputMapping, FuzzyMatchVo fuzzyMatch, IDev2Definition def)
        {
            string injectValue;
            // When output mapping we need to replace the recordset name if present with MasterRecordset
            //
            string masterRecordsetName;

            if (isOutputMapping && def.IsRecordSet && fuzzyMatch != null)
            {
                var field = def.Name;

                var recordsetName = fuzzyMatch.FetchMatch(def.Name, def.RecordSetName);
                if (!string.IsNullOrEmpty(recordsetName))
                {
                    masterRecordsetName = recordsetName;
                }
                else
                {
                    // we have no match, use the current mapping value ;)
                    masterRecordsetName = def.RecordSetName;
                }

                injectValue = FormatString(masterRecordsetName, field);
            }
            else
            {
                if (def.IsRecordSet)
                {
                    if (fuzzyMatch != null)
                    {
                        var recordsetName = fuzzyMatch.FetchMatch(def.Name, def.RecordSetName);
                        masterRecordsetName = !String.IsNullOrEmpty(recordsetName) ? recordsetName : def.RecordSetName;
                    }
                    else
                    {
                        masterRecordsetName = def.RecordSetName;
                    }

                    injectValue = FormatString(masterRecordsetName, def.Name);
                }
                else
                {
                    injectValue = DataListUtil.AddBracketsToValueIfNotExist(def.Name);
                }
            }

            return(injectValue);
        }
All Usage Examples Of Dev2.DataList.FuzzyMatchVo::FetchMatch