コード例 #1
0
        byte[] GetAbuseReport(Dictionary <string, object> request)
        {
            string xmlString = WebUtils.BuildXmlResponse(
                m_AbuseReportsService.GetAbuseReport(int.Parse(request["Number"].ToString()), request["Password"].ToString()).ToKeyValuePairs());
            //m_log.DebugFormat("[FRIENDS HANDLER]: resp string: {0}", xmlString);
            UTF8Encoding encoding = new UTF8Encoding();

            return(encoding.GetBytes(xmlString));
        }
コード例 #2
0
        byte[] AbuseReportSaveNotes(OSDMap map)
        {
            OSDMap        resp = new OSDMap();
            IAbuseReports ar   = m_registry.RequestModuleInterface <IAbuseReports>();
            AbuseReport   tar  = ar.GetAbuseReport(map["Number"].AsInteger(), map["WebPassword"].AsString());

            tar.Notes = map["Notes"].ToString();
            ar.UpdateAbuseReport(tar, map["WebPassword"].AsString());
            resp["Finished"] = OSD.FromBoolean(true);
            string       xmlString = OSDParser.SerializeJsonString(resp);
            UTF8Encoding encoding  = new UTF8Encoding();

            return(encoding.GetBytes(xmlString));
        }