Registering Non-Generic Classes
You can use either of the two ways described below to register your classes for compact serialization.
Using NCache Manager
Click on the cache name in the Cache Explorer. It will open cache configuration settings in right pane.
Go to the Compact Serialization tab.
Click the Add Types button, a new Select Compact Classes dialog box will open up.
Click on Browse. It will open a windows Open dialog. Using this dialog you can select .exe, .dll or .jar file.
Select your required file (.exe, .dll or .jar) and click on Open. It lists classes from the selected assembly in Loaded Class list box.
Select desired classes, which you want to register with NCache for compact serialization.
Click Add Class.
Compact serialization works on attribute level. In the lower pane, attributes of all your selected classes get listed; from here you can select attributes, which you do not want to be compact serialized.
Click OK to add classes. It lists fully qualified names of all selected classes in Compact Serialization tab.
Right click on the cache name in Cache Explorer and select Apply Configuration option.
If cache is already running, then you can apply configuration by clicking on the Hot Apply Configuration in the right click menu.
Using Windows PowerShell
Add-CompactType cmdlet enables the user to register a custom objet for compact serialization for the given caches
This command defines a compact type for demoLocalCache. You can define further types one by one repeating the step for other types.
Add-CompactType -CacheName demoLocalCache -AssemblyPath C:\Data.dll -Class NCache.Sample.Data.Compact.Engineer
Add-CompactType -CacheName demoLocalCache -AssemblyPath C:\Data.dll -Class NCache.Sample.Data.Compact.Manager -NonCompactAttributes hireDate