This release brings a bunch of bugfixes and some new features: The Subscription and SubscriptionCollection classes implement the WebDAV push event feature: Now you can subscribe to changes made to folders and elements. Here's a diagram of the system:
Class diagram of the Subscription management (click to enlarge)
Access to the SubscriptionCollection is exposed via the Connection Class, although you are free to create your own instance. By default, it binds to a local port between 1024 and 5000, but you can specify a fixed port also. An example is not yed available.
Another cool new feature is the incorporation of my little Expression classes. These classes allow you to easily build expressions for filter items in a ItemCollection or Searcher class. A typical example would be to filter all appointments in a folder between a specified date range. You can do this now very easily:
1 Expression expression = Expression.And(Expression.Equals(WellknownProperties.Appointment.Starttime, DateTime.Now),
2 Expression.Equals(WellknownProperties.Appointment.EndTime, DateTime.Now.AddDays(3)));
4 using (Connection connection = newConnection(server, ConnectionProtocol.Default, newCredential(username, password, AuthenticationType.Ntlm)))
6 Mailbox mbx = newMailbox("exchange/administrator", connection);
9 mbx.Calendar.Items.ConstraintExpression += expression;
12 foreach (CalendarItem item in mbx.Calendar.Items)
One special thing about this: You can concatenate two expressions by using the plus operator. This will result in both expressions being ANDed.
No more worrying about casting properties to the right type and such. You don't even have to worry about time zones - all handled automagically.
Here is a small overview over the expression classes:
Class diagram for the expression classes (click to enlarge)
- Fixed a bug in the FolderCollection class
- Fixed a bug in the TaskItem.PreSave() method which caused the Content class of the item not to be set.
- Fixed a bug in the TaskItem.PreSave() method which prevented a successful modification of the TaskStatus (Would not work if PercentComplete was not set)
- The Searcher<ItemType> now get the correct set of properties for the specific item types.
- Changed the type of TaskItem.PercentComplete from float to double
- Exchange 'float' datatype is now handled as 'System.Double' instead of 'System.Float'
- New method ApplyInheritedSecurity(FolderSecurity): Clears all security descriptor entries and applies the security settings from the specified descriptor. (Experimental!)
- SchemaClass attribute is now public
- The ItemCollection and ItemCollection<ItemType> classes now expose a IList<string> PropertiesToLoad property
- Renamed ChildItems and ChildFolders of the Folder and Folder<ItemType> classes to Items and Folders.
- Moved the IsRead property from MessageItem to Item
- Made the IsRead property writable
- Fixed a bug in the Property class which prevented setting propertyvalues to 0 or false
- Replaced the HttpStatus class with a PropertyStatus enumeration. HttpStatus was used with the Property.Status property.
- Added support for InfiniTec.Expressions on the Searcher, Item- and FolderCollections. Constraints can now be either specified using the Constraints property or the ConstraintExpression property.
- SubscriptionCollection and Subscription implement WebDAV events