1 //----------------------------------------------------------------------
3 // Copyright (c) Microsoft Corporation.
4 // All rights reserved.
6 // This code is licensed under the MIT License.
8 // Permission is hereby granted, free of charge, to any person obtaining a copy
9 // of this software and associated documentation files(the "Software"), to deal
10 // in the Software without restriction, including without limitation the rights
11 // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
12 // copies of the Software, and to permit persons to whom the Software is
13 // furnished to do so, subject to the following conditions :
15 // The above copyright notice and this permission notice shall be included in
16 // all copies or substantial portions of the Software.
18 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE
21 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
26 //------------------------------------------------------------------------------
28 using System.ComponentModel;
30 namespace Microsoft.IdentityModel.Clients.ActiveDirectory.Internal
35 public class WebBrowserNavigateErrorEventArgs : CancelEventArgs
38 private readonly string targetFrameName;
39 private readonly string url;
40 private readonly int statusCode;
41 private readonly object webBrowserActiveXInstance;
46 /// <param name="url"></param>
47 /// <param name="targetFrameName"></param>
48 /// <param name="statusCode"></param>
49 /// <param name="webBrowserActiveXInstance"></param>
50 public WebBrowserNavigateErrorEventArgs(string url, string targetFrameName, int statusCode, object webBrowserActiveXInstance)
53 this.targetFrameName = targetFrameName;
54 this.statusCode = statusCode;
55 this.webBrowserActiveXInstance = webBrowserActiveXInstance;
61 public string TargetFrameName
65 return this.targetFrameName;
70 /// url as a string, as in case of error it could be invalid url
81 /// ADAL.Native has code for interpretation of this code to string we don't do it here, as we need to come consideration should we do it or not.
87 return this.statusCode;
94 public object WebBrowserActiveXInstance
98 return this.webBrowserActiveXInstance;