This file contains hidden or 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 StructureMap; | |
namespace ConsoleApplication1 | |
{ | |
class Program { | |
private static void Main(string[] args) { | |
IContainer container = ConfigureDependencies(); | |
IAppEngine appEngine = container.GetInstance<IAppEngine>(); |
This file contains hidden or 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 ruby 1.8.6 (2008-08-11 patchlevel 287) [i386-mswin32] | |
C:\code>irb | |
irb(main):001:0> include FileTest | |
=> Object | |
irb(main):002:0> exists? 'foo' | |
=> false | |
irb(main):003:0> | |
### Using IronRuby 1.0 | |
C:\code>ir |
This file contains hidden or 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
desc "Generate the database schema" | |
task :db do | |
$:.unshift('.\src\MyApp\bin') # Add the website bin folder to the load_path so that assembly dependencies are found | |
require 'MyApp' # MyApp is my ASP.NET web app assembly DLL | |
MyApp::Database.BuildSchema # Database.BuildSchema is a static method | |
puts 'Database rebuilt' | |
end |
This file contains hidden or 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 CustomViewVirtualPathProvider : VirtualPathProvider | |
{ | |
public override bool FileExists(string virtualPath) | |
{ | |
return File.Exists(HostingEnvironment.MapPath(virtualPath)); | |
} | |
public override VirtualFile GetFile(string virtualPath) | |
{ | |
var customizedVirtualPath = virtualPath.Replace(HostingEnvironment.ApplicationVirtualPath, HostingEnvironment.ApplicationVirtualPath + "/CustomViews/"); |
This file contains hidden or 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; | |
using AutoMapper; | |
namespace DovetailCRM.Core.Web.Mapping | |
{ | |
public static class AutoMapperExtensions | |
{ | |
public static void CreateMapsForSourceTypes(this IConfiguration configuration, Func<Type, bool> filter, Func<Type, Type> destinationType, Action<IMappingExpression, Type, Type> mappingConfiguration) |
NewerOlder