OMEconomy.OMBase.CommunicationHelpers.DoRequestDictionary C# (CSharp) Method

DoRequestDictionary() public method

public DoRequestDictionary ( string>.Dictionary postParameters ) : string>.Dictionary
postParameters string>.Dictionary
return string>.Dictionary
        public Dictionary<string, string> DoRequestDictionary(Dictionary<string, string> postParameters)
        {
            string str = DoRequestPlain(postParameters);
            if(str != null && str.Length == 0) {
                return new Dictionary<string, string>();
            }
            return str != null ? JsonMapper.ToObject<Dictionary<string, string>> (str) : null;
        }

Usage Example

Ejemplo n.º 1
0
        public void RemoveRegion(Scene scene)
        {
            m_log.Debug("Close Region");
            if (!Enabled)
            {
                return;
            }

            scene.EventManager.OnMakeRootAgent -= OnMakeRootAgent;
            scene.EventManager.OnClientClosed  -= OnClientClosed;

            List <string> regions = new List <string>();

            regions.Add(scene.RegionInfo.originRegionID.ToString());

            //List<string> regions = m_sceneHandler.GetUniqueRegions().ConvertAll<string>(UUIDToString);
            System.Threading.ThreadPool.QueueUserWorkItem(delegate {
                Dictionary <string, string> d = new Dictionary <string, string>();

                d.Add("method", "closeRegion");
                d.Add("regions", JsonMapper.ToJson(regions));
                m_communication.DoRequestDictionary(d);
            }, null);
        }