Registering Generic Classes using Generic Type Handler
NCache also gives you the facility to configure all required generic classes at
once using Generic Type Handler. For this, first of all, you have to implement
IGenericTypeProvider interface. Write the code for all the required
combinations for all data types that can be used in your application.
Click on the cache name in Cache Explorer to open cache settings.
Go to the Compact Serialization tab.
Click Generic Type Handler button.
In the Select Compact Classes dialog, click Browse to select the assembly that contains your generic type provider class, for which you have implemented the
All of the classes that had the implementation of the
IGenericTypeProviderinterface will get listed in Class Name drop down menu.
Select the required generic type provider class from the drop down list.
Click OK. It loads all of the generic classes with their generic types.
You can remove any of the registered generic class at any time using the Remove button available at Compact Serialization tab.
- Right click on the cache name in Cache Explorer and select the Apply Configuration option.