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; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Reflection.Metadata; | |
using System.Threading.Tasks; | |
using Marten; | |
using Marten.Events.Projections; | |
using Xunit; | |
using Xunit.Abstractions; |
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; | |
using System.Collections.Generic; | |
using System.Linq; | |
using Microsoft.EntityFrameworkCore; | |
namespace StackOverflowTest | |
{ | |
public class Program | |
{ | |
public static string ConnectionString = |
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
// Assume a WebAPI action on the server | |
// [HttpPost] | |
// public SomeType TheAction(string s, AnotherType obj) { | |
// return new SomeType(s.Length, obj.name); | |
// } | |
// Where SomeType is | |
// public class SomeType{ public int Property1{get;set;} public string Property2{get;set;}} | |
// and AnotherType is | |
// public class AnotherType {public string Name{get;set;}} |
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
<html> | |
<head> | |
<style type="text/css"> | |
html, body { height: 100%; margin: 0; padding: 0; } | |
#map { height: 100%; } | |
</style> | |
</head> | |
<body> |
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; | |
using System.IO; | |
using System.Reflection; | |
using TypeLite; | |
namespace TypeScriptSample.Generator | |
{ | |
class Program | |
{ | |
static void Main(string[] args) |
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
declare module TypeLite.Tests.GenericsTests { | |
interface ClassWithComplexNestedGenericProperty { | |
GenericsHell: System.Tuple<System.Collections.Generic.KeyValuePair<number, string>, TypeLite.Tests.GenericsTests.BaseGeneric<string>, number, System.Collections.Generic.KeyValuePair<number, DummyNamespace.Test>>; | |
} | |
interface BaseGeneric<TType> { | |
SomeGenericProperty: TType; | |
SomeGenericArrayProperty: TType[]; | |
} | |
} |
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 Microsoft.VisualStudio.TestTools.UnitTesting; | |
using Moq; | |
namespace ConsoleApplication1 | |
{ | |
[TestClass] | |
public class CustomMoq | |
{ | |
public class Message | |
{ |
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 MyType : Enumeration | |
{ | |
//don't allow type to be constructed | |
private MyType(int value, string displayName) : base(value, displayName) { } | |
public static readonly MyType Type1 = new MyType(1, "Type One"); | |
public static readonly MyType Type2 = new MyType(2, "Type Two"); | |
public static readonly MyType DerivedType3 = new DerivedMyType(3, "Type Three"); | |
public virtual int GetSomethingAboutThisType() |