コード例 #1
0
 /// <summary>
 /// Remove Static NodeListenerFactory instance
 /// </summary>
 /// <param name="listener">The instance to be removed</param>
 public static void RemoveStaticNodeListenerFactory(NodeListenerFactory <TCtx> listener)
 {
     lock (typeof(NodeDispatcher <TCtx>))
     {
         if (StaticNodeListenerFactory != null && listener != null)
         {
             StaticNodeListenerFactory.Remove(listener);
         }
     }
 }
コード例 #2
0
 /// <summary>
 /// Add Static NodeListenerFactory instance
 /// </summary>
 /// <param name="listener">The instance to be added</param>
 public static void RegisterStaticNodeListenerFactory(NodeListenerFactory <TCtx> listener)
 {
     lock (typeof(NodeDispatcher <TCtx>))
     {
         if (StaticNodeListenerFactory == null && listener != null)
         {
             StaticNodeListenerFactory = new List <NodeListenerFactory <TCtx> >();
         }
         StaticNodeListenerFactory.Add(listener);
     }
 }