Esempio n. 1
0
            public RoslynOrigin(INamedTypeSymbol symbol)
            {
                if (symbol.TypeKind != Microsoft.CodeAnalysis.TypeKind.Class &&
                    symbol.TypeKind != Microsoft.CodeAnalysis.TypeKind.Struct)
                {
                    throw new ArgumentOutOfRangeException(
                              nameof(symbol),
                              symbol,
                              "Provided symbol is not of a data type kind.");
                }

                this.symbol        = symbol ?? throw new ArgumentNullException(nameof(symbol));
                this.membersOrigin = new RoslyTypeMembersOrigin(symbol);
            }
Esempio n. 2
0
 public RoslynOrigin(INamedTypeSymbol symbol)
 {
     this.symbol        = symbol ?? throw new ArgumentNullException(nameof(symbol));
     this.membersOrigin = new RoslyTypeMembersOrigin(symbol);
 }