Registering Non-Generic Classes
You can use either of the two ways described below to register your generic classes for compact serialization.
Using NCache Manager
-
Click on Browse button. 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 and click Add Class.
here you can select attributes which you do not want to be compact serialized.
Using Command Line Tool
-
Open command prompt
-
Go to the NCache tools directory: cd %NCHOME%/bin/tools
-
Use addcompacttype.exe, provide the required information:
addcompacttype.exe /id demoLocalCache /a C:\Data.dll /c NCache.Sample.Data.Compact.Engineer
addcompacttype.exe /id demoLocalCache /a C:\Data.dll /c NCache.Sample.Data.Compact.Manager /al hireDate
for other types.
See Also