سؤال

The MSDN doc http://msdn.microsoft.com/en-us/library/fe5wyxa0%28v=vs.100%29.aspx indicates that there is a "custom" attribute available when adding a rule. But I don't see how it gets used. I can successfully add a custom provider without using it, and all the samples I've seen for adding custom events don't use it either. What does it do?

هل كانت مفيدة؟

المحلول

It evaluates whether an event should be sent to the related provider for processing. So you might want to use the custom attribute to do more complex evaluations for checking if the event should be sent to the providers. Check out IWebEventCustomEvaluator http://msdn.microsoft.com/en-us/library/system.web.management.iwebeventcustomevaluator.aspx for a specific example and more info.

نصائح أخرى

See the MSDN article which says that:

Gets or sets the fully qualified type of a custom class that implements IWebEventCustomEvaluator.

As an example:

ruleSetting.Custom = "MyEvaluators.MyCustomeEvaluator2, MyCustom.dll"
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top