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 Database SqlServerCe and Connection String Data Source=Database1.sdf | |
BUILD FAILED | |
INTERNAL ERROR | |
System.Data.SqlServerCe.SqlCeException: Unable to load the native components of SQL Server Compact corresponding to the ADO.NET provider of version 84 | |
82. Install the correct version of SQL Server Compact. Refer to KB article 974247 for more details. | |
at System.Data.SqlServerCe.NativeMethods.LoadNativeBinaries() | |
at System.Data.SqlServerCe.SqlCeConnection..ctor() |
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
Buildfile: file:///C:/dev2/fmce/src/FluentMigrator.Example/example-nant.build | |
Target framework: Microsoft .NET Framework 3.5 | |
Target(s) specified: migrate | |
[loadtasks] Scanning assembly "FluentMigrator.NAnt" for extensions. | |
migrate: | |
Using Database SqlServerCe and Connection String Data Source=Database1.sdf | |
-- Beginning Transaction |
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
CanCreateTable : FailedSetUp : System.BadImageFormatException : is not a valid Win32 application. (Exception from HRESULT: 0x800700C1) | |
TearDown : System.NullReferenceException : Object reference not set to an instance of an object. | |
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo) | |
at System.Data.SqlServerCe.UnmanagedLibraryHelper..ctor(String fileName) | |
at System.Data.SqlServerCe.NativeMethodsHelper..ctor(String modulePath) | |
at System.Data.SqlServerCe.NativeMethods.LoadValidLibrary(String modulePath) | |
at System.Data.SqlServerCe.NativeMethods.LoadNativeBinariesFromPrivateFolder(String privateInstall) | |
at System.Data.SqlServerCe.NativeMethods.LoadNativeBinaries() | |
at System.Data.SqlServerCe.SqlCeEngine..ctor() | |
at System.Data.SqlServerCe.SqlCeEngine..ctor(String connectionString) |
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
<TemplatesExport family="File Templates"> | |
<Template uid="188d3b0a-987e-48b4-b42a-2ebaa25b21fb" shortcut="" description="Fluent Migration" text="using FluentMigrator;

namespace $NAMESPACE$
{
 [Migration($MIGRATIONNUMBER$)]
 public class $CLASS$$MIGRATIONNUMBER$ : Migration
 {
 public override void Up()
 {
 $END$
 }

 public override void Down()
 {

 }
 }
}
" reformat="True" shortenQualifiedReferences="True"> | |
<Scopes> | |
<Scope type="Everywhere" /> | |
</Scopes> | |
<Categories /> | |
<Variables> | |
<Variable name="NAMESPACE" expression="fileDefaultNamespace()" initialRange="0" /> | |
<Variable name="MIGRATIONNUMBER" expression="getCurrentTime("yyyymmddhhss")" initialRange="0" /> | |
<Variable name="CLASS" expression="getFileNameWithoutExtension()" initialRange=" |
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
// Shamelessly stolen and adapted from http://stackoverflow.com/questions/506096/comparing-object-properties-in-c | |
public static class Comparisons | |
{ | |
public static bool PublicInstancePropertiesEqual<T>(this T self, T to, params string[] ignore) where T : class | |
{ | |
if (self != null && to != null) | |
{ | |
var type = typeof(T); | |
var ignoreList = new List<string>(ignore); | |
foreach (System.Reflection.PropertyInfo pi in type.GetProperties(System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Instance)) |
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
*.obj | |
*.pdb | |
*.user | |
*.aps | |
*.pch | |
*.vspscc | |
*_i.c | |
*_p.c | |
*.ncb | |
*.suo |
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 IndexController : Controller | |
{ | |
[Authorize] | |
public ActionResult Index() | |
{ | |
return View(); | |
} | |
} |
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 WindsorControllerFactory : DefaultControllerFactory | |
{ | |
private readonly IKernel kernel; | |
public WindsorControllerFactory(IKernel kernel) | |
{ | |
this.kernel = kernel; | |
} | |
public override void ReleaseController(IController controller) |
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 void Install(IWindsorContainer container, IConfigurationStore store) | |
{ | |
foreach (var type in Assembly.GetExecutingAssembly().GetTypes()) | |
{ | |
if (typeof(IController).IsAssignableFrom(type) && !type.IsAbstract) | |
container.Register(Component.For(type).ImplementedBy(type).Named(type.FullName.ToLower()).LifeStyle.Transient); | |
} | |
} |
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
require File.expand_path(File.dirname(__FILE__) + '/edgecase') | |
# Greed is a dice game where you roll up to five dice to accumulate | |
# points. The following "score" function will be used to calculate the | |
# score of a single roll of the dice. | |
# | |
# A greed roll is scored as follows: | |
# | |
# * A set of three ones is 1000 points | |
# |