Skip to content

Instantly share code, notes, and snippets.

View masaru-b-cl's full-sized avatar

TAKANO Sho / @masaru_b_cl masaru-b-cl

View GitHub Profile
@masaru-b-cl
masaru-b-cl / WcfService.svc
Created June 1, 2012 07:05
自前エンドポイント追加svc
<%@ ServiceHost Language="C#" Debug="true" Factory="WcfServiceHostFactory" %>
using System;
using System.ServiceModel;
using System.ServiceModel.Activation;
using System.ServiceModel.Description;
public class WcfServiceHostFactory : ServiceHostFactory
{
public override ServiceHostBase CreateServiceHost(string service, Uri[] baseAddresses)
@masaru-b-cl
masaru-b-cl / Program.cs
Created June 4, 2012 13:18
async/awaitってこうじゃないの?
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace ConsoleApplication1
{
class Program
@masaru-b-cl
masaru-b-cl / Program.cs
Created June 4, 2012 15:33
async/awaitってこんな感じですね
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace ConsoleApplication1
{
class Program
@masaru-b-cl
masaru-b-cl / Program.cs
Created June 4, 2012 15:59
Task.Delayってこういうことですか?
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace ConsoleApplication1
{
class Program
@masaru-b-cl
masaru-b-cl / Program.cs
Created June 4, 2012 16:09
非同期メソッドのシミュレーションにもasync/await
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace ConsoleApplication1
{
class Program
@masaru-b-cl
masaru-b-cl / CreateNewGist.mac
Created June 7, 2012 04:40
CreateNewGistを呼び出す秀丸マクロ
// ----------------------------------
// CreateNewGist.exe実行マクロ
// 2012/06/07 TAKANO Sho
// ----------------------------------
// ファイルが更新されているかチェック
if ( filename2 == "" || updated ) {
// ファイルのセーブ
save;
// 保存処理結果判断
@masaru-b-cl
masaru-b-cl / Program.cs
Created June 8, 2012 05:12
IEnumerable<Action<T>>の全実行拡張メソッド
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
public static class EnumerableExtensions
{
public static void Invoke<T>(this IEnumerable<Action<T>> actions, T value)
@masaru-b-cl
masaru-b-cl / Calculator.cs
Created June 11, 2012 00:56
シンプルな計算機のModel
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
namespace MVVMCalculator
{
public class Calculator : INotifyPropertyChanged
{
@masaru-b-cl
masaru-b-cl / NullableDataTimePicker.cs
Created June 15, 2012 05:09
Null可能なDateTimePicker
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Globalization;
using System.Threading;
<browsers>
<browser refID="Default">
<controlAdapters>
<adapter controlType="System.Web.UI.Page" adapterType="Navigation.StateAdapter, Navigation" />
</controlAdapters>
</browser>
</browsers>