Example #1
0
        public static IrbisMenu Read
        (
            ManagedClient64 client,
            IrbisPath path,
            string name
        )
        {
            string text = client.ReadTextFile(path, name);

            return(ParseText(text));
        }
        /// <summary>
        /// Constructor.
        /// </summary>
        public FileSpecification
        (
            IrbisPath path,
            [NotNull] string fileName
        )
        {
            Sure.NotNullNorEmpty(fileName, nameof(fileName));

            Path     = path;
            FileName = fileName;
        }
Example #3
0
        public PftProgram GetProgram
        (
            string database,
            IrbisPath path,
            string filename
        )
        {
            Preload(database, path, filename);
            string key = ComposeKey(database, path, filename);

            return(_dictionary[key]);
        }
        /// <summary>
        /// Constructor.
        /// </summary>
        public FileSpecification
        (
            IrbisPath path,
            [CanBeNull] string database,
            [NotNull] string fileName
        )
        {
            Sure.NotNullNorEmpty(fileName, nameof(fileName));

            Path     = path;
            Database = database;
            FileName = fileName;
        }
Example #5
0
        public PftCache Preload
        (
            string database,
            IrbisPath path,
            string filename
        )
        {
            string key = ComposeKey(database, path, filename);

            if (!_dictionary.ContainsKey(key))
            {
                // TODO Load and compile script
            }
            return(this);
        }
Example #6
0
 public static string ComposeKey
 (
     string database,
     IrbisPath path,
     string filename
 )
 {
     return(string.Format
            (
                "{0}.{1}.{2}",
                database,
                path,
                filename
            ));
 }