LoadFailedEventArgs.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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. namespace Vuplex.WebView {
  15. /// <summary>
  16. /// Event args for IWebView.LoadFailed.
  17. /// </summary>
  18. public class LoadFailedEventArgs : System.EventArgs {
  19. /// <summary>
  20. /// A platform-specific error code indicating why the load failed.
  21. /// </summary>
  22. public readonly string NativeErrorCode;
  23. /// <summary>
  24. /// The URL for which the load failed.
  25. /// </summary>
  26. public readonly string Url;
  27. public LoadFailedEventArgs(string nativeErrorCode, string url) {
  28. NativeErrorCode = nativeErrorCode;
  29. Url = url;
  30. }
  31. public override string ToString() => $"NativeErrorCode = {NativeErrorCode}, Url = {Url}";
  32. }
  33. }