TensorRT 5.0.2.6 Plugin Issue

Has anyone can help me to create the Plugin correctly on the base of TensorRT 5.0.2.6???
I knew there has two ways to register plugin and create it.
BTW, I re-construct the network by myself not use any other paser, I want to know the correct process of plugin registration and creation. Thanks in advance.