Пример #1
0
        public RuntimeScriptFile CreateNextRuntimeScriptFileInstance(string scriptName, RuntimeScriptFile prevRuntimeScriptFile)
        {
            scriptName.ThrowIfNull(nameof(scriptName));

            if (!RuntimeScriptFile.TryParseNextRuntimeScriptFileInstance(ScriptFileType, FolderPath, scriptName, prevRuntimeScriptFile, out RuntimeScriptFile newRuntimeScriptFile))
            {
                string errorMessage =
                    CoreTextResources
                    .InvalidFilenameErrorMessage
                    .Replace("[Filename]", newRuntimeScriptFile.Filename)
                    .Replace("[FileTypeCode]", ScriptFileType.FileTypeCode)
                    .Replace("[FilenamePattern]", ScriptFileType.FilenamePattern);

                throw new Exception(errorMessage);
            }

            File.AppendAllText(newRuntimeScriptFile.FileFullPath, "", Encoding.UTF8);

            Load();


            return(newRuntimeScriptFile);
        }
Пример #2
0
 public bool TryParseNextRuntimeScriptFileName(string scriptName, RuntimeScriptFile prevRuntimeScriptFile, out RuntimeScriptFile newRuntimeScriptFile)
 {
     return(RuntimeScriptFile.TryParseNextRuntimeScriptFileInstance(ScriptFileType, FolderPath, scriptName, prevRuntimeScriptFile, out newRuntimeScriptFile));
 }