Skip to content

Instantly share code, notes, and snippets.

@kevintsengtw
kevintsengtw / LatitudeBuilder
Last active January 28, 2018 04:13
LatitudeBuilder
using System;
using System.Collections.Generic;
using System.Reflection;
using AutoFixture.Kernel;
namespace SampleTests.AutoFixture
{
public class LatitudeBuilder : ISpecimenBuilder
{
/// <summary>
@kevintsengtw
kevintsengtw / LongitudeBuilder
Last active January 28, 2018 04:21
LongitudeBuilder
using System;
using System.Collections.Generic;
using System.Reflection;
using AutoFixture.Kernel;
namespace SampleTests.AutoFixture
{
public class LongitudeBuilder : ISpecimenBuilder
{
/// <summary>
@kevintsengtw
kevintsengtw / MappingProfile
Created January 16, 2018 10:43
MappingProfile
using System;
using System.Globalization;
using AutoMapper;
using SampleWebApi.Infrastructure.Reposiotry;
using SampleWebApi.Infrastructure.Service;
namespace SampleWebApi.Infrastructure.Mapping
{
public class MappingProfile : Profile
{
@kevintsengtw
kevintsengtw / YouBikeService
Created January 16, 2018 10:33
YouBikeService
using System;
using System.Collections.Generic;
using System.Linq;
using AutoMapper;
using SampleWebApi.Infrastructure.Reposiotry;
namespace SampleWebApi.Infrastructure.Service
{
/// <summary>
/// Class YouBikeService.
@kevintsengtw
kevintsengtw / IYouBikeService
Created January 16, 2018 10:32
IYouBikeService
using System;
using System.Collections.Generic;
namespace SampleWebApi.Infrastructure.Service
{
/// <summary>
/// Interface IYouBikeService
/// </summary>
public interface IYouBikeService
{
@kevintsengtw
kevintsengtw / YouBikeStationDto
Last active January 16, 2018 10:29
YouBikeStationDto
using System;
namespace SampleWebApi.Infrastructure.Service
{
public class YouBikeStationDto
{
/// <summary>
/// 站點代號
/// </summary>
public string No { get; set; }
@kevintsengtw
kevintsengtw / YouBikeRepository
Created January 16, 2018 08:51
YouBikeRepository
using System;
using System.Collections.Generic;
using System.IO;
using System.IO.Compression;
using System.Linq;
using System.Net.Http;
using System.Net.Http.Headers;
using Newtonsoft.Json;
namespace SampleWebApi.Infrastructure.Reposiotry
@kevintsengtw
kevintsengtw / IYouBikeRepository
Created January 16, 2018 08:48
IYouBikeRepository
using System;
using System.Collections.Generic;
namespace SampleWebApi.Infrastructure.Reposiotry
{
public interface IYouBikeRepository
{
/// <summary>
/// 取得所有 YouBike 場站資料.
/// </summary>
@kevintsengtw
kevintsengtw / YouBikeStationModel
Created January 16, 2018 08:22
YouBikeStationModel
using System;
using Newtonsoft.Json;
namespace SampleWebApi.Infrastructure.Reposiotry
{
public class YouBikeStationModel
{
/// <summary>
/// 站點代號
/// </summary>
@kevintsengtw
kevintsengtw / YouBikeOriginalModel
Created January 16, 2018 08:03
YouBikeOriginalModel
using System;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
namespace SampleWebApi.Infrastructure.Reposiotry
{
public class YouBikeOriginalModel
{
[JsonProperty("retCode")]
public int RetuenCode { get; set; }