TensorRT Plugin Issue

Has anyone can help me to create the Plugin correctly on the base of TensorRT
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.