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
| Fixed Object Ref exception when 1000 card quantity was selected. Encountered ugliest code base I've seen in years. Tweeted lots about it.. and fixed stupid HTML fucked-up-ed-ness. Word. |
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
| protected void GetPriceDetails() | |
| { | |
| var oc = new MiddleTier.BLL.OrderConfirmation(); | |
| oc = OrderConfirmationUtility.GetOrderConfirmation(Convert.ToInt32(this.OrderConfirmationID)); | |
| var Quantity = oc.Quantity; | |
| var Paper = oc.Paper; | |
| var DeliverySpeed = oc.DeliverySpeed; |
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 LocationClassifier : ILocationClassifier | |
| { | |
| private readonly IFixMessageRepository fixRepo; | |
| private readonly IExecutingBrokerFactory executingBrokerFactory; | |
| public LocationClassifier(IFixMessageRepository fixRepo, IExecutingBrokerFactory executingBrokerFactory) | |
| { | |
| this.fixRepo = fixRepo; | |
| this.executingBrokerFactory = executingBrokerFactory; | |
| } |
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.IO; | |
| namespace OutRefsSuck | |
| { | |
| internal static class Program | |
| { | |
| private static void CallSomeFunction(string value1, string value2, Action<string> doneAction) | |
| { | |
| doneAction(value1 + value2); |
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
| ------ Test started: Assembly: GallioTestRunner.dll ------ | |
| Gallio TestDriven.Net Runner - Version 3.2 build 601 | |
| Test Files: | |
| D:\Dev\Playground\MultiTestRunners\GallioTestRunner\bin\Debug\GallioTestRunner.dll | |
| Start time: 8:43 AM | |
| Verifying test files. | |
| Initializing the test runner. |
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 IMappingExpression<Procurement, ProcurementViewModel> CreateDestinationMap() | |
| { | |
| return Mapper.CreateMap<Procurement, ProcurementViewModel>() | |
| .ForMember(dest => dest.Id, opt => opt.MapFrom(p => p.Procurement_ID)) | |
| .ForMember(dest => dest.Donors, | |
| opt => opt.MapFrom(p => | |
| Mapper.Map<IEnumerable<Donor>, IEnumerable<ProcurementDonorViewModel>>(p.ProcurementDonors.Select(x => x.Donor)) | |
| )); | |
| } |
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 class ReadAllLinesHelper | |
| { | |
| public static IEnumerable<string> For(this string[] lines) | |
| { | |
| return lines; | |
| } | |
| public static IEnumerable<T> EachLineWeCareAbout<T>(this IEnumerable<string> lines, IParser parser) | |
| { | |
| return lines.Where(parser.CanParse).Select(parser.Parse) as IEnumerable<T>; |
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 int Import(string filePathAndName) | |
| { | |
| if(!fileSystem.FileExists(filePathAndName)) | |
| throw new FileNotFoundException(); | |
| return fileSystem.ReadAllLines(filePathAndName) | |
| .For() | |
| .EachLineWeCareAbout<Message>(parser) | |
| .Save(repo) | |
| .Count(); |
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 int Import(string filePathAndName) | |
| { | |
| if(!fileSystem.FileExists(filePathAndName)) | |
| throw new FileNotFoundException(); | |
| var messages = fileSystem.ReadAllLines(filePathAndName) | |
| .Select(line => parser.Parse(line)); | |
| messages.Each(message => repo.Save(message)); |
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 IEnumerable<T> Each<T>(this IEnumerable<T> things, Action<T> action) | |
| { | |
| if (things == null) | |
| yield break; | |
| foreach (var thing in things) | |
| { | |
| action(thing); | |
| yield return thing; | |
| } |