Ewl » Canonical The canonical version of EWL Read More
Clone URL:  
AutoCompleteService.cs
1
2
3
4
5
6
7
8
9
10
11
12
using System.Collections.Generic; using System.Web.Script.Serialization; namespace EnterpriseWebLibrary.EnterpriseWebFramework { public abstract class AutoCompleteService: EwfPage { protected override EwfSafeRequestHandler requestHandler => new EwfSafeResponseWriter( EwfResponse.Create( ContentTypes.PlainText, new EwfResponseBodyCreator( () => new JavaScriptSerializer().Serialize( getItems() ) ) ) ); protected abstract IEnumerable<AutoCompleteItem> getItems(); } }