ConsoleMessageEventArgs.cs 1.7 KB

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