Skip to content

Commit

Permalink
Renaming everything to BoC (except the foldes, perhaps I'll do those …
Browse files Browse the repository at this point in the history
…also some time soon )
  • Loading branch information
csteeg committed Feb 9, 2012
1 parent c638d5d commit 4c8ec65
Show file tree
Hide file tree
Showing 24 changed files with 301 additions and 180 deletions.
30 changes: 15 additions & 15 deletions BoC.sln
@@ -1,30 +1,30 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commons", "Src\Commons\Commons.csproj", "{25C350AF-4957-47E8-960A-6C59794C5DEF}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BoC", "Src\Commons\BoC.csproj", "{25C350AF-4957-47E8-960A-6C59794C5DEF}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commons.Logging.Log4Net", "Src\Commons.Logging.Log4Net\Commons.Logging.Log4Net.csproj", "{77EAE608-5CFF-4EF4-A647-49C9757CB829}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BoC.Logging.Log4Net", "Src\Commons.Logging.Log4Net\BoC.Logging.Log4Net.csproj", "{77EAE608-5CFF-4EF4-A647-49C9757CB829}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commons.Persistence.NHibernate", "Src\Commons.Persistence.NHibernate\Commons.Persistence.NHibernate.csproj", "{0F48E392-9474-4714-884A-129253F68997}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BoC.Persistence.NHibernate", "Src\Commons.Persistence.NHibernate\BoC.Persistence.NHibernate.csproj", "{0F48E392-9474-4714-884A-129253F68997}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commons.Security.NHibernate", "Src\Commons.Security.NHibernate\Commons.Security.NHibernate.csproj", "{4EDA6621-C191-4EC2-82F2-92DC746151C1}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BoC.Security.NHibernate", "Src\Commons.Security.NHibernate\BoC.Security.NHibernate.csproj", "{4EDA6621-C191-4EC2-82F2-92DC746151C1}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commons.Web.Mvc", "Src\Commons.Web.Mvc\Commons.Web.Mvc.csproj", "{D21291A8-98DB-48F0-A864-CC468BA44EB1}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BoC.Web.Mvc", "Src\Commons.Web.Mvc\BoC.Web.Mvc.csproj", "{D21291A8-98DB-48F0-A864-CC468BA44EB1}"
ProjectSection(ProjectDependencies) = postProject
{25C350AF-4957-47E8-960A-6C59794C5DEF} = {25C350AF-4957-47E8-960A-6C59794C5DEF}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commons.Security", "Src\Commons.Security\Commons.Security.csproj", "{387BC181-5A33-4657-9C19-07A8FA48A916}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BoC.Security", "Src\Commons.Security\BoC.Security.csproj", "{387BC181-5A33-4657-9C19-07A8FA48A916}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commons.Security.Mvc", "Src\Commons.Security.Mvc\Commons.Security.Mvc.csproj", "{C08BC0AA-DBB0-4FF3-8DB3-4A5CB72CEA8C}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BoC.Security.Mvc", "Src\Commons.Security.Mvc\BoC.Security.Mvc.csproj", "{C08BC0AA-DBB0-4FF3-8DB3-4A5CB72CEA8C}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{D75EF326-E1BC-4DFB-ABA8-5BE622875649}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commons.Tests", "Tests\Commons.Tests\Commons.Tests.csproj", "{A0D3CBAC-14B4-4805-8B2F-227957986CB4}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BoC.Tests", "Tests\Commons.Tests\BoC.Tests.csproj", "{A0D3CBAC-14B4-4805-8B2F-227957986CB4}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commons.Persistence.Xpo", "Src\Commons.Persistence.XPO\Commons.Persistence.Xpo.csproj", "{AC7DD1E6-616B-41CE-AA21-F31B5CA10379}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BoC.Persistence.Xpo", "Src\Commons.Persistence.XPO\BoC.Persistence.Xpo.csproj", "{AC7DD1E6-616B-41CE-AA21-F31B5CA10379}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commons.Persistence.Norm", "Src\Commons.Persistence.NoRM\Commons.Persistence.Norm.csproj", "{EC5E1C97-41C1-4624-8CEE-0D1EC842D306}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BoC.Persistence.Norm", "Src\Commons.Persistence.NoRM\BoC.Persistence.Norm.csproj", "{EC5E1C97-41C1-4624-8CEE-0D1EC842D306}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Samples", "Samples", "{D700FEE1-83DE-4496-9305-7651BEE8AAC8}"
EndProject
Expand All @@ -37,17 +37,17 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ToDoList", "Samples\ToDoLis
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ToDoList.Tests", "Samples\ToDoList.Tests\ToDoList.Tests.csproj", "{3C19162C-4815-4736-810A-237FDECF4146}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commons.Web.PrecompiledViews", "Src\Commons.Web.PrecompiledViews\Commons.Web.PrecompiledViews.csproj", "{46C9FDE4-328A-4E80-8504-AED5E2196AE1}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BoC.Web.PrecompiledViews", "Src\Commons.Web.PrecompiledViews\BoC.Web.PrecompiledViews.csproj", "{46C9FDE4-328A-4E80-8504-AED5E2196AE1}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RazorSingleFileGenerator", "Src\RazorSingleFileGenerator\RazorSingleFileGenerator.csproj", "{461089E7-008E-4737-BA17-E1FCD1CC3D0E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commons.InversionOfControl.Unity", "Src\Commons.InversionOfControl.Unity\Commons.InversionOfControl.Unity.csproj", "{5E953013-A5C4-4AB5-BF99-108C6D4D21CE}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BoC.InversionOfControl.Unity", "Src\Commons.InversionOfControl.Unity\BoC.InversionOfControl.Unity.csproj", "{5E953013-A5C4-4AB5-BF99-108C6D4D21CE}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commons.InversionOfControl.Unity.Tests", "Tests\Commons.InversionOfControl.Unity.Tests\Commons.InversionOfControl.Unity.Tests.csproj", "{7C6C7E1E-8769-433B-9257-2C117DDA0DB4}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BoC.InversionOfControl.Unity.Tests", "Tests\Commons.InversionOfControl.Unity.Tests\BoC.InversionOfControl.Unity.Tests.csproj", "{7C6C7E1E-8769-433B-9257-2C117DDA0DB4}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commons.Persistence.db4o", "Src\Commons.Persistence.db4o\Commons.Persistence.db4o.csproj", "{3CB44AE3-E282-4271-BAB9-BE4075CEF44B}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BoC.Persistence.db4o", "Src\Commons.Persistence.db4o\BoC.Persistence.db4o.csproj", "{3CB44AE3-E282-4271-BAB9-BE4075CEF44B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commons.Persistence.db4o.Tests", "Tests\Commons.Persistence.db4o.Tests\Commons.Persistence.db4o.Tests.csproj", "{0A351C61-F2C0-45B9-B492-66B0C02D3E57}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BoC.Persistence.db4o.Tests", "Tests\Commons.Persistence.db4o.Tests\BoC.Persistence.db4o.Tests.csproj", "{0A351C61-F2C0-45B9-B492-66B0C02D3E57}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
32 changes: 6 additions & 26 deletions Samples/ToDoList/ToDoList.csproj
Expand Up @@ -34,30 +34,6 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Commons.InverionOfControl.Unity">
<HintPath>..\..\Build\Commons.InverionOfControl.Unity.dll</HintPath>
</Reference>
<Reference Include="Commons.Logging.Log4Net">
<HintPath>..\..\Build\Commons.Logging.Log4Net.dll</HintPath>
</Reference>
<Reference Include="Commons.Persistence.NHibernate">
<HintPath>..\..\Build\Commons.Persistence.NHibernate.dll</HintPath>
</Reference>
<Reference Include="Commons.Persistence.NoRM">
<HintPath>..\..\Build\Commons.Persistence.NoRM.dll</HintPath>
</Reference>
<Reference Include="Commons.Security">
<HintPath>..\..\Build\Commons.Security.dll</HintPath>
</Reference>
<Reference Include="Commons.Security.Mvc">
<HintPath>..\..\Build\Commons.Security.Mvc.dll</HintPath>
</Reference>
<Reference Include="Commons.Security.NHibernate">
<HintPath>..\..\Build\Commons.Security.NHibernate.dll</HintPath>
</Reference>
<Reference Include="Commons.Web.Mvc">
<HintPath>..\..\Build\Commons.Web.Mvc.dll</HintPath>
</Reference>
<Reference Include="DotNetOpenAuth, Version=3.4.6.10316, Culture=neutral, PublicKeyToken=2726ea45d0d37018, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\lib\DotNetOpenAuth\DotNetOpenAuth.dll</HintPath>
Expand Down Expand Up @@ -172,9 +148,13 @@
<Project>{0F48E392-9474-4714-884A-129253F68997}</Project>
<Name>Commons.Persistence.NHibernate</Name>
</ProjectReference>
<ProjectReference Include="..\..\Src\Commons\Commons.csproj">
<ProjectReference Include="..\..\Src\Commons.Security\BoC.Security.csproj">
<Project>{387BC181-5A33-4657-9C19-07A8FA48A916}</Project>
<Name>BoC.Security</Name>
</ProjectReference>
<ProjectReference Include="..\..\Src\Commons\BoC.csproj">
<Project>{25C350AF-4957-47E8-960A-6C59794C5DEF}</Project>
<Name>Commons</Name>
<Name>BoC</Name>
</ProjectReference>
<ProjectReference Include="..\..\Src\RazorSingleFileGenerator\RazorSingleFileGenerator.csproj">
<Project>{461089E7-008E-4737-BA17-E1FCD1CC3D0E}</Project>
Expand Down
58 changes: 58 additions & 0 deletions Samples/ToDoList/Views/Account/_Register.cshtml
@@ -0,0 +1,58 @@
@inherits System.Web.Mvc.WebViewPage<BoC.Security.Mvc.ViewModels.RegisterModel>

@{
ViewBag.Title = "Register";
}

<h2>Create a New Account</h2>
<p>
Use the form below to create a new account.
</p>
<p>
Passwords are required to be a minimum of @ViewBag.PasswordLength characters in length.
</p>
haaaaaai
@using (Html.BeginForm()) {
@Html.ValidationSummary(true, "Account creation was unsuccessful. Please correct the errors and try again.")
<div>
<fieldset>
<legend>Account Information</legend>

<div class="editor-label">
@Html.LabelFor(m => m.UserName)
</div>
<div class="editor-field">
@Html.TextBoxFor(m => m.UserName)
@Html.ValidationMessageFor(m => m.UserName)
</div>

<div class="editor-label">
@Html.LabelFor(m => m.Email)
</div>
<div class="editor-field">
@Html.TextBoxFor(m => m.Email)
@Html.ValidationMessageFor(m => m.Email)
</div>

<div class="editor-label">
@Html.LabelFor(m => m.Password)
</div>
<div class="editor-field">
@Html.PasswordFor(m => m.Password)
@Html.ValidationMessageFor(m => m.Password)
</div>

<div class="editor-label">
@Html.LabelFor(m => m.ConfirmPassword)
</div>
<div class="editor-field">
@Html.PasswordFor(m => m.ConfirmPassword)
@Html.ValidationMessageFor(m => m.ConfirmPassword)
</div>

<p>
<input type="submit" value="Register" />
</p>
</fieldset>
</div>
}
Expand Up @@ -9,7 +9,7 @@
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>BoC.InversionOfControl.Unity</RootNamespace>
<AssemblyName>Commons.InversionOfControl.Unity</AssemblyName>
<AssemblyName>BoC.InversionOfControl.Unity</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<FileUpgradeFlags>
Expand Down Expand Up @@ -113,9 +113,9 @@
<Compile Include="UnityPerWebRequestLifetimeModule.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Commons\Commons.csproj">
<ProjectReference Include="..\Commons\BoC.csproj">
<Project>{25C350AF-4957-47E8-960A-6C59794C5DEF}</Project>
<Name>Commons</Name>
<Name>BoC</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
Expand Down
Expand Up @@ -9,7 +9,7 @@
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>BoC.Logging.Log4Net</RootNamespace>
<AssemblyName>Commons.Logging.Log4Net</AssemblyName>
<AssemblyName>BoC.Logging.Log4Net</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<FileUpgradeFlags>
Expand Down Expand Up @@ -99,9 +99,9 @@
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Commons\Commons.csproj">
<ProjectReference Include="..\Commons\BoC.csproj">
<Project>{25C350AF-4957-47E8-960A-6C59794C5DEF}</Project>
<Name>Commons</Name>
<Name>BoC</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
Expand Down
Expand Up @@ -9,7 +9,7 @@
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>BoC.Persistence.NHibernate</RootNamespace>
<AssemblyName>Commons.Persistence.NHibernate</AssemblyName>
<AssemblyName>BoC.Persistence.NHibernate</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<FileUpgradeFlags>
Expand Down Expand Up @@ -132,9 +132,9 @@
<Compile Include="WebSessionManager.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Commons\Commons.csproj">
<ProjectReference Include="..\Commons\BoC.csproj">
<Project>{25C350AF-4957-47E8-960A-6C59794C5DEF}</Project>
<Name>Commons</Name>
<Name>BoC</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
Expand Down
Expand Up @@ -9,7 +9,7 @@
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>BoC.Persistence.Norm</RootNamespace>
<AssemblyName>Commons.Persistence.NoRM</AssemblyName>
<AssemblyName>BoC.Persistence.NoRM</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
Expand Down Expand Up @@ -55,9 +55,9 @@
<Compile Include="NoRMRepository.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Commons\Commons.csproj">
<ProjectReference Include="..\Commons\BoC.csproj">
<Project>{25C350AF-4957-47E8-960A-6C59794C5DEF}</Project>
<Name>Commons</Name>
<Name>BoC</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
Expand Down
Expand Up @@ -9,7 +9,7 @@
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>BoC.Persistence.Xpo</RootNamespace>
<AssemblyName>Commons.Persistence.Xpo</AssemblyName>
<AssemblyName>BoC.Persistence.Xpo</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
Expand Down Expand Up @@ -85,9 +85,9 @@
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Commons\Commons.csproj">
<ProjectReference Include="..\Commons\BoC.csproj">
<Project>{25C350AF-4957-47E8-960A-6C59794C5DEF}</Project>
<Name>Commons</Name>
<Name>BoC</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
Expand Down
Expand Up @@ -9,7 +9,7 @@
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>BoC.Persistence.db4o</RootNamespace>
<AssemblyName>Commons.Persistence.db4o</AssemblyName>
<AssemblyName>BoC.Persistence.db4o</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<FileUpgradeFlags>
Expand Down
Expand Up @@ -9,7 +9,7 @@
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>BoC.Security.Mvc</RootNamespace>
<AssemblyName>Commons.Security.Mvc</AssemblyName>
<AssemblyName>BoC.Security.Mvc</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<FileUpgradeFlags>
Expand Down Expand Up @@ -160,21 +160,21 @@
</Compile>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Commons.Security\Commons.Security.csproj">
<ProjectReference Include="..\Commons.Security\BoC.Security.csproj">
<Project>{387BC181-5A33-4657-9C19-07A8FA48A916}</Project>
<Name>Commons.Security</Name>
<Name>BoC.Security</Name>
</ProjectReference>
<ProjectReference Include="..\Commons.Web.Mvc\Commons.Web.Mvc.csproj">
<ProjectReference Include="..\Commons.Web.Mvc\BoC.Web.Mvc.csproj">
<Project>{D21291A8-98DB-48F0-A864-CC468BA44EB1}</Project>
<Name>Commons.Web.Mvc</Name>
<Name>BoC.Web.Mvc</Name>
</ProjectReference>
<ProjectReference Include="..\Commons.Web.PrecompiledViews\Commons.Web.PrecompiledViews.csproj">
<ProjectReference Include="..\Commons.Web.PrecompiledViews\BoC.Web.PrecompiledViews.csproj">
<Project>{46C9FDE4-328A-4E80-8504-AED5E2196AE1}</Project>
<Name>Commons.Web.PrecompiledViews</Name>
<Name>BoC.Web.PrecompiledViews</Name>
</ProjectReference>
<ProjectReference Include="..\Commons\Commons.csproj">
<ProjectReference Include="..\Commons\BoC.csproj">
<Project>{25C350AF-4957-47E8-960A-6C59794C5DEF}</Project>
<Name>Commons</Name>
<Name>BoC</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
Expand Down
Expand Up @@ -9,7 +9,7 @@
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>BoC.Security.NHibernate</RootNamespace>
<AssemblyName>Commons.Security.NHibernate</AssemblyName>
<AssemblyName>BoC.Security.NHibernate</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<FileUpgradeFlags>
Expand Down Expand Up @@ -101,17 +101,17 @@
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Commons.Persistence.NHibernate\Commons.Persistence.NHibernate.csproj">
<ProjectReference Include="..\Commons.Persistence.NHibernate\BoC.Persistence.NHibernate.csproj">
<Project>{0F48E392-9474-4714-884A-129253F68997}</Project>
<Name>Commons.Persistence.NHibernate</Name>
<Name>BoC.Persistence.NHibernate</Name>
</ProjectReference>
<ProjectReference Include="..\Commons.Security\Commons.Security.csproj">
<ProjectReference Include="..\Commons.Security\BoC.Security.csproj">
<Project>{387BC181-5A33-4657-9C19-07A8FA48A916}</Project>
<Name>Commons.Security</Name>
<Name>BoC.Security</Name>
</ProjectReference>
<ProjectReference Include="..\Commons\Commons.csproj">
<ProjectReference Include="..\Commons\BoC.csproj">
<Project>{25C350AF-4957-47E8-960A-6C59794C5DEF}</Project>
<Name>Commons</Name>
<Name>BoC</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
Expand Down
Expand Up @@ -9,7 +9,7 @@
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>BoC.Security</RootNamespace>
<AssemblyName>Commons.Security</AssemblyName>
<AssemblyName>BoC.Security</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<FileUpgradeFlags>
Expand Down Expand Up @@ -115,9 +115,9 @@
<Compile Include="UserServiceException.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Commons\Commons.csproj">
<ProjectReference Include="..\Commons\BoC.csproj">
<Project>{25C350AF-4957-47E8-960A-6C59794C5DEF}</Project>
<Name>Commons</Name>
<Name>BoC</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
Expand Down
22 changes: 22 additions & 0 deletions Src/Commons.Web.Mvc/Binders/DecimalModelBinder.cs
@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc;

namespace BoC.Web.Mvc.Binders
{
public class DecimalModelBinder : DefaultModelBinder
{
public override object BindModel(
ControllerContext controllerContext,
ModelBindingContext bindingContext)
{
var valueProviderResult = bindingContext.ValueProvider.GetValue(bindingContext.ModelName);
if (valueProviderResult.AttemptedValue.Equals("N.aN") || valueProviderResult.AttemptedValue.Equals("NaN") || valueProviderResult.AttemptedValue.Equals("Infini.ty") || valueProviderResult.AttemptedValue.Equals("Infinity"))
return 0m;
return valueProviderResult == null ? base.BindModel(controllerContext, bindingContext) : Convert.ToDecimal(valueProviderResult.AttemptedValue);
}

}
}

0 comments on commit 4c8ec65

Please sign in to comment.