コード例 #1
0
        private static RuleAnalysisScope GetFileScope(ISourceFile file)
        {
            var fileName = Path.GetFileName(file.Path.AbsolutePath);

            if (ExtensionUtilities.IsModuleConfigurationFile(fileName))
            {
                return(RuleAnalysisScope.PackageConfig);
            }

            if (ExtensionUtilities.IsGlobalConfigurationFile(fileName))
            {
                return(RuleAnalysisScope.RootConfig);
            }

            if (ExtensionUtilities.IsBuildListFile(fileName))
            {
                return(RuleAnalysisScope.BuildListFile);
            }

            return(RuleAnalysisScope.SpecFile);
        }
コード例 #2
0
        /// <nodoc />
        public static bool IsBuildListFile([NotNull] this ISourceFile sourceFile)
        {
            Contract.Requires(sourceFile != null);

            return(ExtensionUtilities.IsBuildListFile(sourceFile.FileName));
        }