コード例 #1
0
ファイル: AccessorServices.cs プロジェクト: mo-alam/ATheory
 /// <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);
 }
コード例 #2
0
ファイル: AccessorServices.cs プロジェクト: mo-alam/ATheory
 /// <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);