Skip to content

Instantly share code, notes, and snippets.

View TeamCityParallelTests
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication1
{
class Program
{
View xunit timing test
using System;
using System.Reflection;
using System.Threading;
using System.Threading.Tasks;
using Xunit;
using Xunit.Sdk;
namespace XUnitMany
{
public class Class1
View Methods
using System;
using System.Threading;
using System.Threading.Tasks;
using Xunit;
namespace ClassLibrary4
{
public class Test1 //: BaseTest
{
View xunitdeadlock
using System;
using System.Threading;
using System.Threading.Tasks;
using Xunit;
namespace ClassLibrary4
{
public class Test1 : BaseTest
{
View gist:6cb1acd9369ba810ba81
using System;
using System.Data;
using System.Data.SqlClient;
using System.Transactions;
using IsolationLevel = System.Transactions.IsolationLevel;
namespace ConsoleApplication15
{
class Program
{
View xmloctopus
function Set-EmailServerDetails([Parameter(Mandatory=$true)]$IISSite)
{
$EmailServerUserName = Retrieve-OctopusVariableIfExists -Name "EmailServerUserName";
if ($EmailServerUserName -ne $null)
{
Set-WebConfigurationProperty -Filter "/system.net/mailSettings/smtp/network" -Name "userName" -PSPath $IISSite -Value $EmailServerUserName
Log "EmailServerUserName key has been updated";
}
$EmailServerPassword = Retrieve-OctopusVariableIfExists -Name "EmailServerPassword";
View Perf
[TestMethod]
public void T()
{
var entries = new List<DataStreamEntry>();
var stopwatch1 = Stopwatch.StartNew();
for (var i = 0; i < 1500; i++)
{
var transfer = new AllocationTransferCreated(i, "asdfasdf", new AllocationIdentifier(1, 1, 2014), DateRange.EndOfMonth(DateTimeOffset.Now),
new AllocationIdentifier(1, 2, 2014), DateRange.EndOfMonth(DateTimeOffset.Now), 12, 12,
View NLog.config
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" autoReload="true">
<targets>
<target name="Console" xsi:type="Console"
layout="${logger} ${level} ${message} ${exception:format=tostring}"
/>
</targets>
<rules>
<logger name="NamespaceToFilterOut.*" minlevel="Debug" final="true" />
View gist:e42418c78ef2d63308fc
First 5 tries.
2014-10-13 18:20:40.9418 Debug 25 Handling SendEmail command System.Collections.Generic.List`1[System.String] Account registration
2014-10-13 18:20:40.9418 Info 25 Failed to process message System.ApplicationException: Only domain.com domain can be used for emails in FullCI. 77dce7f52d6146db9952e9599b605079@77dce7f52d6146db9952e9599b605079.77dce7f52d6146db9952e9599b605079 does not belong to it.
at Namespace.Web.Infrastructure.Emails.EmailDispatcher.AssertRecipientsAreLimitedToKnownDomain(IEnumerable`1 recipients) in c:\BuildAgent\work\6433a48383cd8d3\Source\Namespace.Web\Infrastructure\Emails\EmailDispatcher.cs:line 71
at Namespace.Web.Infrastructure.Emails.EmailDispatcher.Handle(SendEmail email) in c:\BuildAgent\work\6433a48383cd8d3\Source\Namespace.Web\Infrastructure\Emails\EmailDispatcher.cs:line 31
at NServiceBus.Unicast.HandlerInvocationCache.Invoke(Object handler, Object message, Dictionary`2 dictionary) in y:\BuildAgent\work\31f8c64a6e8a2d7c\src\NServiceBus.Core\Unicast\Handle
View gist:6a6a85ed4f2d4765e905
using System;
using System.Data.SqlClient;
namespace SqlTests
{
class Program
{
private static void Main(string[] args)
{
for (int i = 0; i < 10; i++)
You can’t perform that action at this time.