Example #1
0
 public DiffCSharpWriter(IStyleSyntaxWriter writer, MappingSettings settings, IEnumerable <DiffComment> diffComments, bool includePseudoCustomAttributes)
     : base(settings)
 {
     _syntaxWriter = writer;
     _settings     = InitializeSettings(settings);
     _formatter    = new CSDeclarationWriter(_syntaxWriter, _settings.Filter, forCompilation: false, includePseudoCustomAttributes: includePseudoCustomAttributes)
     {
         LangVersion = CSDeclarationWriter.LangVersionPreview
     };
     _declHelper   = new CSDeclarationHelper(_settings.Filter, forCompilation: false, includePseudoCustomAttributes: includePseudoCustomAttributes);
     _diffComments = diffComments ?? Enumerable.Empty <DiffComment>();
 }
Example #2
0
        private IEnumerable <SyntaxToken> GetTokenList(IDefinition item)
        {
            // If we have a contextual based service use it otherwise fall back to the simple one
            if (DiffingService != null)
            {
                return(DiffingService.GetTokenList(item));
            }

            if (_declHelper == null)
            {
                _declHelper = new CSDeclarationHelper(new PublicOnlyCciFilter());
            }

            return(_declHelper.GetTokenList(item));
        }
Example #3
0
 public AttributeComparer(ICciFilter filter, bool forCompilation)
 {
     _helper = new CSDeclarationHelper(filter, forCompilation);
 }