internal override void GenerateSyntax(MemberType type, ISymbol symbol, SyntaxDetail syntax, SymbolVisitorAdapter adapter) { foreach (var generator in _generators) { generator.GenerateSyntax(type, symbol, syntax, adapter); } }
public static SyntaxDetailViewModel ToSyntaxDetailViewModel(this SyntaxDetail model) { if (model == null) { return(null); } var result = new SyntaxDetailViewModel { Parameters = model.Parameters, TypeParameters = model.TypeParameters, Return = model.Return, }; if (model.Content != null && model.Content.Count > 0) { result.Content = model.Content.GetLanguageProperty(SyntaxLanguage.Default); var contentForCSharp = model.Content.GetLanguageProperty(SyntaxLanguage.CSharp); if (result.Content != contentForCSharp) { result.ContentForCSharp = contentForCSharp; } var contentForVB = model.Content.GetLanguageProperty(SyntaxLanguage.VB); if (result.Content != contentForVB) { result.ContentForVB = contentForVB; } } return(result); }
internal override sealed void GenerateSyntax(MemberType type, ISymbol symbol, SyntaxDetail syntax, SymbolVisitorAdapter adapter) { string syntaxStr = GetSyntaxContent(type, symbol, adapter); Debug.Assert(!string.IsNullOrEmpty(syntaxStr)); if (string.IsNullOrEmpty(syntaxStr)) return; syntax.Content[Language] = syntaxStr; }
public void CopyInheritedData(SyntaxDetail src) { if (src == null) { throw new ArgumentNullException(nameof(src)); } CopyInheritedParameterList(Parameters, src.Parameters); CopyInheritedParameterList(TypeParameters, src.TypeParameters); if (Return != null && src.Return != null) { Return.CopyInheritedData(src.Return); } }
internal abstract void GenerateSyntax(MemberType type, ISymbol symbol, SyntaxDetail syntax, SymbolVisitorAdapter adapter);
internal abstract void GenerateSyntax(MemberType type, ISymbol symbol, SyntaxDetail syntax, SymbolVisitorAdapter adapter);
internal override sealed void GenerateSyntax(MemberType type, ISymbol symbol, SyntaxDetail syntax, SymbolVisitorAdapter adapter) { string syntaxStr = GetSyntaxContent(type, symbol, adapter); Debug.Assert(!string.IsNullOrEmpty(syntaxStr)); if (string.IsNullOrEmpty(syntaxStr)) { return; } syntax.Content[Language] = syntaxStr; }