Skip to content

Instantly share code, notes, and snippets.

'C:\Windows\assembly\GAC\Microsoft.DirectX\1.0.2902.0__31bf3856ad364e35\Microsoft.DirectX.dll' is attempting managed execution inside OS Loader lock. Do not attempt to run managed code inside a DllMain or image initialization function since doing so can cause the application to hang.
public void PlaySound(string fileName)
{
IntPtr handle = IntPtr.Zero;
_Element.Dispatcher.Invoke(((Action)(() =>
{
handle = ((HwndSource) PresentationSource.FromVisual(_Element)).Handle;
})));
var device = new Device(DSoundHelper.DefaultPlaybackDevice);
var attageTableProperties = new TableProperties(
"name",
"description",
Indices.AttainedAge,
DataType.Real,
"comments",
4,
4,
"group heading",
"ult table name",
using System;
using System.Collections.Generic;
using System.Linq;
using NUnit.Framework;
namespace Katas.KataPotter2
{
[TestFixture]
public class When_grouping_three_books_where_two_are_the_same : potter_kata_context
{
public struct NotNull<T> where T : class
{
private readonly T _Value;
private NotNull(T value)
{
if (value == null)
throw new ArgumentNullException("value");
_Value = value;
[Subject("Scott Bellware")]
public class at_any_given_moment
{
It will_fail = ()=>
{
throw new Exception("hi scott, love you, miss you.");
};
}
when
[
"I add two numbers" : [{
ItShould : "sum them",
Means : function () { this.result.shouldEqual(this.num1 + this.num2);},{
ItShould : "sum them",
Means : function () { this.result.shouldEqual(this.num1 + this.num2);}],
"I make unf" :[{
given["a two number addition solver"]
.with("solver", new additionSolver())
.with("number", [1, 2])
.withParametersAs("number")
.when("they are added", this.solver.add)
.itShould("sum them", function () this.result.shouldEqual(number[1] + number[2]))
.itShould("not subtract them", function () this.result.shouldNotBeDumb());
given["a two number addition solver"]
.with("solver", new additionSolver())
PASSED when using the adder with two positive numbers it should add them up to their sum
PASSED when using the adder with two positive numbers it should create a sum greater than zero
PASSED when using the adder with two negative numbers it should add them up to their sum
PASSED when using the adder with two negative numbers it should create a sum less than zero
All tests PASS!
return (from table in theTable
where table.IndexType == Indices.AttainedAge
select new AggregatedTable(Enumerable.Range(0, theTable[0].LayerCount).Select(layerIndex => new OneDimensionalLayerExportAdapter(table, layerIndex)).ToArray())
into aggregatedTable select new[] { aggregatedTable }).Cast<IEnumerable<IExportAdapter>>().ToList();