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 abstract class Database | |
{ | |
public Database(string connectionString) | |
{ | |
ConnectionString = connectionString; | |
} | |
protected string ConnectionString { get; private set; } | |
public IEnumerable<IDictionary<string, object>> Query(string query, object parameters = 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
<?xml version="1.0" encoding="utf-8" ?> | |
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<Target Name="ClearBinObjFolders"> | |
<PropertyGroup> | |
<DirectoriesToClean> | |
src\tests\ProjectName\bin; | |
src\tests\ProjectName\obj; | |
</DirectoriesToClean> | |
</PropertyGroup> | |
<RemoveDir Directories="$(DirectoriesToClean)" /> |
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 Main() | |
{ | |
var root = new FamilyItem | |
{ | |
Name = "A", | |
FamilyItems = new List<FamilyItem> | |
{ | |
new FamilyItem | |
{ | |
Name = "B", |
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 void Update() | |
{ | |
try | |
{ | |
var user = db.Users.SingleOrDefault(x => x.UserId == userId); | |
if (user == null) | |
{ | |
throw new UserNotFoundException(userId); | |
} |
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 allServices = new Dictionary<string, string[]> | |
{ | |
{ "6.3", new[] { "Appmgmt", "bthserv", "PeerDistSvc", "NfsClnt", "TrkWks", "WPCSvc", | |
"vmickvpexchange", "vmicguestinterface", "vmicshutdown", "vmicheartbeat", | |
"vmicrdv", "vmictimesync", "vmicvss", "IEEtwCollectorService", "iphlpsvc", | |
"Netlogon", "Netlogon", "CscService", "RpcLocator", "MSiSCSI", "SensrSvc", | |
"ScDeviceEnum", "SCPolicySvc", "SNMPTRAP", "StorSvc", "WbioSrvc", | |
"wcncsvc", "fsvc", "WMPNetworkSvc" } }, | |
{ "6.2", new[] { "WMPNetworkSvc", "wcncsvc", "WbioSrvc", "StorSvc", "SNMPTRAP", | |
"SCPolicySvc", "SensrSvc", "RpcLocator", "CscService", "Netlogon", "MSiSCSI", |
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"?> | |
<!-- --> | |
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" /> | |
<Target Name="BeforeBuild" Condition="$(BuildingInsideVisualStudio)"> | |
<Move SourceFiles="App.config" DestinationFiles="App.Base.config" /> | |
<TransformXml Source="App.Base.config" Transform="App.$(Configuration).config" Destination="App.config" /> | |
</Target> | |
<Target Name="AfterBuild" Condition="$(BuildingInsideVisualStudio)"> | |
<Move SourceFiles="App.Base.config" DestinationFiles="App.config" /> |
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
:beep frequency=659 length=150ms | |
:delay 300ms; | |
:beep frequency=659 length=150ms | |
:delay 300ms; | |
:beep frequency=659 length=300ms | |
:delay 600ms; | |
:beep frequency=659 length=150ms | |
:delay 300ms; | |
:beep frequency=659 length=150ms | |
:delay 300ms; |
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
:beep frequency=500 length=500ms; | |
:delay 500ms; | |
:beep frequency=500 length=500ms; | |
:delay 500ms; | |
:beep frequency=500 length=500ms; | |
:delay 500ms; | |
:beep frequency=400 length=500ms; |
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
<Project> | |
<ItemGroup> | |
<Compile Include="$(OutputPath)\MyFile.cs"> | |
<Link>MyFile.cs</Link> | |
</Compile> | |
</ItemGroup> | |
</Project> |
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 Hagbarddenstore.Mvc | |
{ | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web.Mvc; | |
using StructureMap; | |
/// <summary> |