private void VisitDeclaration(NamedTypeSymbol symbol, TextSpan span) { AddDeclaredItem(symbol, span); var constructors = symbol.GetConstructors(); if (constructors.Count() == 1) { // Check whether constructor is a default constructor is defined explicitily if (constructors.First().IsImplicitlyDeclared) { // Add default constructor path this.declaredItems.Add(new DeclaredItemDocument { Name = symbol.Name, Location = this.model.SyntaxTree.GetLineSpan(span, false).StartLinePosition.Line, Identifier = string.Format("{0}.{1}()", symbol.ToDisplayString(), symbol.Name), Type = "Constructor" }); } } }
private void VisitDeclaration(NamedTypeSymbol symbol, TextSpan span) { AddDeclaredItem(symbol, span); var constructors = symbol.GetConstructors(); if (constructors.Count() == 1) { // Check whether constructor is a default constructor is defined explicitily if (constructors.First().IsImplicitlyDeclared) { // Add default constructor path this.declaredItems.Add(new DeclaredItemDocument { Name = symbol.Name, Location = this.model.SyntaxTree.GetLineSpan(span, false).StartLinePosition.Line, Identifier = string.Format("{0}.{1}()", symbol.ToDisplayString(), symbol.Name), Type = "Constructor" }); } } }