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
static class Helper | |
{ | |
public static T WrapCall<T>(Func<T> func) | |
{ | |
Console.WriteLine("Calling function"); | |
return func(); | |
} | |
} | |
class Foo |
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
[TestMethod] | |
public void TestCalls() | |
{ | |
FooDerived foo = new FooDerived(); | |
Func<int> method = foo.Bar; | |
Assert.AreEqual(1, method()); | |
method = foo.FooBar(); | |
Assert.AreEqual(1, method()); |
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 Antlr.Runtime; | |
public class CaseInsensitiveStringStream : ANTLRStringStream | |
{ | |
// the string used for lookahead (performance improvement by not having to call Char.ToLowerInvariant()) | |
private readonly string _lastring; | |
public CaseInsensitiveStringStream(string input, string sourceName) | |
: base(input, sourceName) | |
{ |
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
namespace Testing.Rfc6570 | |
{ | |
using System; | |
using Microsoft.VisualStudio.TestTools.UnitTesting; | |
using Rackspace.Net; | |
[TestClass] | |
public class SampleTest | |
{ | |
[TestMethod] |
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
namespace net.openstack.Providers.SoftLayer | |
{ | |
using System; | |
using System.Linq; | |
using net.openstack.Core.Caching; | |
using net.openstack.Core.Domain; | |
using net.openstack.Core.Providers; | |
using net.openstack.Providers.Rackspace; | |
using Newtonsoft.Json; | |
using Newtonsoft.Json.Linq; |
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
param( | |
[string]$Assembly, | |
[string]$ExpectedKey, | |
[string]$Build = $null | |
) | |
function Get-PublicKeyToken() { | |
param([string]$assembly = $null) | |
if ($assembly) { | |
$bytes = $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
namespace JavaLanguageService.Panes | |
{ | |
using System; | |
public interface IOutputWindowPane : IDisposable | |
{ | |
string Name | |
{ | |
get; | |
set; |
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
namespace JavaLanguageService.Panes | |
{ | |
internal interface IOutputWindowDefinitionMetadata | |
{ | |
string Name | |
{ | |
get; | |
} | |
} | |
} |
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
namespace JavaLanguageService.Panes | |
{ | |
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel.Composition; | |
using System.Linq; | |
using JavaLanguageService.Extensions; | |
using Microsoft.VisualStudio; | |
using Microsoft.VisualStudio.Shell.Interop; | |
using IOleServiceProvider = Microsoft.VisualStudio.OLE.Interop.IServiceProvider; |
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
namespace JavaLanguageService.Extensions | |
{ | |
using System; | |
using System.Diagnostics.Contracts; | |
using System.Runtime.InteropServices; | |
using Microsoft.VisualStudio; | |
using IOleServiceProvider = Microsoft.VisualStudio.OLE.Interop.IServiceProvider; | |
public static class ServiceProviderExtensions | |
{ |
OlderNewer