当前位置: 首页>>代码示例>>C#>>正文


C# Ice类代码示例

本文整理汇总了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;
 }
开发者ID:bholl,项目名称:zeroc-ice,代码行数:7,代码来源:MyClassI.cs

示例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);
        }
    }
开发者ID:Radulfr,项目名称:zeroc-ice,代码行数:25,代码来源:TestIntfI.cs

示例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;
    }
开发者ID:pedia,项目名称:zeroc-ice,代码行数:28,代码来源:Client.cs

示例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();
    }
开发者ID:Crysty-Yui,项目名称:ice,代码行数:31,代码来源:ServantLocatorI.cs

示例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]
         ))
         ;
 }
开发者ID:BackupTheBerlios,项目名称:ferdadataminer-svn,代码行数:29,代码来源:DfFUE.cs

示例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;
 }
开发者ID:Radulfr,项目名称:zeroc-ice,代码行数:7,代码来源:MyClassI.cs

示例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);
     }
 }
开发者ID:pedia,项目名称:zeroc-ice,代码行数:25,代码来源:HoldI.cs

示例8: getConnectionObserver

 getConnectionObserver(Ice.ConnectionInfo ci, 
                       Ice.Endpoint ei, 
                       Ice.Instrumentation.ConnectionState s,
                       Ice.Instrumentation.ConnectionObserver o)
 {
     return null;
 }
开发者ID:joshmoore,项目名称:ice,代码行数:7,代码来源:Instrumentation.cs

示例9: ConnectionRequestHandler

 public ConnectionRequestHandler(Reference @ref, Ice.ConnectionI connection, bool compress)
 {
     _reference = @ref;
     _response = _reference.getMode() == Reference.Mode.ModeTwoway;
     _connection = connection;
     _compress = compress;
 }
开发者ID:Crysty-Yui,项目名称:ice,代码行数:7,代码来源:ConnectionRequestHandler.cs

示例10: ice_exception

 public override void ice_exception(Ice.Exception ex)
 {
     if (callback != null)
     {
         callback(new Result<bool>(ex));
     }
 }
开发者ID:summer-of-software,项目名称:vtank,代码行数:7,代码来源:MasterAMI.cs

示例11: ServiceManagerI

 public ServiceManagerI(Ice.Communicator communicator, string[] args)
 {
     _communicator = communicator;
     _logger = _communicator.getLogger();
     _argv = args;
     _traceServiceObserver = _communicator.getProperties().getPropertyAsInt("IceBox.Trace.ServiceObserver");
 }
开发者ID:bholl,项目名称:zeroc-ice,代码行数:7,代码来源:ServiceManagerI.cs

示例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_;
    }
开发者ID:Crysty-Yui,项目名称:ice,代码行数:28,代码来源:InterceptorI.cs

示例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;
 }
开发者ID:bholl,项目名称:zeroc-ice,代码行数:7,代码来源:MyClassI.cs

示例14: opNDCSS

 public override Dictionary<string, CSS> opNDCSS(Dictionary<string, CSS> i,
                                                 out Dictionary<string, CSS> o,
                                                 Ice.Current current)
 {
     o = i;
     return i;
 }
开发者ID:bholl,项目名称:zeroc-ice,代码行数:7,代码来源:MyClassI.cs

示例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")));
 }
开发者ID:joshmoore,项目名称:ice,代码行数:7,代码来源:Server.cs


注:本文中的Ice类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。