Show Changes Show Changes
Edit Edit
Print Print
Recent Changes Recent Changes
Subscriptions Subscriptions
Lost and Found Lost and Found
Find References Find References
Rename Rename
Administration Page Administration Page
Search

History

8/23/2007 11:15:38 AM
NathanJones-68.209.248.222
8/23/2007 11:14:55 AM
NathanJones-68.209.248.222
8/23/2007 10:49:10 AM
NathanJones-68.209.248.222
8/23/2007 10:29:14 AM
NathanJones-68.209.248.222
8/23/2007 10:11:58 AM
NathanJones-68.209.248.222
List all versions List all versions

RSS feed for the FlexWiki namespace

Change Note Topic Selection
.
Owner
RequiredBuild
RelatedFeatureRequests
Summary
Changes regarding NamespaceManager.AllTopics() to allow filtering of returned topics

The NamespaceManager class has several methods for selecting a list of topic names returned in the form of a QualifiedTopicNameCollection. All the various methods eventually call into

 NamespaceManager.AllTopics(ImportPolicy importPolicy, 
                                    Comparison<QualifiedTopicName> sortCriterion)

to do the work. I've modified this method to allow the filtering of the topics selected, so the worker method now looks like this

 NamespaceManager.AllTopics(ImportPolicy importPolicy, 
                                    Comparison<QualifiedTopicName> sortCriterion)
                                    Predicate<QualifiedTopicName> selectionCriterion)

Now, the behavior is that the results of the query into the ContentProviderChain is filtered based on the selectionCriterion before being sorted with the sortCriterion. This order of operations allow the potentially expensive Sort to be done on the exact set of topics desired instead of doing the sort first and then looking for the desired topics.

The method NamespaceManager.AllTopicsWith has been modified to get its list of QualifiedTopicNames using this mechanism.

Here is an example that looks for the topics that have a name that starts with "Foo"

 QualifiedTopicNameCollection topics;
 topics = namespace.AllTopicsSortedLastModifiedDescending(delegate(QualifiedTopicName name)
    {
       return name.LocalName.StartsWith("Foo");
    });

Note
Right now the sorting and selection occurs at the NamespaceManager level. It seems reasonable to actually supply the ContentProviders these criteria so that the sortings and filtering (maybe only filtering?) occurs at the provider level instead of at the NamespaceManager level.

Not logged in. Log in

Welcome to the home of FlexWiki, a collaboration tool, based on WikiWiki, implemented using Microsoft .NET technologies

This is FlexWiki, an open source wiki engine.

This site supports the new NoFollow anti-spam initiative.
Change Style

Recent Topics