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.Diagnostics; | |
namespace Tools.Debugging | |
{ | |
public class ExecutionTimeLogger : IDisposable | |
{ | |
private readonly Stopwatch watch; | |
private readonly string _titleForWhatIsBeingTracked; | |
private readonly string _callingMethodName; |
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
/** | |
* Tyco Door/Window Sensor | |
* | |
* Copyright 2015 SmartThings | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except | |
* in compliance with the License. You may obtain a copy of the License at: | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* |
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
<?xml version="1.0" encoding="utf-8"?> | |
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"> | |
<CodeSnippet Format="1.0.0"> | |
<Header> | |
<Title>Async Unit Test</Title> | |
<Author>Rusty Divine</Author> | |
<Description>Async Unit Test Template with 3 Parts</Description> | |
<HelpUrl>https://msdn.microsoft.com/en-us/library/ms165394.aspx</HelpUrl> | |
<SnippetTypes /> | |
<Keywords /> |
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
private string RandomString | |
{ | |
get | |
{ | |
var path = String.Empty; // returns random string of 11 chars | |
for (int i = 0; i < 9; i++) | |
{ | |
path += Path.GetRandomFileName(); | |
} | |
return path.Replace(".", ""); |
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.Expressions; | |
using Moq.Language.Flow; | |
namespace Moq | |
{ | |
public static class MoqExtensions | |
{ | |
public static ISetup<T, TResult> SetupIgnoreArgs<T, TResult>(this Mock<T> mock, | |
Expression<Func<T, TResult>> expression) |
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
declare @tableName varchar(200) | |
declare @columnName varchar(200) | |
declare @nullable varchar(50) | |
declare @datatype varchar(50) | |
declare @maxlen int | |
declare @sType varchar(50) | |
declare @sProperty varchar(200) | |
DECLARE table_cursor CURSOR FOR |