public virtual void VisitDocumentationReference(DocumentationReference documentationReference) { if (ThrowException) { throw (Exception)CreateException(documentationReference); } }
public virtual void VisitDocumentationReference(DocumentationReference documentationReference) { if (this.ThrowException) { throw (System.Exception) this.CreateException(documentationReference); } }
public override IEntity ResolveCref(string cref) { if (cref.Length > 2 && cref[1] == ':') { // resolve ID string return(base.ResolveCref(cref)); } var documentationReference = new DocumentationReference(); //new CSharpParser().ParseDocumentationReference(cref); var csharpContext = context as CSharpTypeResolveContext; CSharpResolver resolver; if (csharpContext != null) { resolver = new CSharpResolver(csharpContext); } else { resolver = new CSharpResolver(context.Compilation); } var astResolver = new CSharpAstResolver(resolver, documentationReference); var rr = astResolver.Resolve(documentationReference); MemberResolveResult mrr = rr as MemberResolveResult; if (mrr != null) { return(mrr.Member); } TypeResolveResult trr = rr as TypeResolveResult; if (trr != null) { return(trr.Type.GetDefinition()); } return(null); }
public virtual void VisitDocumentationReference(DocumentationReference documentationReference) { if (this.ThrowException) { throw (Exception)this.CreateException(documentationReference); } }
public DocumentationReference ConvertXmlDoc(DocumentationBuilder doc) { var result = new DocumentationReference(); if (doc.ParsedName != null) { if (doc.ParsedName.Name == "<this>") { result.SymbolKind = SymbolKind.Indexer; } else { result.MemberName = doc.ParsedName.Name; } if (doc.ParsedName.Left != null) { result.DeclaringType = ConvertToType(doc.ParsedName.Left); } else if (doc.ParsedBuiltinType != null) { result.DeclaringType = ConvertToType(doc.ParsedBuiltinType); } if (doc.ParsedName.TypeParameters != null) { for (int i = 0; i < doc.ParsedName.TypeParameters.Count; i++) { result.TypeArguments.Add(ConvertToType(doc.ParsedName.TypeParameters [i])); } } } else if (doc.ParsedBuiltinType != null) { result.SymbolKind = SymbolKind.TypeDefinition; result.DeclaringType = ConvertToType(doc.ParsedBuiltinType); } if (doc.ParsedParameters != null) { result.HasParameterList = true; result.Parameters.AddRange(doc.ParsedParameters.Select(ConvertXmlDocParameter)); } if (doc.ParsedOperator != null) { result.SymbolKind = SymbolKind.Operator; result.OperatorType = (OperatorType)doc.ParsedOperator; if (result.OperatorType == OperatorType.Implicit || result.OperatorType == OperatorType.Explicit) { var returnTypeParam = result.Parameters.LastOrNullObject(); returnTypeParam.Remove(); // detach from parameter list var returnType = returnTypeParam.Type; returnType.Remove(); result.ConversionOperatorReturnType = returnType; } if (result.Parameters.Count == 0) { // reset HasParameterList if necessary result.HasParameterList = false; } } return result; }
/// <inheritdoc/> public virtual void VisitDocumentationReference(DocumentationReference syntax) { VisitNode(syntax); }
public override void VisitDocumentationReference(DocumentationReference syntax) { _underlyingVisitor.VisitDocumentationReference(syntax); }
public RedILNode VisitDocumentationReference(DocumentationReference documentationReference, State data) { return(new EmptyNode()); }
public override void VisitDocumentationReference(DocumentationReference documentationReference) { throw NotSupportedToConsistency(); }
public virtual Node VisitDocumentationReference(DocumentationReference documentationReference) { throw new System.NotImplementedException(); }
public JNode VisitDocumentationReference(DocumentationReference node) { throw new NotImplementedException(); }
public void VisitDocumentationReference(DocumentationReference documentationReference) { throw new NotImplementedException(); }
public virtual void VisitDocumentationReference (DocumentationReference documentationReference) { VisitChildren (documentationReference); }
public virtual void VisitDocumentationReference(DocumentationReference documentationReference) { StartNode(documentationReference); if (!documentationReference.DeclaringType.IsNull) { documentationReference.DeclaringType.AcceptVisitor(this); if (documentationReference.SymbolKind != SymbolKind.TypeDefinition) { WriteToken(Roles.Dot, BoxedTextColor.Operator); } } switch (documentationReference.SymbolKind) { case SymbolKind.TypeDefinition: // we already printed the DeclaringType break; case SymbolKind.Indexer: WriteKeyword(IndexerDeclaration.ThisKeywordRole); break; case SymbolKind.Operator: var opType = documentationReference.OperatorType; if (opType == OperatorType.Explicit) { WriteKeyword(OperatorDeclaration.ExplicitRole); } else if (opType == OperatorType.Implicit) { WriteKeyword(OperatorDeclaration.ImplicitRole); } WriteKeyword(OperatorDeclaration.OperatorKeywordRole); Space(); if (opType == OperatorType.Explicit || opType == OperatorType.Implicit) { documentationReference.ConversionOperatorReturnType.AcceptVisitor(this); } else { WriteTokenOperatorOrKeyword(OperatorDeclaration.GetToken(opType), OperatorDeclaration.GetRole(opType)); } break; default: WriteIdentifier(documentationReference.GetChildByRole(Roles.Identifier), BoxedTextColor.Text); break; } WriteTypeArguments(documentationReference.TypeArguments, CodeBracesRangeFlags.AngleBrackets); if (documentationReference.HasParameterList) { Space(policy.SpaceBeforeMethodDeclarationParentheses); if (documentationReference.SymbolKind == SymbolKind.Indexer) { WriteCommaSeparatedListInBrackets(documentationReference.Parameters, policy.SpaceWithinMethodDeclarationParentheses, CodeBracesRangeFlags.SquareBrackets); } else { WriteCommaSeparatedListInParenthesis(documentationReference.Parameters, policy.SpaceWithinMethodDeclarationParentheses, CodeBracesRangeFlags.Parentheses); } } EndNode(documentationReference); }
public UnifiedElement VisitDocumentationReference(DocumentationReference documentationReference, object data) { throw new NotImplementedException(); }
public Node VisitDocumentationReference(DocumentationReference documentationReference) { return(CreateDummy(documentationReference)); }
public void VisitDocumentationReference(DocumentationReference documentationReference) { throw new Exception("VisitDocumentationReference"); }
public void VisitDocumentationReference(DocumentationReference node) { NotSupported(node); }
public void VisitDocumentationReference(DocumentationReference documentationReference) { StartNode(documentationReference); if (!documentationReference.DeclaringType.IsNull) { documentationReference.DeclaringType.AcceptVisitor(this); if (documentationReference.EntityType != EntityType.TypeDefinition) { WriteToken(Roles.Dot); } } switch (documentationReference.EntityType) { case EntityType.TypeDefinition: // we already printed the DeclaringType break; case EntityType.Indexer: WriteKeyword(IndexerDeclaration.ThisKeywordRole); break; case EntityType.Operator: var opType = documentationReference.OperatorType; if (opType == OperatorType.Explicit) { WriteKeyword(OperatorDeclaration.ExplicitRole); } else if (opType == OperatorType.Implicit) { WriteKeyword(OperatorDeclaration.ImplicitRole); } WriteKeyword(OperatorDeclaration.OperatorKeywordRole); Space(); if (opType == OperatorType.Explicit || opType == OperatorType.Implicit) { documentationReference.ConversionOperatorReturnType.AcceptVisitor(this); } else { WriteToken(OperatorDeclaration.GetToken(opType), OperatorDeclaration.GetRole(opType)); } break; default: WriteIdentifier(documentationReference.MemberName); break; } WriteTypeArguments(documentationReference.TypeArguments); if (documentationReference.HasParameterList) { Space(policy.SpaceBeforeMethodDeclarationParentheses); if (documentationReference.EntityType == EntityType.Indexer) { WriteCommaSeparatedListInBrackets(documentationReference.Parameters, policy.SpaceWithinMethodDeclarationParentheses); } else { WriteCommaSeparatedListInParenthesis(documentationReference.Parameters, policy.SpaceWithinMethodDeclarationParentheses); } } EndNode(documentationReference); }
public StringBuilder VisitDocumentationReference(DocumentationReference documentationReference) { throw new NotImplementedException(); }