• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Ice类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Ice的典型用法代码示例。如果您正苦于以下问题:C# Ice类的具体用法?C# Ice怎么用?C# Ice使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Ice类属于命名空间,在下文中一共展示了Ice类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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


示例16: SessionHelper

 /// <summary>
 /// Creates a Glacier2 session.
 /// </summary>
 /// <param name="callback">The callback for notifications about session
 /// establishment.</param>
 /// <param name="initData">The Ice.InitializationData for initializing
 /// the communicator.</param>
 /// <param name="finderStr">The stringified Ice.RouterFinder proxy.</param>
 /// <param name="useCallbacks">True if the session should create an object adapter for receiving callbacks.</param>
 public SessionHelper(SessionCallback callback, Ice.InitializationData initData, string finderStr, bool useCallbacks)
 {
     _callback = callback;
     _initData = initData;
     _finderStr = finderStr;
     _useCallbacks = useCallbacks;
 }
开发者ID:Crysty-Yui,项目名称:ice,代码行数:16,代码来源:SessionHelper.cs


示例17: run

    public static int run(string[] args, Ice.Communicator communicator, TextWriter @out)
    {
        //
        // When running as a MIDlet the properties for the server may be
        // overridden by configuration. If it isn't then we assume
        // defaults.
        //
        if(communicator.getProperties().getProperty("TestAdapter.Endpoints").Length == 0)
        {
            communicator.getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010");
        }
        if(communicator.getProperties().getProperty("ControllerAdapter.Endpoints").Length == 0)
        {
            communicator.getProperties().setProperty("ControllerAdapter.Endpoints", "tcp -p 12011");
            communicator.getProperties().setProperty("ControllerAdapter.ThreadPool.Size", "1");
        }

        Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter");
        Ice.ObjectAdapter adapter2 = communicator.createObjectAdapter("ControllerAdapter");

        BackgroundControllerI backgroundController = new BackgroundControllerI(adapter);

        adapter.add(new BackgroundI(backgroundController), communicator.stringToIdentity("background"));
        adapter.add(new LocatorI(backgroundController), communicator.stringToIdentity("locator"));
        adapter.add(new RouterI(backgroundController), communicator.stringToIdentity("router"));
        adapter.activate();

        adapter2.add(backgroundController, communicator.stringToIdentity("backgroundController"));
        adapter2.activate();

        communicator.waitForShutdown();
        return 0;
    }
开发者ID:joshmoore,项目名称:ice,代码行数:33,代码来源:Server.cs


示例18: opBatchCount

 opBatchCount(Ice.Current current)
 {
     lock(this)
     {
         return _batchCount;
     }
 }
开发者ID:joshmoore,项目名称:ice,代码行数:7,代码来源:TestI.cs


示例19: holdAdapter

 public override void holdAdapter(int to, Ice.Current current)
 {
     current.adapter.hold();
     ActivateAdapterThread act = new ActivateAdapterThread(current.adapter, to);
     Thread thread = new Thread(new ThreadStart(act.run));
     thread.Start();
 }
开发者ID:Crysty-Yui,项目名称:ice,代码行数:7,代码来源:TimeoutI.cs


示例20: ObjectAdapterFactory

 //
 // Only for use by Instance.
 //
 internal ObjectAdapterFactory(Instance instance, Ice.Communicator communicator)
 {
     instance_ = instance;
     _communicator = communicator;
     _adapterNamesInUse = new HashSet<string>();
     _adapters = new List<Ice.ObjectAdapterI>();
 }
开发者ID:Crysty-Yui,项目名称:ice,代码行数:10,代码来源:ObjectAdapterFactory.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Ice.Current类代码示例发布时间:2022-05-24
下一篇:
C# IZone类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap