本文整理汇总了C#中Communicator.stringToProxy方法的典型用法代码示例。如果您正苦于以下问题:C# Communicator.stringToProxy方法的具体用法?C# Communicator.stringToProxy怎么用?C# Communicator.stringToProxy使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Communicator
的用法示例。
在下文中一共展示了Communicator.stringToProxy方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TempCommunicator
public TempCommunicator(string configFileClasspath)
{
log("Constructor called");
try
{
InitializationData initData = new InitializationData();
initData.properties = Util.createProperties();
initData.properties.load(configFileClasspath);
communicator = Util.initialize(initData);
log("Properties Loaded!");
}
catch (Exception e)
{
log(e.ToString());
throw e;
}
string proxy1 = "'::TeRK::TeRKUser':tcp -h 127.0.0.1 -p 10101";
log("Calling stringToProxy on " + proxy1);
communicator.stringToProxy(proxy1);
log("Complete!");
string proxy2 = "'::TeRK::TeRKUser':tcp -h 192.168.0.16 -p 10101";
log("Calling stringToProxy on " + proxy2);
communicator.stringToProxy(proxy2);
log("Complete!");
log("Constructor terminated");
writeLog("C:\\tempCommLog.txt");
}
示例2: IceMessageSender
internal IceMessageSender(Uri serviceUri)
{
var address = string.Format("OrderService:tcp -p {1} -h {0}", serviceUri.Host, serviceUri.Port);
communicator = Util.initialize();
proxy = IMessageServicePrxHelper.checkedCast(communicator.stringToProxy(address));
}
示例3: DHTNodeI
public DHTNodeI(string nodeName, bool isMaster, Communicator communicator)
{
IsDisconnecting = false;
_communicator = communicator;
_nodeName = nodeName;
if (isMaster)
{
subtreeRange = new range(int.MinValue, int.MaxValue);
_parent = null;
ranges.Add(new range(int.MinValue, int.MaxValue));
Console.WriteLine(describe());
return;
}
while (true)
{
ObjectPrx oprx = communicator.stringToProxy(Constants.SERVICE_NAME);
DHTNodePrx nprx = DHTNodePrxHelper.checkedCast(oprx);
if (nprx != null)
{
try
{
nodeConf my_node = nprx.newConnected(nodeName);
subtreeRange = new range(my_node.min, my_node.max);
ranges.Add(new range(my_node.min, my_node.max));
_parent = my_node.parentNode;
Console.WriteLine(describe());
return;
}
catch (Ice.Exception e)
{
Console.WriteLine(e.StackTrace);
}
}
else
{
Console.WriteLine("Wait for master");
Thread.Sleep(500);
}
}
}