You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 23, 2024. It is now read-only.
For some reason any computed properties that return bool cause the ko.Initialize() method call to fail. For example this fails:
[Computed]
public bool HasExpirationDate { get { return true; } }
This will cause this call to fail:
@ko.Initialize(Model)
With the following error:
No coercion operator is defined between types 'System.Int32' and 'System.Boolean'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: No coercion operator is defined between types 'System.Int32' and 'System.Boolean'.
Source Error:
Line 7: {
Line 8: @Scripts.Render("~/bundles/scripts/datepicker")
Line 9: @ko.Initialize(Model)
Line 10:
Line 11: <script>
Source File: c:\Development\Projects\Base House Contracting\Dev\Website\Views\TradeReview\Index.cshtml Line: 9
For some reason any computed properties that return bool cause the ko.Initialize() method call to fail. For example this fails:
[Computed]
public bool HasExpirationDate { get { return true; } }
This will cause this call to fail:
@ko.Initialize(Model)
With the following error:
No coercion operator is defined between types 'System.Int32' and 'System.Boolean'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: No coercion operator is defined between types 'System.Int32' and 'System.Boolean'.
Source Error:
Line 7: {
Line 8: @Scripts.Render("~/bundles/scripts/datepicker")
Line 9: @ko.Initialize(Model)
Line 10:
Line 11: <script>
Source File: c:\Development\Projects\Base House Contracting\Dev\Website\Views\TradeReview\Index.cshtml Line: 9
Stack Trace:
[InvalidOperationException: No coercion operator is defined between types 'System.Int32' and 'System.Boolean'.]
System.Linq.Expressions.Expression.Convert(Expression expression, Type type, MethodInfo method) +6156301
DelegateDecompiler.MethodBodyDecompiler.Decompile() +297
DelegateDecompiler.Cache
2.GetOrAdd(TKey key, Func
2 func) +247DelegateDecompiler.DecompileExtensions.Decompile(MethodInfo method) +127
DelegateDecompiler.DecompileExpressionVisitor.Decompile(MethodInfo method, Expression instance, IList
1 arguments) +36 PerpetuumSoft.Knockout.KnockoutJsModelBuilder.AddComputedToModel(Type modelType, Object model, String modelName) +321 PerpetuumSoft.Knockout.KnockoutContext
1.GetInitializeData(TModel model, Boolean needBinding) +526PerpetuumSoft.Knockout.KnockoutContext
1.Initialize(TModel model) +14 ASP.<>c__DisplayClass4.<Execute>b__2() in c:\Development\Projects\Base House Contracting\Dev\Website\Views\TradeReview\Index.cshtml:9 System.Web.WebPages.<>c__DisplayClassb.<RenderSection>b__9(TextWriter tw) +289 System.Web.WebPages.WebPageBase.Write(HelperResult result) +89 ASP._Page_Views_Shared__Layout_cshtml.Execute() in c:\Development\Projects\Base House Contracting\Dev\Website\Views\Shared\_Layout.cshtml:74 System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +280 System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +125 System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +196 System.Web.WebPages.WebPageBase.Write(HelperResult result) +89 System.Web.WebPages.WebPageBase.RenderSurrounding(String partialViewName, Action
1 body) +233System.Web.WebPages.WebPageBase.PopContext() +291
System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +380
System.Web.Mvc.<>c__DisplayClass1a.b__17() +33
System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func
1 continuation) +613 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func
1 continuation) +613System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func
1 continuation) +613 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList
1 filters, ActionResult actionResult) +263System.Web.Mvc.Async.<>c__DisplayClass25.b__22(IAsyncResult asyncResult) +240
System.Web.Mvc.<>c__DisplayClass1d.b__18(IAsyncResult asyncResult) +28
System.Web.Mvc.Async.<>c__DisplayClass4.b__3(IAsyncResult ar) +15
System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +53
System.Web.Mvc.Async.<>c__DisplayClass4.b__3(IAsyncResult ar) +15
System.Web.Mvc.<>c__DisplayClass8.b__3(IAsyncResult asyncResult) +42
System.Web.Mvc.Async.<>c__DisplayClass4.b__3(IAsyncResult ar) +15
System.Web.CallHandlerExecutionStep.OnAsyncHandlerCompletion(IAsyncResult ar) +282
The text was updated successfully, but these errors were encountered: