forked from jehugaleahsa/mustache-sharp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DynamicObject does not go into the cache
Whenever a DynamicObject derived class was created, and another DynamicObject was created from the same derived class, Mustache# was using the old recipe for the object, because the properties were actually being cached. While this is useful for a statically-typed object, in the case of the DynamicObject, this is not practical. Introduced a new flag in PropertyDictionary, _isDynamicObject, and check the flag before performing operations against the cache. Static objects still use the cache, dynamic objects get queried at run-time. This is the safest bet to make sure all DynamicObject properties will be available to the Render() call.
- Loading branch information
Showing
1 changed file
with
113 additions
and
39 deletions.
There are no files selected for viewing
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