LogInfo.cs 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. // **********************************************************************************
  2. // CassiniDev - http://cassinidev.codeplex.com
  3. //
  4. // Copyright (c) 2010 Sky Sanders. All rights reserved.
  5. //
  6. // This source code is subject to terms and conditions of the Microsoft Public
  7. // License (Ms-PL). A copy of the license can be found in the license.txt file
  8. // included in this distribution.
  9. //
  10. // You must not remove this notice, or any other, from this software.
  11. //
  12. // **********************************************************************************
  13. #region
  14. using System;
  15. #endregion
  16. namespace CassiniDev.ServerLog
  17. {
  18. /// <summary>
  19. /// TODO: get rid of status code and url in the database and simply parse the headers
  20. /// </summary>
  21. [Serializable]
  22. public class LogInfo : ICloneable
  23. {
  24. public byte[] Body { get; set; }
  25. public Guid ConversationId { get; set; }
  26. public DateTime Created { get; set; }
  27. public string Exception { get; set; }
  28. public string Headers { get; set; }
  29. public string Identity { get; set; }
  30. public string PathTranslated { get; set; }
  31. public string PhysicalPath { get; set; }
  32. public long RowId { get; set; }
  33. public long RowType { get; set; }
  34. public long? StatusCode { get; set; }
  35. public string Url { get; set; }
  36. #region ICloneable Members
  37. object ICloneable.Clone()
  38. {
  39. return MemberwiseClone();
  40. }
  41. #endregion
  42. public LogInfo Clone()
  43. {
  44. LogInfo result = (LogInfo) ((ICloneable) this).Clone();
  45. if (Body != null)
  46. {
  47. result.Body = new byte[Body.Length];
  48. Body.CopyTo(result.Body, 0);
  49. }
  50. return result;
  51. }
  52. }
  53. }