コード例 #1
0
        public string BuildCompositeKey(LocalizationEntry localizationEntry)
        {
            if (string.IsNullOrEmpty(localizationEntry.Culture))
                return localizationEntry.Key;

            return localizationEntry.Key + "$" + localizationEntry.Culture;
        }
コード例 #2
0
        public string BuildCompositeKey(LocalizationEntry localizationEntry)
        {
            if (string.IsNullOrEmpty(localizationEntry.Culture))
            {
                return(localizationEntry.Key);
            }

            return(localizationEntry.Key + "$" + localizationEntry.Culture);
        }
コード例 #3
0
        public LocalizationEntry ParseCompositeKey(string key)
        {
            var keySegments = key.Split('$');

            var localizationEntry = new LocalizationEntry();
            if (keySegments.Length > 1)
            {
                localizationEntry.Key = keySegments[0];
                localizationEntry.Culture = keySegments[1];
            }
            else
            {
                localizationEntry.Key = key;
            }

            return localizationEntry;
        }
コード例 #4
0
        public LocalizationEntry ParseCompositeKey(string key)
        {
            var keySegments = key.Split('$');

            var localizationEntry = new LocalizationEntry();

            if (keySegments.Length > 1)
            {
                localizationEntry.Key     = keySegments[0];
                localizationEntry.Culture = keySegments[1];
            }
            else
            {
                localizationEntry.Key = key;
            }

            return(localizationEntry);
        }