Skip to content

Instantly share code, notes, and snippets.

View bsatrom's full-sized avatar
🏠
Working from home

Brandon Satrom bsatrom

🏠
Working from home
View GitHub Profile
@{
LayoutPage = "~/Views/Shared/_Layout.cshtml";
}
<add namespace="System.Web.WebPages"/>
<add namespace="System.Web.Helpers" />
<add assembly="WebMatrix.Data, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Web.WebPages, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Web.Helpers, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35" />
<appSettings>
<add key="enableSimpleMembership" value="false" />
<add key="ClientValidationEnabled" value="false"/>
<add key="UnobtrusiveJavaScriptEnabled" value="true"/>
</appSettings>
<system.web.webPages.razor>
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=3.0.0.0,
Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<pages pageBaseType="System.Web.Mvc.WebViewPage">
<namespaces>
<add namespace="System.Web.Mvc" />
<add namespace="System.Web.Mvc.Ajax" />
<add namespace="System.Web.Mvc.Html" />
<add namespace="System.Web.Routing" />
</namespaces>
DependencyResolver.SetResolver(new StructureMapContainer(container));
MvcServiceLocator.SetCurrent(new StructureMapContainer(container));
public class StructureMapContainer : IDependencyResolver
{
static IContainer _container;
public StructureMapContainer(IContainer container)
{
_container = container;
_container.Configure(x => x.Scan(y =>
{
y.AssembliesFromApplicationBaseDirectory();
public interface IDependencyResolver
{
object GetService(Type serviceType);
IEnumerable<object> GetServices(Type serviceType);
}
setInterval(function () {
$.getJSON('Photo/CommentsForUser/' + new Date().getTime() , function (data) {
$.pinify.clearOverlay();
var itemList = [];
var commentCount = parseInt($('#commentCount').val());
if (data.length > commentCount) {
$('#commentCount').val(data.length);
$.pinify.flashTaskbar();