This file contains hidden or 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 interface IKeyedObject<T> | |
{ | |
T Key { get; } | |
} |
This file contains hidden or 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
#GetQueueOwnership | |
param | |
( | |
[string] $queueNameRegex, | |
[string] $userName | |
) | |
[Void][System.Reflection.Assembly]::LoadWithPartialName("System.Messaging") | |
[System.Messaging.MessageQueue]::GetPrivateQueuesByMachine("localhost") | |
This file contains hidden or 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 StuffOnAShelf | |
{ | |
using System; | |
using System.IO; | |
using System.Timers; | |
using log4net; | |
using log4net.Config; | |
using Topshelf.Configuration.Dsl; | |
using Topshelf.Shelving; |
This file contains hidden or 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 Stuff | |
{ | |
using System; | |
using System.IO; | |
using System.Timers; | |
using log4net.Config; | |
using Topshelf; | |
using Topshelf.Configuration; | |
using Topshelf.Configuration.Dsl; |
This file contains hidden or 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" ?> | |
<configuration> | |
<configSections> | |
<section name="ShelfConfiguration" type="Topshelf.Shelving.ShelfConfiguration, TopShelf" /> | |
</configSections> | |
<ShelfConfiguration Bootstrapper="StuffOnAShelf.AShelvedClock, StuffOnAShelf" /> | |
<appSettings> | |
<add key="name" value="Coocoo" /> |
This file contains hidden or 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 Cashbox; | |
public class Program | |
{ | |
private static void Main(string[] args) | |
{ | |
// only open one session for a given file at once | |
using (DocumentSession session = DocumentSessionFactory.Create("test.data")) |
This file contains hidden or 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 static DocumentSession Session { get; private set; } | |
// Code to execute when the application is launching (eg, from Start) | |
// This code will not execute when the application is reactivated | |
private void Application_Launching(object sender, LaunchingEventArgs e) | |
{ | |
Session = DocumentSessionFactory.Create(FileName); | |
} | |
// Code to execute when the application is activated (brought to foreground) |
This file contains hidden or 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 class BalsamiqParser | |
{ | |
public IEnumerable<PageObjectHierarchy> GenerateHierarchy(XDocument balsamiqXml) | |
{ | |
// xml to objects | |
var items = balsamiqXml | |
.Descendants("control") | |
.Select(control => new PageObjectHierarchy | |
{ | |
ControlTypeId = (string)control.Attribute("controlTypeID"), |
This file contains hidden or 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.Collections.Generic; | |
using System.Linq; | |
using MonoTouch.Foundation; | |
using MonoTouch.UIKit; | |
using MonoMobile.MVVM; | |
using System.Collections.ObjectModel; | |
namespace MVVMExample | |
{ |
This file contains hidden or 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 interface ICommandPublisher | |
{ | |
void Publish<T>(T command) where T : ICommand; | |
} | |
public class MassTransitCommandPublisher : ICommandPublisher, ILoggingSource | |
{ | |
public void Publish<T>(T command) where T : ICommand | |
{ | |
this.Debug("Publishing command {0}", command.GetType().Name); |
OlderNewer