This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
namespace ConsoleApplication2 | |
{ | |
class Program { | |
static void Main(string[] args) { | |
var foo = new List<ISupport>(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from prop in docs.Properties | |
select new { | |
PropertyName = prop.Name | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! | |
** Unobtrusive validation support library for jQuery and jQuery Validate | |
** Copyright (C) Microsoft Corporation. All rights reserved. | |
*/ | |
/*jslint white: true, browser: true, onevar: true, undef: true, nomen: true, eqeqeq: true, plusplus: true, bitwise: true, regexp: true, newcap: true, immed: true, strict: false */ | |
/*global document: false, jQuery: false */ | |
(function ($) { | |
var $jQval = $.validator, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(irm http://channel9.msdn.com/Events/Build/2012/RSS/wmvhigh) | where { $_.title -NotLike "*(Repeat)*"} | foreach { | |
$path = "E:\Build2012\" + ($_.title -replace ":", "") + ".wmv" | |
if (Test-Path ($path)) { | |
Write-Output "Skipping" + $_.title | |
} | |
else { | |
Write-Output "Downloading" + $_.title | |
(New-Object System.Net.WebClient).DownloadFile($_.enclosure.url, $path) | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Collections.ObjectModel; | |
using System.ComponentModel.DataAnnotations; | |
using System.Data.Entity; | |
using System.Linq; | |
using System.Linq.Expressions; | |
using System.Reflection; | |
namespace XXX |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class EventPublisher : IEventPublisher | |
{ | |
private readonly ConcurrentDictionary<Type, object> subjects | |
= new ConcurrentDictionary<Type, object>(); | |
public IObservable<TEvent> GetEvent<TEvent>() | |
{ | |
var subject = | |
(ISubject<TEvent>) subjects.GetOrAdd(typeof (TEvent), | |
t => new Subject<TEvent>()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Push-Location (Split-Path -Path $MyInvocation.MyCommand.Definition -Parent) | |
Import-Model posh-sprintly | |
Set-SprintlyCredentials "asd@asd" "sdsdsdsdsd" -silent | |
# If module is installed in a default location ($env:PSModulePath), | |
# use this instead (see about_Modules for more information): | |
Import-Module posh-git | |
Import-Module posh-hg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Overall thoughts - the size of the sites we're working on are not huge, and not complex. A lot of the more complex patterns do not apply. | |
RE: Multiple projects. I've now come to the descision that splitting out sites into "Core, Web, Data" etc. type projects is something that has persisted from the ASP.Net 1.0 days and isn't needed anymore. Our sites almost never need re-usable components. We never (for instance) have needed to use the data component of a site in a different project. IF we did, we'd know about it up front and could design for it appropriately. Thus, multiple projects is not required. This was one of the points made in the ASP.Net MVC 4 Pro book. | |
RE: Repository Pattern | |
Repository offers a few distinct benefits. | |
a.) does not tie your application to a certain type of persistance. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#CapsLock::Send,{MEDIA_PLAY_PAUSE} | |
#ScrollLock::Volume_Down | |
#Break::Volume_Up | |
#F6::Media_Play_Pause | |
#F7::Media_Prev | |
#F8::Media_Next | |
AppsKey::Ctrl | |
Insert:: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public override int SaveChanges() | |
{ | |
//this goes through and updates the created on / modified on dates. | |
this.ChangeTracker.Entries<BaseModel>().ForEach(x => | |
{ | |
if (x.State == System.Data.EntityState.Added) | |
{ | |
x.Entity.CreatedOn = DateTime.UtcNow; | |
} |
OlderNewer