コード例 #1
0
        private static void SetupCustomNotNullMethods(Compilation compilation, AnalyzerOptions options)
        {
            var file = options.AdditionalFiles.FirstOrDefault(i =>
                                                              i.Path.EndsWith("NullContracts.NotNullMethods.txt", System.StringComparison.OrdinalIgnoreCase)) ?? cachedFile;

            if (file == null)
            {
                return;
            }
            cachedFile = file;
            SystemTypeSymbols.AddExternalNotNullMethods(compilation, file);
        }
コード例 #2
0
ファイル: Cache.cs プロジェクト: FUR10N/NullContracts
 public CompilationInfo(SemanticModel model)
 {
     this.Model   = model;
     this.Symbols = new SystemTypeSymbols(model.Compilation);
 }