Beispiel #1
0
        public string DecodeViaDictionary
        (
            string format
        )
        {
            if (string.IsNullOrEmpty(format))
            {
                return(string.Empty);
            }

            char delimiter = format.Contains('!')
                ? '!'
                : '\\';

            bool caseSensitive = delimiter == '\\';

            string[] parts = format.Split(delimiter);
            if (parts.Length != 2)
            {
                return(string.Empty);
            }

            IrbisMenu menu = IrbisMenu.Read
                             (
                Context.Client,
                parts[0]
                             );
            string result = caseSensitive
                ? menu.GetStringSensitive(parts[1], string.Empty)
                : menu.GetString(parts[1], string.Empty);

            return(result);
        }
        protected IrbisMenu CacheMenu
        (
            [NotNull] string name,
            [CanBeNull] IrbisMenu menu
        )
        {
            menu = menu ?? IrbisMenu.Read(Client, name);

            return(menu);
        }