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>(); }
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)); }
public AttributeComparer(ICciFilter filter, bool forCompilation) { _helper = new CSDeclarationHelper(filter, forCompilation); }