Пример #1
0
        internal bool GetSkipCurrentFile(IFile staticFile, string generatedFilename)
        {
            if (string.IsNullOrEmpty(staticFile.StaticFileSkipFunction))
            {
                return(false);
            }

            bool skipCurrentFile;

            try
            {
                _Loader.SetGeneratedFileNameOnTemplate(generatedFilename);

                object[] parameters = new object[0];
                // Check whether we must skip the current file
                skipCurrentFile = (bool)_Loader.CallTemplateFunction(staticFile.StaticFileSkipFunction, ref parameters);
            }
            catch
            {
                skipCurrentFile = false;
            }
            if (skipCurrentFile)
            {
                log.InfoFormat("Skipping static file {0}", staticFile.Name);
            }
            return(skipCurrentFile);
        }