Skip to content

Instantly share code, notes, and snippets.

[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,
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";
using System;
using System.Data;
using System.Data.SqlClient;
using System.Transactions;
using IsolationLevel = System.Transactions.IsolationLevel;
namespace ConsoleApplication15
{
class Program
{
using System;
using System.Threading;
using System.Threading.Tasks;
using Xunit;
namespace ClassLibrary4
{
public class Test1 //: BaseTest
{
using System;
using System.Threading;
using System.Threading.Tasks;
using Xunit;
namespace ClassLibrary4
{
public class Test1 : BaseTest
{
using System;
using System.Reflection;
using System.Threading;
using System.Threading.Tasks;
using Xunit;
using Xunit.Sdk;
namespace XUnitMany
{
public class Class1
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication1
{
class Program
{
@pawelpabich
pawelpabich / Private Setter
Created March 25, 2014 05:33
Trying to serialize and deserialize a class with private setter in the base class
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
namespace ConsoleApplication12
{
class Program
@pawelpabich
pawelpabich / 1.TestCase
Created January 7, 2014 23:12
Quartz.Net sample that should output text to console every 6 seconds but it does not.
using System;
using System.Collections.Specialized;
using System.Diagnostics;
using Quartz;
using Quartz.Impl;
using Quartz.Impl.Triggers;
namespace ConsoleApplication5
{
class Program
@pawelpabich
pawelpabich / gist:7762655
Created December 3, 2013 01:59
Custom NSubstitute collection matcher based on the content of the collection. There must be a better way?
private static IEnumerable<int> MatchSingleItemInCollection(int value)
{
return Arg.Is<IEnumerable<int>>(coll => coll.Single() == value);
}