This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyClass | |
{ | |
private int oAsInt32; | |
void Method(object o) | |
{ | |
var oAsInt32 = o as int?; | |
if (oAsInt32 != null) | |
{ | |
Console.Write(oAsInt32.Value); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
System.AggregateException was unhandled | |
HResult=-2146233088 | |
Message=One or more errors occurred. | |
Source=mscorlib | |
StackTrace: | |
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) | |
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification) | |
at System.Threading.Tasks.Task`1.get_Result() | |
at ConsoleApplication1.Test.Execute() in D:\Github\Thesis\SourceCode\ThesisConsole\ConsoleApplication1\Test.cs:line 47 | |
at ConsoleApplication1.Program.Main(String[] args) in D:\Github\Thesis\SourceCode\ThesisConsole\ConsoleApplication1\Program.cs:line 18 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Test method VSDiagnostics.Test.Tests.General.TryCastUsingAsNotNullInsteadOfIsAsTests.TryCastWithoutUsingAsNotNull_BranchedIfStatement threw exception: | |
RoslynTester.Helpers.Testing.AssertionException: | |
Expected document is not the same as the resulting one. | |
Expected: | |
using System; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Linq; | |
using Microsoft.CodeAnalysis; | |
using Microsoft.CodeAnalysis.CSharp.Syntax; | |
using Microsoft.CodeAnalysis.Editing; | |
using Microsoft.CodeAnalysis.Text; | |
namespace ConsoleApplication1 | |
{ | |
internal class Test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Test method VSDiagnostics.Test.Tests.General.TryCastUsingAsNotNullInsteadOfIsAsTests.TryCastWithoutUsingAsNotNull_ConflictingLocalExplicitlyReferringToField threw exception: | |
System.AggregateException: One or more errors occurred. ---> System.InvalidCastException: Unable to cast object of type 'Microsoft.CodeAnalysis.CSharp.Syntax.VariableDeclaratorSyntax' to type 'Microsoft.CodeAnalysis.CSharp.Syntax.StatementSyntax'. | |
at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxRewriter.VisitListElement(TNode node) | |
at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxRewriter.VisitList(SyntaxList`1 list) | |
at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxRewriter.VisitBlock(BlockSyntax node) | |
at Microsoft.CodeAnalysis.CSharp.Syntax.BlockSyntax.Accept(CSharpSyntaxVisitor`1 visitor) | |
at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxRewriter.Visit(SyntaxNode node) | |
at Microsoft.CodeAnalysis.CSharp.Syntax.SyntaxReplacer.Replacer`1.Visit(SyntaxNode node) | |
at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxRewriter.VisitIfStatement(If |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Method(object o) | |
{ | |
if (o is string && ((string) o).Length > 1) | |
{ | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> VSDiagnostics.dll!VSDiagnostics.Diagnostics.General.TryCastWithoutUsingAsNotNull.TryCastWithoutUsingAsNotNullCodeFix.GetNewIdentifier(string currentIdentifier, Microsoft.CodeAnalysis.CSharp.Syntax.TypeSyntax type, Microsoft.CodeAnalysis.SemanticModel semanticModel) Line 156 C# | |
VSDiagnostics.dll!VSDiagnostics.Diagnostics.General.TryCastWithoutUsingAsNotNull.TryCastWithoutUsingAsNotNullCodeFix.UseAsAsync(Microsoft.CodeAnalysis.Document document, Microsoft.CodeAnalysis.SyntaxNode statement) Line 110 C# | |
VSDiagnostics.dll!VSDiagnostics.Diagnostics.General.TryCastWithoutUsingAsNotNull.TryCastWithoutUsingAsNotNullCodeFix.RegisterCodeFixesAsync.AnonymousMethod__0(System.Threading.CancellationToken x) Line 33 C# | |
Microsoft.CodeAnalysis.Workspaces.dll!Microsoft.CodeAnalysis.CodeActions.CodeAction.DocumentChangeAction.GetChangedDocumentAsync(System.Threading.CancellationToken cancellationToken) Unknown | |
Microsoft.CodeAnalysis.Workspaces.dll!Microsoft.CodeAnalysis.CodeActions.CodeAction.GetChangedSolutionAsync(Sy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
at VSDiagnostics.Diagnostics.General.TryCastWithoutUsingAsNotNull.TryCastWithoutUsingAsNotNullCodeFix.GetNewIdentifier(String currentIdentifier, TypeSyntax type, SemanticModel semanticModel) in | |
D:\Github\VSDiagnostics\VSDiagnostics\VSDiagnostics\VSDiagnostics\Diagnostics\General\TryCastWithoutUsingAsNotNull\TryCastWithoutUsingAsNotNullCodeFix.cs:line 156 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
?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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<entry> | |
<record>576</record> | |
<time>2016/01/23 00:54:09.530</time> | |
<type>Error</type> | |
<source>TryCastWithoutUsingAsNotNullCodeFix</source> | |
<description>One or more errors occurred.
 at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
 at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
 at Microsoft.CodeAnalysis.Editor.Implementation.Suggestions.SuggestedAction.<>c__DisplayClass13_0.<InvokeCore>b__0()
 at Microsoft.CodeAnalysis.Extensions.IExtensionManagerExtensions.PerformAction(IExtensionManager extensionManager, Object extension, Action action)</description> | |
</entry> |