| 個人檔案Blogs部落格清單 | 說明 |
|
|
4月9日 AnnouncementSoon I will offer a free version of the Jedi Library for download with the following contents:
The library will be free of charge for private use though it is not allowed to use it for professional applications without permission! 4月6日 JediGridThe JediPanel is part of the new Jedi assembly that I'm creating including various controls such as
for for details about the JediGrid see the PowerPoint presentation: http://www.msnusers.com/n17u6qt1kivpohh9q0l6njksc1/Documents/JediPanel2.pptx 11月18日 The Listsearcher classWhile developing the new DOCexplorer, I created a class that allows to find objects in any Ilist class, by specifiying criterias that match for the object and it's properties. The Listsearcher class uses reflection to determine the public properties of the object within the list, and thus can perform a search for each property value. The search can be simple or complex by specifying an expression string with various kinds of comparisons and boolesic arithmetic, including nested brackets. For instance:
Are valid expressions. If no property name is specified, the comparer uses the object.ToString() result to compare, otherwhise the specified property. It's even not necessary to write the complete name of the property. Eq. if there is a property with the name "DayOfBirth", you can simply specify it by using the first letters, ignoring the charcase. So "day:1973" is a valid expression. With the LocaleProvider class (which has also been developed by myself to enable multilinguale applications as easy as possible) it's also possible, to specify more than one name for a property, thus the "DayOfBirth" property may be also accessed as "born", which is simpler to write and remember.
To optimize the performance while searching, the Listsearcher compiles an "in memory" class depending on the expression so the search is performed with full speed, as if it was written for this special purpose, as it IS compiled for this special purpose! Of course, the need to parse the expression and to compile it, before using it slows down a little bit, but that is not recognizable. The Listsearcher together with the developed UI input panel makes it easy to perform complex searches for any kinds of lists without the need to implement any search algorithm for the list. |
|
|