コード例 #1
0
 protected override Conversion GetInterpolatedStringConversion(BoundUnconvertedInterpolatedString source, TypeSymbol destination, ref CompoundUseSiteInfo <AssemblySymbol> useSiteInfo)
 {
     // An interpolated string expression may be converted to the types
     // System.IFormattable and System.FormattableString
     return((TypeSymbol.Equals(destination, Compilation.GetWellKnownType(WellKnownType.System_IFormattable), TypeCompareKind.ConsiderEverything2) ||
             TypeSymbol.Equals(destination, Compilation.GetWellKnownType(WellKnownType.System_FormattableString), TypeCompareKind.ConsiderEverything2))
         ? Conversion.InterpolatedString : Conversion.NoConversion);
 }
コード例 #2
0
ファイル: TypeConversions.cs プロジェクト: belav/roslyn
 protected override Conversion GetInterpolatedStringConversion(
     BoundUnconvertedInterpolatedString source,
     TypeSymbol destination,
     ref CompoundUseSiteInfo <AssemblySymbol> useSiteInfo
     )
 {
     // Conversions involving interpolated strings require a Binder.
     throw ExceptionUtilities.Unreachable;
 }
コード例 #3
0
 protected override Conversion GetInterpolatedStringConversion(BoundUnconvertedInterpolatedString source, TypeSymbol destination, ref CompoundUseSiteInfo <AssemblySymbol> useSiteInfo)
 {
     if (destination is NamedTypeSymbol {
         IsInterpolatedStringHandlerType : true
     })