ZeroInstall.Publish.EntryPoints.Candidate.Analyze C# (CSharp) Method

Analyze() private method

Analyzes a file to determine whether it matches this candidate type and extracts meta data.
private Analyze ( [ baseDirectory, [ file ) : bool
baseDirectory [ The base directory containing the entire application.
file [ The file to be analyzed. Must be located within the or a subdirectory.
return bool
        internal virtual bool Analyze([NotNull] DirectoryInfo baseDirectory, [NotNull] FileInfo file)
        {
            #region Sanity checks
            if (baseDirectory == null) throw new ArgumentNullException(nameof(baseDirectory));
            if (file == null) throw new ArgumentNullException(nameof(file));
            #endregion

            BaseDirectory = baseDirectory;
            RelativePath = file.RelativeTo(BaseDirectory);
            return true;
        }