Skip to content

Instantly share code, notes, and snippets.

View kkbruce's full-sized avatar
🆚
Coding for fun

Bruce Chen kkbruce

🆚
Coding for fun
View GitHub Profile
public class MultipleXmlDocumentationProvider : IDocumentationProvider, IModelDocumentationProvider
{
// 多個 XPathNavigator
private IList<XPathNavigator> _documentNavigators = new List<XPathNavigator>();
private const string TypeExpression = "/doc/members/member[@name='T:{0}']";
private const string MethodExpression = "/doc/members/member[@name='M:{0}']";
private const string PropertyExpression = "/doc/members/member[@name='P:{0}']";
private const string FieldExpression = "/doc/members/member[@name='F:{0}']";
private const string ParameterExpression = "param[@name='{0}']";
@kkbruce
kkbruce / Order.cs
Last active August 29, 2015 14:10 — forked from dinowang/Order.cs
public enum Order
{
Ascending,
Descending
}
@kkbruce
kkbruce / Order.cs
Last active August 29, 2015 14:11 — forked from dinowang/Order.cs
public enum Order
{
Ascending,
Descending
}
@kkbruce
kkbruce / PartialCompareWithAnonymousCollection.cs
Created January 8, 2017 13:46 — forked from hatelove/PartialCompareWithAnonymousCollection.cs
使用 ExpectedObjects 含集合型別的部分比較
[TestMethod]
public void TestCollection()
{
var expected = new
{
//Orders = (new List<int> { 11, 12 }).Select(p => new { Id = p })
Orders = new[]
{
new { Id = 11 },
new { Id = 12 }