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
try | |
{ | |
_nativeDeviceEmulatorManager.Reset(); | |
while (true) | |
{ | |
category = new DeviceEmulatorCategory(this); | |
categoryList.Add(category); | |
_nativeDeviceEmulatorManager.MoveNext(); | |
} | |
} |
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 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() |
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
<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"> |
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 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>() |
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 Continue() | |
{ | |
var validationResult = _validator.Validate(View); | |
if (validationResult.HasErrors) | |
{ | |
View.ShowErrorMessage(validationResult.Error.Message, validationResult.Error.Caption); | |
return; | |
} | |
} |
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
Bind<ICommand<StartSyncData>>() | |
.To<UnregisterDecorator<StartSyncData>>() | |
.WithConstructorArgument("underlyingCommand", ctx => ctx.Kernel.Get<ISyncService>()); | |
Bind<ISyncService>() | |
.To<SyncService>() | |
.WithConstructorArgument("databaseName", "trackabout.db"); | |
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 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>(); |
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
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 |
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
#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' |
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
// both of those classes implement IQuery | |
IQuery query = printer.IsTransient ? new Queries.Insert(printer) : new Queries.Update(printer); |
OlderNewer