Skip to content

Instantly share code, notes, and snippets.

View vwxyzh's full-sized avatar
👨‍👧‍👦

Zhenghui Yan vwxyzh

👨‍👧‍👦
  • Microsoft Corporation
View GitHub Profile
@vwxyzh
vwxyzh / sample.cs
Created July 27, 2018 05:28
Declaring type based JsonConverter
class Program
{
static void Main(string[] args)
{
var r = new RootObj { A = new B { X = "x", Y = "y" } };
Console.WriteLine(JsonConvert.SerializeObject(r));
}
}
public class JC<T> : JsonConverter
  1. What this markdown file talking about:
    • Brainstorming of markdown file format for quiz.
    • Finallize the spec.
    • Anything about Quiz Service
  2. Can quiz support multi-choice and single-choice?
    • For multi-choice, it is supported natively, this is a sample.
    • For single-choice, we try to check whether only one choice is checked.
    • Single/multi-choice with hint is opening.
  3. Can this format handle code block or images like following?
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
/// <summary>
/// relative path for case sensitive os.
/// </summary>
public sealed class RelativePath : IEquatable<RelativePath>
{
@vwxyzh
vwxyzh / WcfContextTest.cs
Created March 17, 2013 17:02
Wcf and CallContext
using System;
using System.Runtime.Remoting.Messaging;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Channels;
using System.ServiceModel.Description;
using System.ServiceModel.Dispatcher;
namespace WcfContextTest
{