Rockford Lhotka
    CTO at Magenic
    Author, speaker, software architect
    Creator of the CSLA .NET framework

About me
Contact me


Version 2.0.1 Change Log


This document is the change log for version 2.0.1 of CSLA .NET.


Csla – CslaDataSource control

  • Major change to the way the business object’s metadata is loaded. It is now loaded using a temporary AppDomain so it is possible to refresh the metadata without restarting the IDE. At the moment the solution is a bit of a hack, and while it appears to work, I would like to find a better solution.


CSLA .NET Base classes (all six)

  • Add Initialize() method to all base classes (protected, virtual). This method is called before anything else (like AddBusinessRules()) and is intended to support code generators that choose to use a partial class scheme. This method allows the generated code to set up event handlers so the user code can add business and authorization rules during the object's initialization phase.



  • New interface added to support polymorphic child objects in BusinessListBase-derived collections.



  • Implements IEditableBusinessObject.


Csla\BusinessBase & Csla\ReadOnlyBase

  • Changed the Equals() implementation to avoid a possible null reference exception.



  • Added a Protected property to return the EditLevel value of the collection to match the same property in BusinessBase. This property makes it easier to implement some lazy loading scenarios.
  • Restrict generic parameter C to IEditableBusinessObject instead of Core.BusinessBase.


Csla\NameValueListBase & Csla\ReadOnlyListBase

  • [C# only] The OnDataPortalInvoke() method name had a typo which has now been fixed.



  • The ClientContext value is now stored in the current AppDomain when on a Windows client. There is no change to how it is stored in IIS, or in COM+.
  • The ClientContext property is now threadsafe (which means that GetClientContex() and SetClientContext() are also threadsafe). However, if you do use ClientContext from a multithreaded client application, it is up to you to use the SyncRoot property on the collection itself to ensure thread safety – all I have done is to make the access to the collection through ApplicationContext become safe.



  • TotalRowCount was not being handled properly. It is now returned through the args parameter rather than as a result of the select call.



  • Fix bug with how Nullable(Of T) types are handled.
  • Improve how the underlying type behind a Nullable<T> type is determined.
  • Change the scope of the class to public so its methods can be used by business code. This is particularly important for C#, as Utilities includes the IsNumeric() and CallByName() methods, which are very useful in implementing validation rule methods.



  • Add support for coercing enumerated value types, where if the property is an enumerated type and the inbound value is a string the Map() method will call System.Enum.Parse().
  • Renamed SetValue() to SetPropertyValue() and changed the SetPropertyValue() method’s scope to Public to allow for easier testing, and for possible other uses.



  • Add support for an a CslaAlwaysImpersonate configuration setting, so if this setting is set to true in appSettings:
    <add key="CslaAlwaysImpersonate" value="true" />
    then the Remoting proxy will always pass the client-side Windows credentials to the server, even if the data portal is configured to use custom authentication.



  • Fix bug with how GetMethod() finds overloaded methods – specifically how it was unable to find overloads in an abstract, generic base class.



  • [VB only] Fix StringMaxLength rule implementation to match C# implementation so it can handle Nothing values – which are possible from ASP.NET data binding.
  • Enhance MinValue() and MaxValue() rules to work with any IComparable type.
  • Change the regex for email validation to support lower-case email names and to avoid false positives of addresses containing spaces.



  • Removed unneeded propertyName parameter from ApplyReadRules() and ApplyWriteRules() methods



  • [C# only] Fixed bug with a null reference check.



  • [C# only] Fixed bug with the <= operator.



  • [C# only] AcceptChanges() was missing a check to make sure that the field's DeclaringType matches the currentType. This check was in CopyState() and UndoChanges() and has now been added to AcceptChanges() as well.
  • Enhance CopyState() and UndoChanges() to better support lazy loading of child objects by properly restoring null/Nothing values in UndoChanges(). This means that if CopyState() is called when a child field is null, then a child object is loaded and then UndoChanges() is called, the field will be restored to null.



  • Updated property generation to mark the properties with a compiler directive to prevent inlining – thus ensuring that PropertyHasChanged(), CanReadProperty() and CanWriteProperty() work in release mode.
  • Fixed name of AddValidationRules() to AddBusinessRules().



  • Updated properties in the business classes to mark the properties with a compiler directive to prevent inlining – thus ensuring that PropertyHasChanged(), CanReadProperty() and CanWriteProperty() work in release mode.
  • [C# only] Fixed an e.Keys parameter from “id” to “Id” in ProjectEdit.aspx.
  • Fixed how the child BindingSource object is reset when re-binding the data to a Windows Form in ProjectEdit and ResourceEdit.

(Updated 5/26/2006)