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.Collections; | |
using System.Collections.Generic; | |
using System.Collections.Specialized; | |
using Microsoft.Practices.Prism.Regions; | |
using Microsoft.Practices.ServiceLocation; | |
using Moq; | |
using System.Collections.ObjectModel; | |
namespace ArtemisWest.Prism.Testing |
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.Collections.Generic; | |
using System.Collections.ObjectModel; | |
using System.Collections.Specialized; | |
using System.ComponentModel; | |
using System.Linq; | |
using System.Linq.Expressions; | |
using System.Reflection; | |
//TODO: Allow the ability to provide multiple properties to WhenPropertyChanges |
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() | |
{ | |
//I want to have it format like: | |
//------------------------------- | |
// Given a new strategy | |
// When the name is modified | |
// Then raise property changed | |
// When trade added | |
// The DeltaCashSum equals Trade DeltaCash | |
// When invalid trade added |
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 static class ObservableAPMExtensions | |
{ | |
public static IObservable<byte> ToObservable(this FileStream source) | |
{ | |
return source.ToObservable(4096, Scheduler.CurrentThread); | |
} | |
public static IObservable<byte> ToObservable(this FileStream source, int buffersize, IScheduler scheduler) | |
{ | |
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; | |
using System.Reactive.Disposables; | |
using System.Reactive.Linq; | |
using System.Reactive.Concurrency; | |
using Microsoft.Practices.Prism.Logging; | |
using log4net; | |
using log4net.Core; | |
//From ResSharper --> Options --> Code Inspection --> Code Annotations -->Copy default implementation to clipboard |
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 repo = new MyPermissionRepo(); | |
//These will all get batched up and sent together | |
repo.IsPermissioned("Marcus").Dump("Marcus"); | |
repo.IsPermissioned("Lee").Dump("Lee"); | |
repo.IsPermissioned("Merc").Dump("Merc"); | |
repo.IsPermissioned("Si").Dump("Si"); | |
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
<!-- | |
In conjunction with the patch for issue 72 | |
https://code.google.com/p/protobuf-net/issues/detail?id=72 | |
This file can make the current implementation of the Protobuf-net tools useful. Without these however protobuf-net is full of surprises like: | |
* Requiring you to specify if it should detect missing values (why is this not always on?) | |
* Not being able to identify between not specified (null in every other computer system) and the default value | |
* Not being able to compile if an Enum is optional but does not specify a default value?! | |
* Happily serializing invalid messages i.e. where required values are missing |
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.Collections.Generic; | |
using System.Windows; | |
using System.Windows.Controls; | |
using System.Windows.Input; | |
using System.Windows.Media; | |
namespace MyLib | |
{ | |
//http://serialseb.blogspot.co.uk/2007/09/wpf-tips-6-preventing-scrollviewer-from.html |
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; | |
namespace MyLib.Messaging | |
{ | |
public interface IConsumer<out T> | |
{ | |
///<summary>Allows non-destructive read access to the next message on the queue</summary> | |
T Peek(); | |
///<summary>Transactional consumer. Requires a transaction scope to be accessed.</summary> |
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
//2012.06.07 fixed scoping of GUID | |
//2012.05.29 for use with kdb+v3.0, changed handshake and added Guid. boolean v6->vt tracks type capability. | |
//2012.01.26 refactored clamp into clampDT, for Date.DateTime() | |
//2012.01.25 rz() clamp datetime to valid range | |
//2010.11.17 Block sending new timetypes to version of kdb+ prior to v2.6 (use prior release of KdbClient.cs for older kdb+ versions) | |
// Max buffer size (default 64kB) used for reading is now a parameter to the KdbClient constructor | |
// Date, Month, Minute, Second, KTimeSpan are now serializable, implement IComparable | |
// and have default constructors for xml serialization. | |
// Added GetNullRepresentation(Type t) | |
//2010.08.05 Added KException for exceptions due to server error, authentication fail and func decode |
OlderNewer