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 / Program.cs
Created January 10, 2012 01:31
EF type-safe include
using System;
using System.Data.Objects;
using System.Linq.Expressions;
namespace ConsoleApplication1
{
public static class DatabaseEntitiesExtensions
{
public static ObjectQuery<T> Include<T, V>(this ObjectQuery<T> entities, Expression<Func<T, V>> expression)
{
@masaru-b-cl
masaru-b-cl / exclude
Created January 10, 2012 08:46
exclude file in VSS working folder
# git ls-files --others --exclude-from=.git/info/exclude
# Lines that start with '#' are comments.
# For a project mostly in C, the following would be a good set of
# exclude patterns (uncomment them if you want to use them):
# *.[oa]
# *~
obj/
bin/
*.suo
*.user
@masaru-b-cl
masaru-b-cl / .gitignore
Created February 8, 2012 07:05
TraceSourcePractice
bin/
obj/
*.user
*.suo
@masaru-b-cl
masaru-b-cl / .gitignore
Created February 14, 2012 08:22
DynamicFixedRecord - 固定長文字列を長さで区切って各項目に分割する
bin/
obj/
*.user
*.suo
@masaru-b-cl
masaru-b-cl / .gitignore
Created February 24, 2012 01:06
ExpressionVisitorFirstStep
bin/
obj/
*.user
*.suo
@masaru-b-cl
masaru-b-cl / .gitignore
Created February 27, 2012 01:53
MinimamFormAuthenticationSample
bin/
obj/
*.user
*.suo
TestResults/
@masaru-b-cl
masaru-b-cl / .gitignore
Created March 8, 2012 12:18
GistSharpConsole
bin/
obj/
*.user
*.suo
TestResults/
@masaru-b-cl
masaru-b-cl / Program.cs
Created March 21, 2012 15:31
Cast to Generic Type
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
private static void Write<T>(object o)
@masaru-b-cl
masaru-b-cl / Program.cs
Created March 21, 2012 15:41
Cast to Datetime from generic type value.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
private static void Write<T>(T value)
@masaru-b-cl
masaru-b-cl / Program.cs
Created April 2, 2012 08:13
Visitorパターンの勉強用
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
interface IVisitor
{
void Visit(IAcceptor acceptor);