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
ObjectFactory.Initialize(i => | |
{ | |
i.IgnoreStructureMapConfig = true; | |
i.AddRegistry(new NHibernateRegistry()); | |
i.Scan(s => | |
{ | |
s.Assembly("Hyrmn.Web"); | |
s.WithDefaultConventions(); | |
}); | |
i.For<IEmailer>().Use<Emailer>() |
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
string xmlString = SerializeResultsToXmlString(response); | |
return Content(xmlString, "application/xml", Encoding.UTF8); | |
private string SerializeResultsToXmlString(ApiResponse response) | |
{ | |
var memoryStream = new MemoryStream(); | |
var xs = new XmlSerializer(typeof(ApiResponse)); | |
var xmlTextWriter = new XmlTextWriter(memoryStream, Encoding.UTF8); |
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 SuperSecretMvcApplication : TurbineApplication | |
{ | |
public virtual IContainer CreateContainer() | |
{ | |
return ObjectFactory.Container; | |
} | |
public override void Startup() | |
{ | |
log4net.Config.XmlConfigurator.Configure(); |
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
[HasMany(typeof(POSPhoto), Inverse = true, Access = PropertyAccess.FieldCamelcaseUnderscore, Cascade = ManyRelationCascadeEnum.All, Lazy = true, RelationType = RelationType.Set )] | |
public virtual IEnumerable<POSPhoto> Photos | |
{ | |
get | |
{ | |
return _photos.AsReadOnly(); | |
} | |
} | |
public virtual void AddPhoto(POSPhoto photo) |
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
PM> install-package mvcturbine.structuremap | |
Install-Package : Unable to find package 'mvcturbine.structuremap'. | |
At line:1 char:16 | |
+ install-package <<<< mvcturbine.structuremap | |
+ CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException | |
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.Cmdlets.InstallPackageCmdlet | |
PM> install-package mvcturbine -version 3.0 | |
Install-Package : Unable to find package 'mvcturbine'. | |
At line:1 char:16 |
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 HyrmnBlogApplication : TurbineApplication | |
{ | |
public override void Startup() | |
{ | |
ServiceLocatorManager.SetLocatorProvider(() => new StructureMapServiceLocator(ObjectFactory.Container)); | |
base.Startup(); | |
} | |
protected override void ShutdownContext() |
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 static class Bootstrapper | |
{ | |
public static void Initialize() | |
{ | |
StructureMapConfigurator.ConfigureObjectFactory(); | |
ObjectFactory.GetInstance<CitySearchService>().Initialize(); | |
ObjectFactory.GetInstance<StatisticsService>().Initialize(); | |
} | |
} |
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
<script src="//ajax.googleapis.com/ajax/libs/jquery/${jqueryVersion}/jquery.js" type="text/javascript"></script> | |
<script type="text/javascript"> !window.jQuery && document.write(unescape('%3Cscript src="' + document.getElementById("rsVirtualRoot").value + 'content/js/jquery/${jqueryVersion}/jquery.min.js" %3E%3C/script%3E'))</script> | |
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/${jqueryUiVersion}/jquery-ui.js" type="text/javascript"></script> | |
<script type="text/javascript"> !window.jQuery.ui && document.write(unescape('%3Cscript src="' + document.getElementById("rsVirtualRoot").value + 'content/js/jqueryui/${jqueryUiVersion}/jquery-ui.min.js" %3E%3C/script%3E'))</script> |
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 static class Bootstrapper | |
{ | |
public static void Initialize() | |
{ | |
StructureMapConfigurator.ConfigureObjectFactory(); | |
} | |
} |
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 Xunit; | |
using Shouldly; | |
namespace ConsoleApplication1 | |
{ | |
public enum Decision | |
{ |
OlderNewer