private void EndMethod(ProfilerToken token, MessageResult result)
 {
     if (result == null)
     {
         EndMethod(token, "");
     }
     else
     {
         EndMethod(token, "Type = {0}, Text = {1}, FailedIds = {2}", result.Type, result.Text, result.FailedIds == null ? "" : string.Join(",", result.FailedIds));
     }
 }
Example #2
0
        protected ProfilerToken CallMethod(string name, string format, params object[] args)
        {
            var token = new ProfilerToken()
            {
                Service = Service, Method = name
            };

            token.AddParameters(format, args);
            token.Timer.Start();
            Logger.Info("Call: " + token.FullName + " " + token.Parameters);
            return(token);
        }
Example #3
0
 private void EndMethod(ProfilerToken token, ProductDefinition definition)
 {
     EndMethod(token, "ProductDefinition = {0}", definition.ProdictTypeId);
 }
Example #4
0
 private void EndMethod(ProfilerToken token, Article result)
 {
     EndMethod(token, "Id = {0}, ContentId = {1}", result.Id, result.ContentId);
 }
Example #5
0
 protected void EndMethod(ProfilerToken token, Dictionary <int, Dictionary <int, List <int> > > result)
 {
     EndMethod(token, "Dictionary");
 }
Example #6
0
 protected void EndMethod(ProfilerToken token, string[] result)
 {
     EndMethod(token, "[" + string.Join("], [", result) + "]");
 }
Example #7
0
 protected void EndMethod(ProfilerToken token)
 {
     EndMethod(token, "");
 }
Example #8
0
 protected void EndMethod(ProfilerToken token, string format, params object[] args)
 {
     token.Timer.Stop();
     token.AddResult(format, args);
     Logger.Info("End: {0} Time:{1:s\\.fff} {2}", token.FullName, token.Timer.Elapsed, token.Result);
 }