public override string try_to_find_log_syntax()
        {
            if (cached_syntax_ != "")
                return cached_syntax_;

            string found = new find_log_syntax().try_find_log_syntax(fs);
            if (found != UNKNOWN_SYNTAX)
                cached_syntax_ = found;
            return found;
        }
Beispiel #2
0
        public override string try_to_find_log_syntax()
        {
            if (cached_syntax_ != "")
                return cached_syntax_;

            try {
                using (var fs = new FileStream(file_, FileMode.Open, FileAccess.Read, FileShare.ReadWrite)) {
                    string found = new find_log_syntax().try_find_log_syntax(fs);
                    if (found != UNKNOWN_SYNTAX)
                        cached_syntax_ = found;
                    return found;
                }
            } catch {
                return UNKNOWN_SYNTAX;
            }
        }