View GetSwap.VB
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 Function GetSwapNumber(ByVal session As ISession, ByVal instrument As Instrument) As String | |
Dim swapNumber As String = String.Empty | |
Dim crit As DetachedCriteria = DeCrit.UniqueSwapAssignmentByInstrumentId(instrument) | |
Dim swapAssignments As IList(Of SwapAssignment) | |
Dim newSession As ISession = session.GetSession(EntityMode.Poco) | |
swapAssignments = crit.GetExecutableCriteria(newSession).List(Of SwapAssignment)() | |
For Each swap As SwapAssignment In swapAssignments | |
If (swap.Swap IsNot Nothing) Then |
View Dude.cs
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 TradeMapping : ClassMap<Trade> | |
{ | |
public TradeMapping() | |
{ | |
HibernateMapping.Schema("dbo"); | |
Table("Trades"); | |
Not.LazyLoad(); | |
HibernateMapping.DefaultAccess.Property(); | |
HibernateMapping.DefaultCascade.SaveUpdate(); |
View TeamCity NuGet auto deploy
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
xcopy code_drop\nuget\*.nupkg somewhere\Packages /r /i /c /h /k /e /y |
View RoundhousEMigrate.cs
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
new Migrate().Set(p => | |
{ | |
p.ConnectionString = connectionString; | |
p.SqlFilesDirectory = scriptsLocation; | |
p.EnvironmentName = environmentName; | |
p.Drop = dropDatabase; | |
p.RecoveryModeSimple = useSimpleRecoveryMode; | |
p.Restore = restore; | |
p.RestoreFromPath = restorePath; | |
p.RepositoryPath = repositoryPath; |
View DropkicKSecurity.cs
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
DeploymentStepsFor(File, s => | |
{ | |
s.Security(o => | |
{ | |
o.ForPath(settings.InstallPath, p => | |
{ | |
p.GrantRead(settings.UserGroupA); | |
p.GrantReadWrite(settings.UserGroupB); | |
p.Grant(Rights.ReadWrite, settings.UserGroupA); |
View TheDeployment.cs
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.IO; | |
using System.Security.Cryptography.X509Certificates; | |
using dropkick.Configuration.Dsl; | |
using dropkick.Configuration.Dsl.Files; | |
using dropkick.Configuration.Dsl.Iis; | |
using dropkick.Configuration.Dsl.RoundhousE; | |
using dropkick.Configuration.Dsl.Security; | |
using dropkick.Configuration.Dsl.WinService; | |
using dropkick.Wmi; |
View setup.cmd
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
@echo off | |
SET DIR=%~dp0% | |
@PowerShell -NoProfile -ExecutionPolicy unrestricted -Command "& '%DIR%setup.ps1' %*" | |
pause |
View Moq.cs
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
mock.Verify(m => m.Subscribe<Message>(someclass.SomeMethod, null, x => true), Times.AtLeastOnce()); |
View 1Q_ForEachSafeNullCheck.cs
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
foreach (var item in items ?? new List<string>()) | |
{ | |
//do something | |
} |
OlderNewer