TeamMentor.CoreLib.TM_WebServices.getGuidForMapping C# (CSharp) Method

getGuidForMapping() private method

private getGuidForMapping ( string mapping ) : Guid
mapping string
return Guid
        public Guid getGuidForMapping(string mapping)
        {
            return TM_Xml_Database.Current.xmlBD_resolveMappingToArticleGuid(mapping);
        }

Usage Example

Example #1
0
        //handlers
        public void handleAction_JsonP(string data)
        {
            var guid = tmWebServices.getGuidForMapping(data);

            if (guid != Guid.Empty)
            {
                var article = tmWebServices.GetGuidanceItemById(guid);

                var serializedData = article.javascript_Serialize();
                var callbackRaw    = context.Request["callback"];
                if (callbackRaw.valid())
                {
                    var callbackFunction = Encoder.JavaScriptEncode(callbackRaw, false);
                    context.Response.Write("{0}({1})".format(callbackFunction, serializedData));
                }
                else
                {
                    context.Response.Write(serializedData);
                }
                endResponse();
            }
        }
TM_WebServices