ConsoleMessageEventArgs.cs 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /**
  2. * Copyright (c) 2021 Vuplex Inc. All rights reserved.
  3. *
  4. * Licensed under the Vuplex Commercial Software Library License, you may
  5. * not use this file except in compliance with the License. You may obtain
  6. * a copy of the License at
  7. *
  8. * https://vuplex.com/commercial-library-license
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. using System;
  17. namespace Vuplex.WebView {
  18. /// <summary>
  19. /// Event args for `ConsoleMessageLogged`.
  20. /// </summary>
  21. public class ConsoleMessageEventArgs : EventArgs {
  22. public ConsoleMessageEventArgs(ConsoleMessageLevel level, string message, string source, int line) {
  23. Level = level;
  24. Message = message;
  25. Source = source;
  26. Line = line;
  27. }
  28. /// <summary>
  29. /// The message's log level.
  30. /// </summary>
  31. public readonly ConsoleMessageLevel Level;
  32. /// <summary>
  33. /// The message logged to the JavaScript console.
  34. /// </summary>
  35. public readonly string Message;
  36. /// <summary>
  37. /// The name of the file from which the message was logged,
  38. /// or `null` if the source is unknown.
  39. /// </summary>
  40. public readonly string Source;
  41. /// <summary>
  42. /// The line number of the file from which the message was logged,
  43. /// or `0` if the source is unknown.
  44. /// </summary>
  45. public readonly int Line;
  46. }
  47. }