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
(22:02:11) (frW) seesharp, var hexRepresentation = string.Join(" ", System.Text.Encoding.Default.GetBytes("me@home.com").Select(x => x.ToString("x").ToUpper())); return System.Text.Encoding.Default.GetBytes(hexRepresentation); | |
(22:02:13) (seesharp) byte[32] { 54, 68, 32, 54, 53, 32, 52, 48, 32, 54, 56, 32, 54, 70, 32, 54, 68, 32, 54, 53, 32, 50, 69, 32, 54, 51, 32, 54, 70, 32, 54, 68 } | |
(21:44:28) (frW) seesharp, Action f = null; f = () => { f(); f(); }; f(); return 1; | |
(21:44:32) (seesharp) timeout |
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
var engine = new ScriptEngine(); | |
var session = engine.CreateSession(); | |
var result = session.Execute("var x = 10; x"); | |
Console.WriteLine(result); |
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
var engine = new ScriptEngine(); | |
var session = engine.CreateSession(); | |
var result = session.Execute("var x = 10; x == 20"); | |
Console.WriteLine(result); |
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
SyntaxTree tree = SyntaxTree.ParseText(code); | |
var root = tree.GetRoot(); |
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
public IEnumerable<CodeIssue> GetIssues(IDocument document, CommonSyntaxNode node, CancellationToken cancellationToken) | |
{ | |
var tokens = from nodeOrToken in node.ChildNodesAndTokens() | |
where nodeOrToken.IsToken | |
select nodeOrToken.AsToken(); | |
foreach (var token in tokens) | |
{ | |
var tokenText = token.ToString(); |
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
var dataFlowAnalysis = semanticModel.AnalyzeDataFlow(containingBlock); | |
var variable = localDeclaration.Declaration.Variables.First(); | |
var symbol = semanticModel.GetDeclaredSymbol(variable); |
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
return new[] { new CodeIssue(CodeIssueKind.Warning, localDeclaration.Span, string.Format("Variable {0} is declared but never used", variable.Identifier)) }; |
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
public IEnumerable<CodeIssue> GetIssues(IDocument document, CommonSyntaxNode node, CancellationToken cancellationToken) | |
{ | |
if (node.GetType() != typeof(LocalDeclarationStatementSyntax)) return null; | |
var localDeclaration = (LocalDeclarationStatementSyntax)node; | |
var semanticModel = document.GetSemanticModel(cancellationToken); | |
var containingBlock = localDeclaration.FirstAncestorOrSelf<BlockSyntax>(); | |
if (containingBlock == null) return null; | |
var dataFlowAnalysis = semanticModel.AnalyzeDataFlow(containingBlock); | |
var variable = localDeclaration.Declaration.Variables.First(); |
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 temporary list -- | |
GetList: | |
IL_0000: nop | |
IL_0001: newobj System.Collections.Generic.List<System.String>..ctor | |
IL_0006: stloc.0 | |
IL_0007: nop | |
IL_0008: ldarg.0 | |
IL_0009: ldfld UserQuery._names | |
IL_000E: callvirt System.Collections.Generic.IEnumerable<System.String>.GetEnumerator | |
IL_0013: stloc.3 |
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
<script src="http://feeds.feedburner.com/fekberg?format=sigpro" type="text/javascript" ></script> | |
<noscript> | |
<p>Subscribe to RSS headline updates from: <a href="http://feeds.feedburner.com/fekberg"></a><br/> | |
Powered by FeedBurner</p> | |
</noscript> |
OlderNewer