NAnt.DotNet.Tasks.LicenseTask.NeedsCompiling C# (CSharp) Method

NeedsCompiling() private method

Determines whether the .licenses file needs to be recompiled or is uptodate.
private NeedsCompiling ( FileInfo licensesFile ) : bool
licensesFile System.IO.FileInfo The .licenses file.
return bool
        private bool NeedsCompiling(FileInfo licensesFile)
        {
            if (!licensesFile.Exists) {
                Log(Level.Verbose, ResourceUtils.GetString("String_OutputFileDoesNotExist"),
                    licensesFile.FullName);
                return true;
            }

            // check if assembly references were updated
            string fileName = FileSet.FindMoreRecentLastWriteTime(Assemblies.FileNames, licensesFile.LastWriteTime);
            if (fileName != null) {
                Log(Level.Verbose, ResourceUtils.GetString("String_FileHasBeenUpdated"),
                    fileName);
                return true;
            }

            // check if input file was updated
            if (InputFile != null) {
                fileName = FileSet.FindMoreRecentLastWriteTime(InputFile.FullName, licensesFile.LastWriteTime);
                if (fileName != null) {
                    Log(Level.Verbose, ResourceUtils.GetString("String_FileHasBeenUpdated"),
                        fileName);
                    return true;
                }
            }

            // if we made it here then we don't have to recompile
            return false;
        }