private static T MapBase <T>(SyntaxNode source, string name, SyntaxTokenList modifiers) where T : CodeItem { var element = Activator.CreateInstance <T>(); element.Name = name; element.FullName = GetFullName(source, name); element.Id = element.FullName; element.Tooltip = name; element.StartLine = GetStartLine(source); element.EndLine = GetEndLine(source); element.Foreground = CreateSolidColorBrush(Colors.Black); element.Access = MapAccess(modifiers); element.FontSize = Settings.Default.Font.SizeInPoints; element.ParameterFontSize = Settings.Default.Font.SizeInPoints - 1; element.FontFamily = new FontFamily(Settings.Default.Font.FontFamily.Name); element.FontStyle = FontStyleMapper.Map(Settings.Default.Font.Style); element.Control = _control; return(element); }
private static T MapBase <T>(SyntaxNode source, string name, SyntaxTokenList modifiers, ICodeViewUserControl control, SemanticModel semanticModel) where T : CodeItem { var element = Activator.CreateInstance <T>(); element.Name = name; element.FullName = GetFullName(source, name, semanticModel); element.Id = element.FullName; element.Tooltip = name; element.StartLine = GetStartLine(source); element.StartLinePosition = GetStartLinePosition(source); element.EndLine = GetEndLine(source); element.EndLinePosition = GetEndLinePosition(source); element.Span = source.Span; element.ForegroundColor = Colors.Black; element.Access = MapAccess(modifiers, source); element.FontSize = Settings.Default.Font.SizeInPoints; element.ParameterFontSize = Settings.Default.Font.SizeInPoints - 1; element.FontFamily = new FontFamily(Settings.Default.Font.FontFamily.Name); element.FontStyle = FontStyleMapper.Map(Settings.Default.Font.Style); element.Control = control; return(element); }