예제 #1
0
        public static file load(string fileName)
        {
            switch (Path.GetExtension(fileName).ToLower())
            {
            case ".mbn": return(new file {
                    data = MBN.load(fileName), type = formatType.model
                });

            case ".xml": return(new file {
                    data = NLP.load(fileName), type = formatType.model
                });

            default: return(load(new FileStream(fileName, FileMode.Open)));
            }
        }
예제 #2
0
        public static file load(string fileName)
        {
            FileLockCheckerHelper.FileReadCheck(fileName);

            switch (Path.GetExtension(fileName).ToLower())
            {
            case ".mbn": return(new file {
                    data = MBN.load(fileName), type = formatType.model
                });

            case ".xml": return(new file {
                    data = NLP.load(fileName), type = formatType.model
                });

            default: return(load(new FileStream(fileName, FileMode.Open, FileAccess.Read)));
            }
        }