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

C# IMessageTransferModule类代码示例

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

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



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

示例1: Initialise

        public void Initialise(Scene scene, IConfigSource config)
        {
            if (config.Configs["Messaging"] != null)
            {
                // Allow disabling this module in config
                //
                if (config.Configs["Messaging"].GetString(
                        "InventoryTransferModule", "InventoryTransferModule") !=
                        "InventoryTransferModule")
                    return;
            }

            if (!m_Scenelist.Contains(scene))
            {
                if (m_Scenelist.Count == 0)
                {
                    m_TransferModule = scene.RequestModuleInterface<IMessageTransferModule>();
                    if (m_TransferModule == null)
                        m_log.Error("[INVENTORY TRANSFER] No Message transfer module found, transfers will be local only");
                }

                m_Scenelist.Add(scene);

                scene.RegisterModuleInterface<IInventoryTransferModule>(this);

                scene.EventManager.OnNewClient += OnNewClient;
                scene.EventManager.OnClientClosed += ClientLoggedOut;
                scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage;
            }
        }
开发者ID:Ideia-Boa,项目名称:Diva-s-OpenSim-Tests,代码行数:30,代码来源:InventoryTransferModule.cs


示例2: RegionLoaded

        public void RegionLoaded(Scene scene)
        {
            if (!m_Enabled)
                return;
			
            if (m_TransferModule == null)
            {
                m_TransferModule =
                    scene.RequestModuleInterface<IMessageTransferModule>();

                if (m_TransferModule == null)
                {
                    m_log.Error("[INSTANT MESSAGE]: No message transfer module, "+
                    "lures will not work!");

                    m_Enabled = false;
                    m_scenes.Clear();
                    scene.EventManager.OnNewClient -= OnNewClient;
                    scene.EventManager.OnClosingClient -= OnClosingClient;
                    scene.EventManager.OnIncomingInstantMessage -=
                            OnGridInstantMessage;
                }
            }

        }
开发者ID:rknop,项目名称:Aurora-Sim,代码行数:25,代码来源:LureModule.cs


示例3: PostInitialise

        public void PostInitialise()
        {
            m_TransferModule =
                m_scenes[0].RequestModuleInterface<IMessageTransferModule>();

            if (m_TransferModule == null)
                m_log.Error("[INSTANT MESSAGE]: No message transfer module, "+
                "lures will not work!");
        }
开发者ID:BogusCurry,项目名称:halcyon,代码行数:9,代码来源:LureModule.cs


示例4: PostInitialise

 public void PostInitialise()
 {
     if (m_Scenelist.Count > 0)
     {
         m_TransferModule = m_Scenelist[0].RequestModuleInterface<IMessageTransferModule>();
         if (m_TransferModule == null)
             m_log.Error("[INVENTORY TRANSFER] No Message transfer module found, transfers will be local only");
     }
 }
开发者ID:AlphaStaxLLC,项目名称:taiga,代码行数:9,代码来源:InventoryTransferModule.cs


示例5: RegionLoaded

        public void RegionLoaded (IScene scene)
        {
            if (m_TransferModule == null) {
                m_TransferModule = m_Scenelist [0].RequestModuleInterface<IMessageTransferModule> ();
                if (m_TransferModule == null) {
                    MainConsole.Instance.Error (
                        "[Inventory transfer]: No Message transfer module found, transfers will be local only");
                    m_Enabled = false;

                    m_Scenelist.Clear ();
                    scene.EventManager.OnNewClient -= OnNewClient;
                    scene.EventManager.OnClosingClient -= OnClosingClient;
                    scene.EventManager.OnIncomingInstantMessage -= OnGridInstantMessage;
                }
            }
        }
开发者ID:WhiteCoreSim,项目名称:WhiteCore-Dev,代码行数:16,代码来源:InventoryTransferModule.cs


示例6: RegionLoaded

        public void RegionLoaded (IScene scene)
        {
            if (!m_enabled)
                return;

            if (m_TransferModule == null) {
                m_TransferModule = scene.RequestModuleInterface<IMessageTransferModule> ();

                if (m_TransferModule == null) {
                    MainConsole.Instance.Error ("[Instant message]: No message transfer module, IM will not work!");
                    scene.EventManager.OnNewClient -= EventManager_OnNewClient;
                    scene.EventManager.OnClosingClient -= EventManager_OnClosingClient;
                    scene.EventManager.OnIncomingInstantMessage -= OnGridInstantMessage;

                    m_Scene = null;
                    m_enabled = false;
                }
            }
        }
开发者ID:WhiteCoreSim,项目名称:WhiteCore-Dev,代码行数:19,代码来源:InstantMessageModule.cs


示例7: RegionLoaded

        public void RegionLoaded (IScene scene)
        {
            if (!m_enabled)
                return;

            if (m_TransferModule == null) {
                OfflineMessagesConnector = Framework.Utilities.DataManager.RequestPlugin<IOfflineMessagesConnector> ();
                m_TransferModule = scene.RequestModuleInterface<IMessageTransferModule> ();
                if (m_TransferModule == null || OfflineMessagesConnector == null) {
                    scene.EventManager.OnNewClient -= OnNewClient;
                    scene.EventManager.OnClosingClient -= OnClosingClient;

                    m_enabled = false;
                    m_Scene = null;

                    MainConsole.Instance.Error (
                        "[OFFLINE MESSAGING] No message transfer module or OfflineMessagesConnector is enabled. Disabling offline messages");
                    return;
                }
                m_TransferModule.OnUndeliveredMessage += UndeliveredMessage;
            }
        }
开发者ID:EnricoNirvana,项目名称:WhiteCore-Dev,代码行数:22,代码来源:OfflineMessagesModule.cs


示例8: Initialize

        protected int EMAIL_PAUSE_TIME = 20;  // documented delay value for smtp.

        public void Initialize(IScriptEngine ScriptEngine, SceneObjectPart host, TaskInventoryItem item)
        {
            m_ScriptEngine = ScriptEngine;
            m_host = host;
            m_item = item;

            LoadLimits();  // read script limits from config.

            m_TransferModule =
                    m_ScriptEngine.World.RequestModuleInterface<IMessageTransferModule>();
            m_UrlModule = m_ScriptEngine.World.RequestModuleInterface<IUrlModule>();

            AsyncCommands = new AsyncCommandManager(ScriptEngine);
        }
开发者ID:OpenPlex-Sim,项目名称:opensim,代码行数:16,代码来源:LSL_Api.cs


示例9: RegionLoaded

        public void RegionLoaded(IScene scene)
        {
            if (!m_groupMessagingEnabled)
                return;

            m_groupData = scene.RequestModuleInterface<IGroupsServicesConnector>();
            m_groupsModule = scene.RequestModuleInterface<IGroupsModule>();

            // No groups module, no groups messaging
            if (m_groupData == null)
            {
                MainConsole.Instance.Error(
                    "[GROUPS-MESSAGING]: Could not get IGroupsServicesConnector, GroupsMessagingModule is now disabled.");
                Close();
                m_groupMessagingEnabled = false;
                return;
            }

            m_msgTransferModule = scene.RequestModuleInterface<IMessageTransferModule>();

            // No message transfer module, no groups messaging
            if (m_msgTransferModule == null)
            {
                MainConsole.Instance.Error("[GROUPS-MESSAGING]: Could not get MessageTransferModule");
                Close();
                m_groupMessagingEnabled = false;
                return;
            }


            m_sceneList.Add(scene);

            scene.EventManager.OnNewClient += OnNewClient;
            scene.EventManager.OnClosingClient += OnClosingClient;
            scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage;
            scene.EventManager.OnClientLogin += OnClientLogin;
            scene.EventManager.OnChatSessionRequest += OnChatSessionRequest;
        }
开发者ID:samiam123,项目名称:Aurora-Sim,代码行数:38,代码来源:GroupsMessagingModule.cs


示例10: Initialize

        public void Initialize(IScriptModulePlugin ScriptEngine, SceneObjectPart host, uint localID, UUID itemID, ScriptProtectionModule module)
        {
            m_ScriptEngine = ScriptEngine;
            m_host = host;
            m_localID = localID;
            m_itemID = itemID;
            ScriptProtection = module;

            m_ScriptDelayFactor =
                m_ScriptEngine.Config.GetFloat("ScriptDelayFactor", 1.0f);
            m_ScriptDistanceFactor =
                m_ScriptEngine.Config.GetFloat("ScriptDistanceLimitFactor", 1.0f);
            m_MinTimerInterval =
                m_ScriptEngine.Config.GetFloat("MinTimerInterval", 0.5f);
            m_automaticLinkPermission =
                m_ScriptEngine.Config.GetBoolean("AutomaticLinkPermission", false);
            m_notecardLineReadCharsMax =
                m_ScriptEngine.Config.GetInt("NotecardLineReadCharsMax", 255);
            if (m_notecardLineReadCharsMax > 65535)
                m_notecardLineReadCharsMax = 65535;

            m_TransferModule =
                    World.RequestModuleInterface<IMessageTransferModule>();
            m_UrlModule = World.RequestModuleInterface<IUrlModule>();
            m_comms = World.RequestModuleInterface<IWorldComm>();
        }
开发者ID:mugginsm,项目名称:Aurora-Sim,代码行数:26,代码来源:LSL_Api.cs


示例11: RegionLoaded

        public void RegionLoaded(Scene scene)
        {
            if (!m_groupsEnabled)
                return;

            if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);

            if (m_groupData == null)
            {
                m_groupData = scene.RequestModuleInterface<IGroupsServicesConnector>();

                // No Groups Service Connector, then nothing works...
                if (m_groupData == null)
                {
                    m_groupsEnabled = false;
                    m_log.Error("[GROUPS]: Could not get IGroupsServicesConnector");
                    Close();
                    return;
                }

                m_groupsMessagingModule = scene.RequestModuleInterface<IGroupsMessagingModule>();
            }

            if (m_msgTransferModule == null)
            {
                m_msgTransferModule = scene.RequestModuleInterface<IMessageTransferModule>();

                // No message transfer module, no notices, group invites, rejects, ejects, etc
                if (m_msgTransferModule == null)
                {
                    m_groupsEnabled = false;
                    m_log.Error("[GROUPS]: Could not get MessageTransferModule");
                    Close();
                    return;
                }
            }

            lock (m_sceneList)
            {
                m_sceneList.Add(scene);
            }

            scene.EventManager.OnNewClient += OnNewClient;
            scene.EventManager.OnClosingClient += OnClosingClient;
            scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage;
            scene.EventManager.OnClientLogin += EventManager_OnClientLogin;
            scene.EventManager.OnRegisterCaps += new EventManager.RegisterCapsEvent(EventManager_OnRegisterCaps);
            // The InstantMessageModule itself doesn't do this, 
            // so lets see if things explode if we don't do it
            // scene.EventManager.OnClientClosed += OnClientClosed;

        }
开发者ID:WordfromtheWise,项目名称:Aurora,代码行数:52,代码来源:GroupsModule.cs


示例12: RegionLoaded

        public void RegionLoaded (IScene scene)
        {
            if (!m_Enabled)
                return;
            m_TransferModule = m_scene.RequestModuleInterface<IMessageTransferModule> ();

            if (m_TransferModule == null)
                MainConsole.Instance.Error ("[INSTANT MESSAGE]: No message transfer module, lures will not work!");
        }
开发者ID:EnricoNirvana,项目名称:WhiteCore-Dev,代码行数:9,代码来源:LureModule.cs


示例13: RegionLoaded

        public void RegionLoaded(IScene scene)
        {
            if (!m_groupsEnabled)
                return;

            if (m_debugEnabled)
                MainConsole.Instance.DebugFormat("[GROUPS]: {0} called", MethodBase.GetCurrentMethod().Name);

            m_groupData = WhiteCore.Framework.Utilities.DataManager.RequestPlugin<IGroupsServiceConnector>();

            // No Groups Service Connector, then nothing works...
            if (m_groupData == null)
            {
                m_groupsEnabled = false;
                MainConsole.Instance.Error("[GROUPS]: Could not get IGroupsServicesConnector");
                Close();
                return;
            }

            m_msgTransferModule = scene.RequestModuleInterface<IMessageTransferModule>();
            m_imService = scene.RequestModuleInterface<IInstantMessagingService>();

            // No message transfer module, no notices, group invites, rejects, ejects, etc
            if (m_msgTransferModule == null)
            {
                m_groupsEnabled = false;
                MainConsole.Instance.Error("[GROUPS]: Could not get MessageTransferModule");
                Close();
                return;
            }

            m_scene = scene;

            scene.EventManager.OnNewClient += OnNewClient;
            scene.EventManager.OnMakeRootAgent += OnMakeRootAgent;
            scene.EventManager.OnClosingClient += OnClosingClient;
            scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage;
            scene.EventManager.OnClientLogin += EventManager_OnClientLogin;
            scene.EventManager.OnRegisterCaps += OnRegisterCaps;
            scene.EventManager.OnCachedUserInfo += UpdateCachedData;
            // The InstantMessageModule itself doesn't do this,
            // so lets see if things explode if we don't do it
            // scene.EventManager.OnClientClosed += OnClientClosed;
        }
开发者ID:BogusCurry,项目名称:WhiteCore-Dev,代码行数:44,代码来源:GroupsModule.cs


示例14: RegionLoaded

        public void RegionLoaded(Scene scene)
        {
            if (!m_groupMessagingEnabled)
                return;

            if (m_debugEnabled) m_log.DebugFormat("[Groups.Messaging]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);

            m_groupData = scene.RequestModuleInterface<IGroupsServicesConnector>();

            // No groups module, no groups messaging
            if (m_groupData == null)
            {
                m_log.Error("[Groups.Messaging]: Could not get IGroupsServicesConnector, GroupsMessagingModule is now disabled.");
                RemoveRegion(scene); 
                return;
            }

            m_msgTransferModule = scene.RequestModuleInterface<IMessageTransferModule>();

            // No message transfer module, no groups messaging
            if (m_msgTransferModule == null)
            {
                m_log.Error("[Groups.Messaging]: Could not get MessageTransferModule");
                RemoveRegion(scene);
                return;
            }

            if (m_presenceService == null)
                m_presenceService = scene.PresenceService;

        }
开发者ID:rryk,项目名称:omp-server,代码行数:31,代码来源:GroupsMessagingModule.cs


示例15: RegionLoaded

        public void RegionLoaded(Scene scene)
        {
            if (!m_Enabled)
                return;
            m_TransferModule = m_scenes[0].RequestModuleInterface<IMessageTransferModule>();

            if (m_TransferModule == null)
                m_log.Error("[INSTANT MESSAGE]: No message transfer module, " +
                            "lures will not work!");
        }
开发者ID:kow,项目名称:Aurora-Sim,代码行数:10,代码来源:LureModule.cs


示例16: RegionLoaded

        public void RegionLoaded(Scene scene)
        {
            if (!m_groupMessagingEnabled)
                return;

            if (m_debugEnabled) m_log.DebugFormat("[GROUPS-MESSAGING]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);

            m_groupData = scene.RequestModuleInterface<IGroupsServicesConnector>();

            // No groups module, no groups messaging
            if (m_groupData == null)
            {
                m_log.Error("[GROUPS-MESSAGING]: Could not get IGroupsServicesConnector, GroupsMessagingModule is now disabled.");
                Close();
                m_groupMessagingEnabled = false;
                return;
            }

            m_msgTransferModule = scene.RequestModuleInterface<IMessageTransferModule>();

            // No message transfer module, no groups messaging
            if (m_msgTransferModule == null)
            {
                m_log.Error("[GROUPS-MESSAGING]: Could not get MessageTransferModule");
                Close();
                m_groupMessagingEnabled = false;
                return;
            }

            if (m_presenceService == null)
                m_presenceService = scene.PresenceService;

            m_sceneList.Add(scene);

            scene.EventManager.OnNewClient += OnNewClient;
            scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage;
            scene.EventManager.OnClientLogin += OnClientLogin;
        }
开发者ID:JamesStallings,项目名称:opensimulator,代码行数:38,代码来源:GroupsMessagingModule.cs


示例17: RegionLoaded

        public void RegionLoaded(Scene scene)
        {
            if (m_TransferModule == null)
            {
                m_TransferModule = m_Scenelist[0].RequestModuleInterface<IMessageTransferModule>();
                if (m_TransferModule == null)
                {
                    m_log.Error("[INVENTORY TRANSFER]: No Message transfer module found, transfers will be local only");
                    m_Enabled = false;

                    m_Scenelist.Clear();
                    scene.EventManager.OnNewClient -= OnNewClient;
                    scene.EventManager.OnClosingClient -= OnClosingClient;
                    scene.EventManager.OnClientClosed -= ClientLoggedOut;
                    scene.EventManager.OnIncomingInstantMessage -= OnGridInstantMessage;
                }
            }
        }
开发者ID:RevolutionSmythe,项目名称:Aurora-Sim,代码行数:18,代码来源:InventoryTransferModule.cs


示例18: Initialize

        public void Initialize(
            IScriptEngine scriptEngine, SceneObjectPart host, TaskInventoryItem item, WaitHandle coopSleepHandle)
        {
            m_ScriptEngine = scriptEngine;
            m_host = host;
            m_item = item;
            m_coopSleepHandle = coopSleepHandle;

            LoadConfig();

            m_TransferModule =
                    m_ScriptEngine.World.RequestModuleInterface<IMessageTransferModule>();
            m_UrlModule = m_ScriptEngine.World.RequestModuleInterface<IUrlModule>();
            m_SoundModule = m_ScriptEngine.World.RequestModuleInterface<ISoundModule>();

            AsyncCommands = new AsyncCommandManager(m_ScriptEngine);
        }
开发者ID:Barosonix,项目名称:Barosonix-Core,代码行数:17,代码来源:LSL_Api.cs


示例19: RegionLoaded

        public void RegionLoaded(Scene scene)
        {
            if (!m_Enabled)
                return;

            if (m_UserManagement == null)
            {
                m_UserManagement = scene.RequestModuleInterface<IUserManagement>();
                m_OfflineIM = scene.RequestModuleInterface<IOfflineIMService>();
                m_Messaging = scene.RequestModuleInterface<IMessageTransferModule>();
                m_ForeignImporter = new ForeignImporter(m_UserManagement);

                if (m_ServiceLocation.Equals("local"))
                {
                    m_LocalGroupsConnector = new GroupsServiceLocalConnectorModule(m_Config, m_UserManagement);
                    // Also, if local, create the endpoint for the HGGroupsService
                    new HGGroupsServiceRobustConnector(m_Config, MainServer.Instance, string.Empty, 
                        scene.RequestModuleInterface<IOfflineIMService>(), scene.RequestModuleInterface<IUserAccountService>());

                }
                else
                    m_LocalGroupsConnector = new GroupsServiceRemoteConnectorModule(m_Config, m_UserManagement);

                m_CacheWrapper = new RemoteConnectorCacheWrapper(m_UserManagement);
            }

        }
开发者ID:BogusCurry,项目名称:arribasim-dev,代码行数:27,代码来源:GroupsServiceHGConnectorModule.cs


示例20: RegionLoaded

        public void RegionLoaded(Scene scene)
        {
            if (!m_Enabled)
                return;

            if (m_TransferModule == null)
            {
                m_TransferModule = scene.RequestModuleInterface<IMessageTransferModule>();
                if (m_TransferModule == null)
                {
                    scene.EventManager.OnNewClient -= OnNewClient;

                    m_SceneList.Clear();

                    m_log.Error("[OfflineIM.V2]: No message transfer module is enabled. Disabling offline messages");
                }
                m_TransferModule.OnUndeliveredMessage += UndeliveredMessage;
            }
        }
开发者ID:AkiraSonoda,项目名称:akisim,代码行数:19,代码来源:OfflineIMRegionModule.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# IMessenger类代码示例发布时间:2022-05-24
下一篇:
C# IMessageSink类代码示例发布时间: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