本文整理汇总了C#中Ice类的典型用法代码示例。如果您正苦于以下问题:C# Ice类的具体用法?C# Ice怎么用?C# Ice使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Ice类属于命名空间,在下文中一共展示了Ice类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: opNDAIS
public override Dictionary<string, int[]> opNDAIS(Dictionary<string, int[]> i,
out Dictionary<string, int[]> o,
Ice.Current current)
{
o = i;
return i;
}
示例2: pingBiDir
public override void pingBiDir(Ice.Identity id, Ice.Current current)
{
try
{
//
// Ensure sending too much data doesn't cause the UDP connection
// to be closed.
//
try
{
byte[] seq = new byte[32 * 1024];
Test.TestIntfPrxHelper.uncheckedCast(current.con.createProxy(id)).sendByteSeq(seq, null);
}
catch(Ice.DatagramLimitException)
{
// Expected.
}
Test.PingReplyPrxHelper.uncheckedCast(current.con.createProxy(id)).reply();
}
catch(Ice.LocalException)
{
Debug.Assert(false);
}
}
示例3: run
private static int run(string[] args, Ice.Communicator communicator)
{
System.Collections.Generic.List<int> ports = new System.Collections.Generic.List<int>();
for(int i = 0; i < args.Length; i++)
{
int port = 0;
try
{
port = System.Int32.Parse(args[i]);
}
catch(System.FormatException ex)
{
System.Console.Error.WriteLine(ex);
return 1;
}
ports.Add(port);
}
if(ports.Count == 0)
{
System.Console.Error.WriteLine("Client: no ports specified");
usage();
return 1;
}
AllTests.allTests(communicator, ports);
return 0;
}
示例4: locate
public Ice.Object locate(Ice.Current current, out System.Object cookie)
{
lock(this)
{
test(!_deactivated);
}
test(current.id.category.Equals(_category) || _category.Length == 0);
if(current.id.name.Equals("unknown"))
{
cookie = null;
return null;
}
test(current.id.name.Equals("locate") || current.id.name.Equals("finished"));
if(current.id.name.Equals("locate"))
{
exception(current);
}
//
// Ensure locate() is only called once per request.
//
test(_requestId == -1);
_requestId = current.requestId;
cookie = new CookieI();
return new TestI();
}
示例5: getStatistics
public override float getStatistics(Ferda.Modules.AbstractQuantifierSetting quantifierSetting, Ice.Current current__)
{
//Differences between EConfidence (a+d)/(a+b+c+d)
return
((float)(
quantifierSetting.firstContingencyTableRows[0][0] +
quantifierSetting.firstContingencyTableRows[1][1]
)
/
(float)(
quantifierSetting.firstContingencyTableRows[0][0] +
quantifierSetting.firstContingencyTableRows[0][1] +
quantifierSetting.firstContingencyTableRows[1][0] +
quantifierSetting.firstContingencyTableRows[1][1]
))
-
((float)(
quantifierSetting.secondContingencyTableRows[0][0] +
quantifierSetting.secondContingencyTableRows[1][1]
)
/
(float)(
quantifierSetting.secondContingencyTableRows[0][0] +
quantifierSetting.secondContingencyTableRows[0][1] +
quantifierSetting.secondContingencyTableRows[1][0] +
quantifierSetting.secondContingencyTableRows[1][1]
))
;
}
示例6: opNDV
public override Dictionary<string, Dictionary<int, int>> opNDV(Dictionary<string, Dictionary<int, int>> i,
out Dictionary<string, Dictionary<int, int>> o,
Ice.Current current)
{
o = i;
return i;
}
示例7: putOnHold
putOnHold(int milliSeconds, Ice.Current current)
{
if(milliSeconds < 0)
{
_adapter.hold();
}
else if(milliSeconds == 0)
{
_adapter.hold();
_adapter.activate();
}
else
{
_timer.schedule(() =>
{
try
{
putOnHold(0, null);
}
catch(Ice.ObjectAdapterDeactivatedException)
{
}
}, milliSeconds);
}
}
示例8: getConnectionObserver
getConnectionObserver(Ice.ConnectionInfo ci,
Ice.Endpoint ei,
Ice.Instrumentation.ConnectionState s,
Ice.Instrumentation.ConnectionObserver o)
{
return null;
}
示例9: ConnectionRequestHandler
public ConnectionRequestHandler(Reference @ref, Ice.ConnectionI connection, bool compress)
{
_reference = @ref;
_response = _reference.getMode() == Reference.Mode.ModeTwoway;
_connection = connection;
_compress = compress;
}
示例10: ice_exception
public override void ice_exception(Ice.Exception ex)
{
if (callback != null)
{
callback(new Result<bool>(ex));
}
}
示例11: ServiceManagerI
public ServiceManagerI(Ice.Communicator communicator, string[] args)
{
_communicator = communicator;
_logger = _communicator.getLogger();
_argv = args;
_traceServiceObserver = _communicator.getProperties().getPropertyAsInt("IceBox.Trace.ServiceObserver");
}
示例12: dispatch
public override Ice.DispatchStatus dispatch(Ice.Request request)
{
Ice.Current current = request.getCurrent();
lastOperation_ = current.operation;
if(lastOperation_.Equals("addWithRetry"))
{
for(int i = 0; i < 10; ++i)
{
try
{
servant_.ice_dispatch(request);
test(false);
}
catch(Test.RetryException)
{
//
// Expected, retry
//
}
}
current.ctx["retry"] = "no";
}
lastStatus_ = servant_.ice_dispatch(request);
return lastStatus_;
}
示例13: opNDGSS
public override Dictionary<string, List<string>> opNDGSS(Dictionary<string, List<string>> i,
out Dictionary<string, List<string>> o,
Ice.Current current)
{
o = i;
return i;
}
示例14: opNDCSS
public override Dictionary<string, CSS> opNDCSS(Dictionary<string, CSS> i,
out Dictionary<string, CSS> o,
Ice.Current current)
{
o = i;
return i;
}
示例15: findAdapterById_async
public override void findAdapterById_async(Ice.AMD_Locator_findAdapterById response, string adapter,
Ice.Current current)
{
_controller.checkCallPause(current);
Ice.Communicator communicator = current.adapter.getCommunicator();
response.ice_response(current.adapter.createDirectProxy(communicator.stringToIdentity("dummy")));
}