Esempio n. 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="typeKind"></param>
        /// <returns></returns>
        public static TypeKind ToTypeKind(this Roslyn.TypeKind typeKind)
        {
            switch (typeKind)
            {
            case Roslyn.TypeKind.Class: return(TypeKind.Class);

            case Roslyn.TypeKind.Interface: return(TypeKind.Interface);
            }

            throw new ArgumentOutOfRangeException(nameof(typeKind), "Unrecognized type kind!");
        }
Esempio n. 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TypeReference"/> class.
 /// </summary>
 /// <param name="baseTypeSyntaxNode"></param>
 /// <param name="semanticModel"></param>
 /// <param name="kind"></param>
 /// <remarks>
 /// Type kind will be stored statically.
 /// </remarks>
 public BaseTypeReference(BaseTypeSyntax baseTypeSyntaxNode, SemanticModel semanticModel, Microsoft.CodeAnalysis.TypeKind kind)
     : base(baseTypeSyntaxNode, semanticModel)
 {
     this.kind = kind;
 }
Esempio n. 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TypeReference"/> class.
 /// </summary>
 /// <param name="baseTypeSyntaxNode"></param>
 /// <param name="kind"></param>
 /// <remarks>
 /// Type kind will be stored statically.
 /// </remarks>
 public BaseTypeReference(BaseTypeSyntax baseTypeSyntaxNode, Microsoft.CodeAnalysis.TypeKind kind)
     : this(baseTypeSyntaxNode, null, kind)
 {
 }
Esempio n. 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TypeReference"/> class.
 /// </summary>
 /// <param name="baseTypeSyntaxNode"></param>
 /// <param name="kind"></param>
 /// <remarks>
 /// Type kind will be stored statically.
 /// </remarks>
 public BaseTypeReference(BaseTypeSyntax baseTypeSyntaxNode, Microsoft.CodeAnalysis.TypeKind kind)
     : this(baseTypeSyntaxNode)
 {
     this.kind = kind;
 }
 /// <summary>
 ///
 /// </summary>
 /// <param name="node"></param>
 /// <param name="semanticModel"></param>
 /// <param name="typeKind"></param>
 /// <returns></returns>
 protected virtual BaseTypeReference CreateBaseTypeReferenceHelper(BaseTypeSyntax node, SemanticModel semanticModel, Roslyn.TypeKind typeKind)
 {
     return(new BaseTypeReference(node, semanticModel, typeKind));
 }