Skip to content

Instantly share code, notes, and snippets.

@Vannevelj
Last active January 23, 2016 01:46
Show Gist options
  • Save Vannevelj/9d1f696ca58d90898341 to your computer and use it in GitHub Desktop.
Save Vannevelj/9d1f696ca58d90898341 to your computer and use it in GitHub Desktop.
?semanticModel.GetTypeInfo(type)
'semanticModel.GetTypeInfo(type)' threw an exception of type 'System.NullReferenceException'
Data: {System.Collections.ListDictionaryInternal}
HResult: -2147467261
HelpLink: null
IPForWatsonBuckets: {0}
InnerException: null
IsTransient: false
Message: "Object reference not set to an instance of an object."
RemoteStackTrace: null
Source: null
StackTrace: null
TargetSite: null
WatsonBuckets: null
_HResult: -2147467261
_className: null
_data: {System.Collections.ListDictionaryInternal}
_dynamicMethods: null
_exceptionMethod: null
_exceptionMethodString: null
_helpURL: null
_innerException: null
_ipForWatsonBuckets: {0}
_message: "Object reference not set to an instance of an object."
_remoteStackIndex: 0
_remoteStackTraceString: null
_safeSerializationManager: {System.Runtime.Serialization.SafeSerializationManager}
_source: null
_stackTrace: null
_stackTraceString: null
_watsonBuckets: null
_xcode: -532462766
_xptrs: {0}
?type
PredefinedTypeSyntax PredefinedType string
ContainsAnnotations: false
ContainsDiagnostics: false
ContainsDirectives: false
ContainsSkippedText: false
CsGreen: PredefinedTypeSyntax PredefinedType string
EndPosition: 339
FullSpan: {[333..339)}
FullWidth: 6
Green: PredefinedTypeSyntax PredefinedType string
HasErrors: false
HasLeadingTrivia: false
HasStructuredTrivia: false
HasTrailingTrivia: false
IsList: false
IsMissing: false
IsStructuredTrivia: false
IsVar: false
Keyword: SyntaxToken StringKeyword string
KindText: "PredefinedType"
Language: "C#"
Location: SourceLocation(c:\users\jeroen\documents\visual studio 2015\Projects\ConsoleApplication149\ConsoleApplication149\Program.cs@17:34)"string"
Navigator: {Microsoft.CodeAnalysis.CSharp.Syntax.SyntaxNavigator}
Parent (Microsoft.CodeAnalysis.SyntaxNode): CastExpressionSyntax CastExpression (string) o
Parent: CastExpressionSyntax CastExpression (string) o
ParentOrStructuredTriviaParent (Microsoft.CodeAnalysis.SyntaxNode): CastExpressionSyntax CastExpression (string) o
ParentOrStructuredTriviaParent: CastExpressionSyntax CastExpression (string) o
ParentTrivia: SyntaxTrivia None
Position: 333
RawKind: 8621
SlotCount: 1
Span: {[333..339)}
SpanStart: 333
SyntaxTree (Microsoft.CodeAnalysis.SyntaxNode): {using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication149
{
class Program
{
static void Main(string[] args)
{
}
void Method(object o)
{
if (o is string && ((string) o).Length > 1)
{
}
}
}
}
}
SyntaxTree: {using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication149
{
class Program
{
static void Main(string[] args)
{
}
void Method(object o)
{
if (o is string && ((string) o).Length > 1)
{
}
}
}
}
}
SyntaxTreeCore: {using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication149
{
class Program
{
static void Main(string[] args)
{
}
void Method(object o)
{
if (o is string && ((string) o).Length > 1)
{
}
}
}
}
}
Width: 6
_parent: CastExpressionSyntax CastExpression (string) o
_syntaxTree: {using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication149
{
class Program
{
static void Main(string[] args)
{
}
void Method(object o)
{
if (o is string && ((string) o).Length > 1)
{
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment