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 IList<Trade> GetComplianceReportTradesBy(ComplianceStatus complianceStatus) | |
| { | |
| return GetBy( | |
| x => x.ComplianceStatus == complianceStatus.ToString() | |
| && x.RecordType == TradeRecordType.ClientAllocation.ToString() | |
| && x.ComplianceExported == false | |
| && x.LineOfBusiness != LinesOfBusiness.SO.ToString() | |
| && x.Canceled == false | |
| && x.AddBust == "ADD") | |
| .OrderBy(x => x.Compliance_ParentOrderAcknowledgement).ToList(); |
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
| #rakefile.rb | |
| require 'rake' | |
| require 'albacore' | |
| task :default => [:full] | |
| task :full => [:clean,:assemblyInfo,:build,:xunitTests,:specifications,:publish] |
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 DateTimeExtensions | |
| { | |
| public static DateTime LastFridayOfMonth(this DateTime value) | |
| { | |
| var days = Enumerable.Range(1, DateTime.DaysInMonth(value.Year, value.Month)); | |
| var dates = days.Select(day => new DateTime(value.Year, value.Month, day)); | |
| var lastFriday = dates.OrderBy(day => day).Last(day => day.DayOfWeek == DayOfWeek.Friday); |
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
| Imports System.Dynamic | |
| Module SimpleVBDataCatz | |
| Sub Main() | |
| Console.WriteLine("Let's see some of this Simple.Data magick in VB") | |
| Dim db = Database.Opener.OpenFile("Data\ICanHazData.sdf") | |
| InsertTimmyCatAsAnonymousObject(db) |
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
| Imports Xunit | |
| Imports System.Linq | |
| Imports System.Dynamic | |
| Imports Simple.Data.Mocking | |
| Public Class Mockz | |
| <Fact()> | |
| Public Sub MockMockMock() | |
| Dim mockAdapter As New XmlMockAdapter(<Root> | |
| <Cats Age="System.Int32"> |
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; | |
| namespace TuplesSuck | |
| { | |
| class Program | |
| { | |
| static void Main(string[] args) | |
| { | |
| var returnedCount = 0; | |
| var returnedString = ""; |
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
| <appSettings> | |
| <add key="myDevMachineName" value="Dev" /> | |
| <add key="myTestMachineName" value="Test" /> | |
| <add key="myUATMachineName" value="UAT" /> | |
| <add key="myProdMachineName" value="Prod" /> | |
| <add key="Dev.Foo" value="Bar" /> | |
| <add key="Test.Foo" value="Baz" /> | |
| <add key="UAT.Foo" value="Bin" /> | |
| <add key="Prod.Foo" value="BarkBark!" /> |
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 DirectoryInfo GetDestinationFor(string fileName) | |
| { | |
| Log.InfoFormat("Getting destination for {0}", fileName); | |
| var result = paths.FirstOrDefault(x => x.Key.IsMatch(fileName)); | |
| if (result.Key != null) | |
| { | |
| Log.InfoFormat("Destination for {0} is {1}", fileName, result.Value); | |
| return result.Value; | |
| } |
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
| Gravity Kata | |
| Create a system that shows how stacked ice blocks behave with gravity. | |
| Here are some examples of how the ice blocks behave in this system: | |
| Adding blocks | |
| Before After | |
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 MyCompany.Data | |
| { | |
| internal class StoredProcedureManager | |
| { | |
| public static string GetStoredProcedureName(StoredProcedure storedProcedure) | |
| { | |
| switch (storedProcedure) | |
| { | |
| case StoredProcedure.GetAllDataByUser: | |
| return "GetClientAccountsByUser"; |