Skip to content

Instantly share code, notes, and snippets.

View joeybeninghove's full-sized avatar

Joey Beninghove joeybeninghove

View GitHub Profile
try
{
_nativeDeviceEmulatorManager.Reset();
while (true)
{
category = new DeviceEmulatorCategory(this);
categoryList.Add(category);
_nativeDeviceEmulatorManager.MoveNext();
}
}
namespace TrackAbout.Test.Unit.Spikes
{
public class ClientConfigurationJsonConverterSpecs
{
public class when_serializing_the_client_configuration_to_a_JSON_string : ContextSpecification
{
private string ClientConfigurationJson;
private ClientConfiguration ClientConfiguration;
protected override void When()
<class name="NHibernate.Auction.Category, NHibernate.Auction">
<id name="Id" column="ID"/>
...
<bag name="Items" table="CATEGORY_ITEM" lazy="true">
<key column="CATEGORY_ID"/>
<many-to-many class="NHibernate.Auction.Item, NHibernate.Auction" column="ITEM_ID"/>
</bag>
</class>
<class name="NHibernate.Auction.Item, NHibernate.Auction">
public class AddNewAssetTypeSelectionViewValidator : Validator<IAddNewAssetTypeSelectionView>
{
public AddNewAssetTypeSelectionViewValidator(SiteDeviceConfig siteDeviceConfig)
{
RegisterValidation(new Validation<IAddNewAssetTypeSelectionView>()
.ValidateThat(view => view.AssetClassificationList.HasProductCodeSelected())
.When(() => siteDeviceConfig.ShowProductCode)
.WithMessage(Resources.ProductCode, Resources.ProductCodeNotSelected));
RegisterValidation(new Validation<IAddNewAssetTypeSelectionView>()
public void Continue()
{
var validationResult = _validator.Validate(View);
if (validationResult.HasErrors)
{
View.ShowErrorMessage(validationResult.Error.Message, validationResult.Error.Caption);
return;
}
}
Bind<ICommand<StartSyncData>>()
.To<UnregisterDecorator<StartSyncData>>()
.WithConstructorArgument("underlyingCommand", ctx => ctx.Kernel.Get<ISyncService>());
Bind<ISyncService>()
.To<SyncService>()
.WithConstructorArgument("databaseName", "trackabout.db");
public class WorkflowModule : NinjectModule
{
public override void Load()
{
...
ConfigureCommand<SaveRecord, ISaveRecordWorkflow, SaveRecordWorkflow>();
ConfigureCommand<SetOwnershipActionData, ISetOwnershipWorkflow, SetOwnershipWorkflow>();
ConfigureCommand<SetExpirationDateActionData, ISetExpirationDateWorkflow, SetExpirationDateWorkflow>()
ConfigureCommand<FillActionData, IFillWorkflow, FillWorkflow>();
ConfigureCommand<AddNewActionData, IAddNewWorkflow, AddNewWorkflow>();
class Array
def empty?
count == 0
end
end
class Subversion
def initialize
svn_dirs = ENV['PATH'].split(';').select do |path|
Dir.new(path).entries.include? 'svn.exe' if File.directory? path
#lame attempt at finding svn.exe
svn_dirs = ENV['PATH'].split(';').select do |path|
Dir.new(path).entries.include? 'svn.exe' if File.directory? path
end
raise StandardError.new 'svn.exe was not found in your path' if svn_dirs.empty?
@svn = Pathname.new svn_dirs.first + '/svn.exe'
// both of those classes implement IQuery
IQuery query = printer.IsTransient ? new Queries.Insert(printer) : new Queries.Update(printer);