NCache 4.4 - Online Documentation

Registering Generic Classes

 
NCache also supports generic classes to be compact serialized. Generic classes are configured in the same way as other
classes. In addition we also need to specify <T> types for each Generic class. Generic classes can be configured as folows:
 
Using NCache Manager
 
  • Click on the cache name in Cache Explorer to open cache settings
  • Go to the Compact Serialization tab.
  • Click on the Add Type button. Select Compact Classes dialog appears.
 
 
  • Click on the Show Default Generics button. It lists default generic types. Select the desired type and click Add Class.
 
 
  • It adds selected classes in the lower pane. Click OK to add classes for compact serialization.
 
 
  • All of the selected classes are now listed at Compact Serialization tab in NCache Manager.
 
 
  • Now you need to specify the classes which you expect to be assigned to the selected generic classes. When you select any of the added generic class, the Add<T> button becomes enabled. Click Add<T>.
  • Select Compact Cllasses dialog appears. Click Browse to select assembly. All classes will be loaded in Loaded Classes list box. Select your class and click Add Class.
 
 
  • Click OK. It adds generic <T> type under the select generic class.
 
 
  • This way you can specify as many <T> types for a generic class as needed.
  • Right click the cache in Cache Explorer and select Apply Configuration option.
 
 
See Also