Esempio n. 1
0
 /// <summary>
 /// Creates a bridge (tunnel) between the left context and the right context
 /// </summary>
 /// <param name="_">The gateway</param>
 /// <param name="leftContext">First context name to establish the data tunnel with</param>
 /// <param name="rightContext">Second context name to establish the data tunnel with </param>
 /// <returns></returns>
 public static IBridge Bridge(this IGateway _, string leftContext, string rightContext)
 {
     BridgeInfo.Set(_.GetActiveContext(), leftContext, rightContext);
     _.SwitchContext(leftContext);
     return(null);
 }
Esempio n. 2
0
 /// <summary>
 /// Creates a bridge (tunnel) between the current context (as left) and the right context
 /// </summary>
 /// <param name="_">The gateway</param>
 /// <param name="rightContext">Context name to establish a data tunnel</param>
 /// <returns>The interface instance</returns>
 public static IBridge Bridge(this IGateway _, string rightContext)
 => Bridge(_, _.GetActiveContext(), rightContext);