text: Calculated and Custom Storage Properties
  All domain properties in a domain-specific language (DSL) can be displayed to the user on the diagram and in your language explorer, and can be accessed by program code. However, properties differ in the way that their values are stored.
  If you set the Kind of a domain property to Calculated or Custom Storage, you have to provide access methods. When you build your solution, an error report will tell you what is required.
  To define a Calculated or Custom Storage Property
  In DslDefinition.dsl, select the domain property either in the diagram or in DSL Explorer.
  In the Properties window, set the Kind field to Calculated or Custom Storage.
  Make sure that you have also set its Type to what you want.
  Click Transform All Templates in the toolbar of Solution Explorer.
  On the Build menu, click Build Solution.
  You receive the following error message: "YourClass does not contain a definition for GetYourProperty."
  Double-click the error message.
  Dsl\GeneratedCode\DomainClasses.cs or DomainRelationships.cs opens. Above the highlighted method call, a comment prompts you to provide an implementation for GetYourProperty().
  Create or open a class file in a separate folder, for example CustomCode\YourDomainClass.cs.
  Make sure that the namespace is the same as in the generated code.
  In the class file, write a partial implementation of the domain class. In the class, write a definition for the missing Get method that resembles the following example:
  If you set Kind to Custom Storage, you will also have to provide a Set method. For example:
  Your code should not set values in the store when Store.InUndoRedoOrRollback is true. See Transactions and Custom Setters.
  Build and run the solution.
  Test the property. Make sure that you try Undo and Redo.
  In the Set method of Custom Storage property, you do not have to open a transaction, because the method is usually called inside an active transaction.
  However, the Set method might also be called if the user invokes Undo or Redo, or if a transaction is being rolled back. When InUndoRedoOrRollback is true, your Set method should behave as follows:
  It should not make changes in the store, such as assigning values to other domain properties. The undo manager will set their values.
  However, it should update any external resources, such as database or file contents, or objects outside the store. This will make sure that they are kept in synchronism with the values in the store.
  For example:
  For more information about transactions, see Navigating and Updating a Model in Program Code.