diff --git a/CefSharp/CefSharp.csproj b/CefSharp/CefSharp.csproj index 6cceb92a7..6b0162bc2 100644 --- a/CefSharp/CefSharp.csproj +++ b/CefSharp/CefSharp.csproj @@ -88,7 +88,6 @@ - @@ -97,8 +96,10 @@ + + diff --git a/CefSharp/DevTools/DevToolsClient.Generated.cs b/CefSharp/DevTools/DevToolsClient.Generated.cs index a597517ab..df5c0c549 100644 --- a/CefSharp/DevTools/DevToolsClient.Generated.cs +++ b/CefSharp/DevTools/DevToolsClient.Generated.cs @@ -3,7 +3,7 @@ // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. // // **This code was generated by a tool, do not change directly** -// CHROMIUM VERSION 92.0.4515.131 +// CHROMIUM VERSION 92.0.4515.159 namespace CefSharp.DevTools.Accessibility { /// @@ -193,6 +193,9 @@ namespace CefSharp.DevTools.Accessibility [System.Runtime.Serialization.DataContractAttribute] public class AXValueSource : CefSharp.DevTools.DevToolsDomainEntityBase { + /// + /// What type of source this is. + /// public CefSharp.DevTools.Accessibility.AXValueSourceType Type { get @@ -256,6 +259,9 @@ namespace CefSharp.DevTools.Accessibility set; } + /// + /// The native markup source for this value, e.g. a <label> element. + /// public CefSharp.DevTools.Accessibility.AXValueNativeSourceType? NativeSource { get @@ -353,6 +359,9 @@ namespace CefSharp.DevTools.Accessibility [System.Runtime.Serialization.DataContractAttribute] public class AXProperty : CefSharp.DevTools.DevToolsDomainEntityBase { + /// + /// The name of this property. + /// public CefSharp.DevTools.Accessibility.AXPropertyName Name { get @@ -393,6 +402,9 @@ namespace CefSharp.DevTools.Accessibility [System.Runtime.Serialization.DataContractAttribute] public class AXValue : CefSharp.DevTools.DevToolsDomainEntityBase { + /// + /// The type of this value. + /// public CefSharp.DevTools.Accessibility.AXValueType Type { get @@ -862,6 +874,9 @@ namespace CefSharp.DevTools.Animation set; } + /// + /// Animation type of `Animation`. + /// public CefSharp.DevTools.Animation.AnimationType Type { get @@ -1500,6 +1515,9 @@ namespace CefSharp.DevTools.Audits set; } + /// + /// CookieWarningReasons + /// public CefSharp.DevTools.Audits.SameSiteCookieWarningReason[] CookieWarningReasons { get @@ -1523,6 +1541,9 @@ namespace CefSharp.DevTools.Audits set; } + /// + /// CookieExclusionReasons + /// public CefSharp.DevTools.Audits.SameSiteCookieExclusionReason[] CookieExclusionReasons { get @@ -1546,6 +1567,10 @@ namespace CefSharp.DevTools.Audits set; } + /// + /// Optionally identifies the site-for-cookies and the cookie url, which + /// may be used by the front-end as additional context. + /// public CefSharp.DevTools.Audits.SameSiteCookieOperation Operation { get @@ -1766,6 +1791,12 @@ namespace CefSharp.DevTools.Audits [System.Runtime.Serialization.DataContractAttribute] public class MixedContentIssueDetails : CefSharp.DevTools.DevToolsDomainEntityBase { + /// + /// The type of resource causing the mixed content issue (css, js, iframe, + /// form,...). Marked as optional because it is mapped to from + /// blink::mojom::RequestContextType, which will be replaced + /// by network::mojom::RequestDestination + /// public CefSharp.DevTools.Audits.MixedContentResourceType? ResourceType { get @@ -1792,6 +1823,9 @@ namespace CefSharp.DevTools.Audits set; } + /// + /// The way the mixed content issue is being resolved. + /// public CefSharp.DevTools.Audits.MixedContentResolutionStatus ResolutionStatus { get @@ -1928,6 +1962,9 @@ namespace CefSharp.DevTools.Audits set; } + /// + /// Reason + /// public CefSharp.DevTools.Audits.BlockedByResponseReason Reason { get @@ -1997,6 +2034,9 @@ namespace CefSharp.DevTools.Audits [System.Runtime.Serialization.DataContractAttribute] public class HeavyAdIssueDetails : CefSharp.DevTools.DevToolsDomainEntityBase { + /// + /// The resolution status, either blocking the content or warning. + /// public CefSharp.DevTools.Audits.HeavyAdResolutionStatus Resolution { get @@ -2020,6 +2060,9 @@ namespace CefSharp.DevTools.Audits set; } + /// + /// The reason the ad was blocked, total network or cpu or peak cpu. + /// public CefSharp.DevTools.Audits.HeavyAdReason Reason { get @@ -2169,6 +2212,9 @@ namespace CefSharp.DevTools.Audits set; } + /// + /// ContentSecurityPolicyViolationType + /// public CefSharp.DevTools.Audits.ContentSecurityPolicyViolationType ContentSecurityPolicyViolationType { get @@ -2267,6 +2313,9 @@ namespace CefSharp.DevTools.Audits set; } + /// + /// Type + /// public CefSharp.DevTools.Audits.SharedArrayBufferIssueType Type { get @@ -2329,6 +2378,9 @@ namespace CefSharp.DevTools.Audits set; } + /// + /// ViolationType + /// public CefSharp.DevTools.Audits.TwaQualityEnforcementViolationType ViolationType { get @@ -2519,6 +2571,9 @@ namespace CefSharp.DevTools.Audits set; } + /// + /// ResourceIPAddressSpace + /// public CefSharp.DevTools.Network.IPAddressSpace? ResourceIPAddressSpace { get @@ -2592,6 +2647,9 @@ namespace CefSharp.DevTools.Audits [System.Runtime.Serialization.DataContractAttribute] public class AttributionReportingIssueDetails : CefSharp.DevTools.DevToolsDomainEntityBase { + /// + /// ViolationType + /// public CefSharp.DevTools.Audits.AttributionReportingIssueType ViolationType { get @@ -2946,6 +3004,9 @@ namespace CefSharp.DevTools.Audits [System.Runtime.Serialization.DataContractAttribute] public class InspectorIssue : CefSharp.DevTools.DevToolsDomainEntityBase { + /// + /// Code + /// public CefSharp.DevTools.Audits.InspectorIssueCode Code { get @@ -3102,6 +3163,9 @@ namespace CefSharp.DevTools.BackgroundService set; } + /// + /// The Background Service this event belongs to. + /// public CefSharp.DevTools.BackgroundService.ServiceName Service { get @@ -3172,6 +3236,9 @@ namespace CefSharp.DevTools.BackgroundService private set; } + /// + /// Service + /// public CefSharp.DevTools.BackgroundService.ServiceName Service { get @@ -3290,6 +3357,9 @@ namespace CefSharp.DevTools.Browser set; } + /// + /// The window state. Default to normal. + /// public CefSharp.DevTools.Browser.WindowState? WindowState { get @@ -3724,6 +3794,9 @@ namespace CefSharp.DevTools.Browser private set; } + /// + /// Download status. + /// public CefSharp.DevTools.Browser.DownloadProgressState State { get @@ -3786,6 +3859,9 @@ namespace CefSharp.DevTools.CSS [System.Runtime.Serialization.DataContractAttribute] public class PseudoElementMatches : CefSharp.DevTools.DevToolsDomainEntityBase { + /// + /// Pseudo element type. + /// public CefSharp.DevTools.DOM.PseudoType PseudoType { get @@ -3974,6 +4050,9 @@ namespace CefSharp.DevTools.CSS set; } + /// + /// Stylesheet origin. + /// public CefSharp.DevTools.CSS.StyleSheetOrigin Origin { get @@ -4149,6 +4228,9 @@ namespace CefSharp.DevTools.CSS set; } + /// + /// Parent stylesheet's origin. + /// public CefSharp.DevTools.CSS.StyleSheetOrigin Origin { get @@ -4544,6 +4626,12 @@ namespace CefSharp.DevTools.CSS set; } + /// + /// Source of the media query: "mediaRule" if specified by a @media rule, "importRule" if + /// specified by an @import rule, "linkedSheet" if specified by a "media" attribute in a linked + /// stylesheet's LINK tag, "inlineSheet" if specified by a "media" attribute in an inline + /// stylesheet's STYLE tag. + /// public CefSharp.DevTools.CSS.CSSMediaSource Source { get @@ -4932,6 +5020,9 @@ namespace CefSharp.DevTools.CSS set; } + /// + /// Parent stylesheet's origin. + /// public CefSharp.DevTools.CSS.StyleSheetOrigin Origin { get @@ -5188,6 +5279,9 @@ namespace CefSharp.DevTools.CacheStorage set; } + /// + /// HTTP response type + /// public CefSharp.DevTools.CacheStorage.CachedResponseType ResponseType { get @@ -5755,6 +5849,9 @@ namespace CefSharp.DevTools.DOM set; } + /// + /// Pseudo element type for this node. + /// public CefSharp.DevTools.DOM.PseudoType? PseudoType { get @@ -5778,6 +5875,9 @@ namespace CefSharp.DevTools.DOM set; } + /// + /// Shadow root type. + /// public CefSharp.DevTools.DOM.ShadowRootType? ShadowRootType { get @@ -5883,6 +5983,9 @@ namespace CefSharp.DevTools.DOM set; } + /// + /// CompatibilityMode + /// public CefSharp.DevTools.DOM.CompatibilityMode? CompatibilityMode { get @@ -6866,6 +6969,9 @@ namespace CefSharp.DevTools.DOMSnapshot set; } + /// + /// Type of a pseudo element node. + /// public CefSharp.DevTools.DOM.PseudoType? PseudoType { get @@ -6889,6 +6995,9 @@ namespace CefSharp.DevTools.DOMSnapshot set; } + /// + /// Shadow root type. + /// public CefSharp.DevTools.DOM.ShadowRootType? ShadowRootType { get @@ -7982,6 +8091,9 @@ namespace CefSharp.DevTools.Emulation [System.Runtime.Serialization.DataContractAttribute] public class ScreenOrientation : CefSharp.DevTools.DevToolsDomainEntityBase { + /// + /// Orientation type. + /// public CefSharp.DevTools.Emulation.ScreenOrientationType Type { get @@ -8039,6 +8151,9 @@ namespace CefSharp.DevTools.Emulation [System.Runtime.Serialization.DataContractAttribute] public class DisplayFeature : CefSharp.DevTools.DevToolsDomainEntityBase { + /// + /// Orientation of a display feature in relation to screen + /// public CefSharp.DevTools.Emulation.DisplayFeatureOrientation Orientation { get @@ -8291,6 +8406,9 @@ namespace CefSharp.DevTools.HeadlessExperimental [System.Runtime.Serialization.DataContractAttribute] public class ScreenshotParams : CefSharp.DevTools.DevToolsDomainEntityBase { + /// + /// Image compression format (defaults to png). + /// public CefSharp.DevTools.HeadlessExperimental.ScreenshotParamsFormat? Format { get @@ -8512,6 +8630,9 @@ namespace CefSharp.DevTools.IndexedDB [System.Runtime.Serialization.DataContractAttribute] public class Key : CefSharp.DevTools.DevToolsDomainEntityBase { + /// + /// Key type. + /// public CefSharp.DevTools.IndexedDB.KeyType Type { get @@ -8688,6 +8809,9 @@ namespace CefSharp.DevTools.IndexedDB [System.Runtime.Serialization.DataContractAttribute] public class KeyPath : CefSharp.DevTools.DevToolsDomainEntityBase { + /// + /// Key path type. + /// public CefSharp.DevTools.IndexedDB.KeyPathType Type { get @@ -9067,6 +9191,9 @@ namespace CefSharp.DevTools.LayerTree set; } + /// + /// Reason for rectangle to force scrolling on the main thread + /// public CefSharp.DevTools.LayerTree.ScrollRectType Type { get @@ -9495,6 +9622,9 @@ namespace CefSharp.DevTools.Log [System.Runtime.Serialization.DataContractAttribute] public class LogEntry : CefSharp.DevTools.DevToolsDomainEntityBase { + /// + /// Log entry source. + /// public CefSharp.DevTools.Log.LogEntrySource Source { get @@ -9518,6 +9648,9 @@ namespace CefSharp.DevTools.Log set; } + /// + /// Log entry severity. + /// public CefSharp.DevTools.Log.LogEntryLevel Level { get @@ -9670,6 +9803,9 @@ namespace CefSharp.DevTools.Log [System.Runtime.Serialization.DataContractAttribute] public class ViolationSetting : CefSharp.DevTools.DevToolsDomainEntityBase { + /// + /// Violation type. + /// public CefSharp.DevTools.Log.ViolationSettingName Name { get @@ -10507,6 +10643,9 @@ namespace CefSharp.DevTools.Network set; } + /// + /// The mixed content type of the request. + /// public CefSharp.DevTools.Security.MixedContentType? MixedContentType { get @@ -10530,6 +10669,9 @@ namespace CefSharp.DevTools.Network set; } + /// + /// Priority of the resource request at the time request is sent. + /// public CefSharp.DevTools.Network.ResourcePriority InitialPriority { get @@ -10553,6 +10695,9 @@ namespace CefSharp.DevTools.Network set; } + /// + /// The referrer policy of the request, as defined in https://www.w3.org/TR/referrer-policy/ + /// public CefSharp.DevTools.Network.RequestReferrerPolicy ReferrerPolicy { get @@ -10811,6 +10956,9 @@ namespace CefSharp.DevTools.Network set; } + /// + /// Whether the request complied with Certificate Transparency policy + /// public CefSharp.DevTools.Network.CertificateTransparencyCompliance CertificateTransparencyCompliance { get @@ -11067,6 +11215,9 @@ namespace CefSharp.DevTools.Network [System.Runtime.Serialization.DataContractAttribute] public class CorsErrorStatus : CefSharp.DevTools.DevToolsDomainEntityBase { + /// + /// CorsError + /// public CefSharp.DevTools.Network.CorsError CorsError { get @@ -11154,6 +11305,9 @@ namespace CefSharp.DevTools.Network [System.Runtime.Serialization.DataContractAttribute] public class TrustTokenParams : CefSharp.DevTools.DevToolsDomainEntityBase { + /// + /// Type + /// public CefSharp.DevTools.Network.TrustTokenOperationType Type { get @@ -11177,6 +11331,10 @@ namespace CefSharp.DevTools.Network set; } + /// + /// Only set for "token-redemption" type and determine whether + /// to request a fresh SRR or use a still valid cached SRR. + /// public CefSharp.DevTools.Network.TrustTokenParamsRefreshPolicy RefreshPolicy { get @@ -11411,6 +11569,9 @@ namespace CefSharp.DevTools.Network set; } + /// + /// Response source of response from ServiceWorker. + /// public CefSharp.DevTools.Network.ServiceWorkerResponseSource? ServiceWorkerResponseSource { get @@ -11464,6 +11625,9 @@ namespace CefSharp.DevTools.Network set; } + /// + /// Security state of the request resource. + /// public CefSharp.DevTools.Security.SecurityState SecurityState { get @@ -11637,6 +11801,9 @@ namespace CefSharp.DevTools.Network set; } + /// + /// Type of this resource. + /// public CefSharp.DevTools.Network.ResourceType Type { get @@ -11724,6 +11891,9 @@ namespace CefSharp.DevTools.Network [System.Runtime.Serialization.DataContractAttribute] public class Initiator : CefSharp.DevTools.DevToolsDomainEntityBase { + /// + /// Type of this initiator. + /// public CefSharp.DevTools.Network.InitiatorType Type { get @@ -11896,6 +12066,9 @@ namespace CefSharp.DevTools.Network set; } + /// + /// Cookie SameSite type. + /// public CefSharp.DevTools.Network.CookieSameSite? SameSite { get @@ -11919,6 +12092,9 @@ namespace CefSharp.DevTools.Network set; } + /// + /// Cookie Priority + /// public CefSharp.DevTools.Network.CookiePriority Priority { get @@ -11952,6 +12128,9 @@ namespace CefSharp.DevTools.Network set; } + /// + /// Cookie source scheme type. + /// public CefSharp.DevTools.Network.CookieSourceScheme SourceScheme { get @@ -12158,6 +12337,9 @@ namespace CefSharp.DevTools.Network [System.Runtime.Serialization.DataContractAttribute] public class BlockedSetCookieWithReason : CefSharp.DevTools.DevToolsDomainEntityBase { + /// + /// The reason(s) this cookie was blocked. + /// public CefSharp.DevTools.Network.SetCookieBlockedReason[] BlockedReasons { get @@ -12211,6 +12393,9 @@ namespace CefSharp.DevTools.Network [System.Runtime.Serialization.DataContractAttribute] public class BlockedCookieWithReason : CefSharp.DevTools.DevToolsDomainEntityBase { + /// + /// The reason(s) the cookie was blocked. + /// public CefSharp.DevTools.Network.CookieBlockedReason[] BlockedReasons { get @@ -12322,6 +12507,9 @@ namespace CefSharp.DevTools.Network set; } + /// + /// Cookie SameSite type. + /// public CefSharp.DevTools.Network.CookieSameSite? SameSite { get @@ -12355,6 +12543,9 @@ namespace CefSharp.DevTools.Network set; } + /// + /// Cookie Priority. + /// public CefSharp.DevTools.Network.CookiePriority? Priority { get @@ -12388,6 +12579,9 @@ namespace CefSharp.DevTools.Network set; } + /// + /// Cookie source scheme type. + /// public CefSharp.DevTools.Network.CookieSourceScheme? SourceScheme { get @@ -12447,6 +12641,9 @@ namespace CefSharp.DevTools.Network [System.Runtime.Serialization.DataContractAttribute] public class AuthChallenge : CefSharp.DevTools.DevToolsDomainEntityBase { + /// + /// Source of the authentication challenge. + /// public CefSharp.DevTools.Network.AuthChallengeSource? Source { get @@ -12531,6 +12728,11 @@ namespace CefSharp.DevTools.Network [System.Runtime.Serialization.DataContractAttribute] public class AuthChallengeResponse : CefSharp.DevTools.DevToolsDomainEntityBase { + /// + /// The decision on what to do in response to the authorization challenge. Default means + /// deferring to the default behavior of the net stack, which will likely either the Cancel + /// authentication or display a popup dialog box. + /// public CefSharp.DevTools.Network.AuthChallengeResponseResponse Response { get @@ -12614,6 +12816,9 @@ namespace CefSharp.DevTools.Network set; } + /// + /// If set, only requests for matching resource types will be intercepted. + /// public CefSharp.DevTools.Network.ResourceType? ResourceType { get @@ -12637,6 +12842,9 @@ namespace CefSharp.DevTools.Network set; } + /// + /// Stage at which to begin intercepting requests. Default is Request. + /// public CefSharp.DevTools.Network.InterceptionStage? InterceptionStage { get @@ -12880,6 +13088,9 @@ namespace CefSharp.DevTools.Network set; } + /// + /// The field which caused the error. + /// public CefSharp.DevTools.Network.SignedExchangeErrorField? ErrorField { get @@ -13038,6 +13249,9 @@ namespace CefSharp.DevTools.Network set; } + /// + /// InitiatorIPAddressSpace + /// public CefSharp.DevTools.Network.IPAddressSpace InitiatorIPAddressSpace { get @@ -13061,6 +13275,9 @@ namespace CefSharp.DevTools.Network set; } + /// + /// PrivateNetworkRequestPolicy + /// public CefSharp.DevTools.Network.PrivateNetworkRequestPolicy PrivateNetworkRequestPolicy { get @@ -13118,6 +13335,9 @@ namespace CefSharp.DevTools.Network [System.Runtime.Serialization.DataContractAttribute] public class CrossOriginOpenerPolicyStatus : CefSharp.DevTools.DevToolsDomainEntityBase { + /// + /// Value + /// public CefSharp.DevTools.Network.CrossOriginOpenerPolicyValue Value { get @@ -13141,6 +13361,9 @@ namespace CefSharp.DevTools.Network set; } + /// + /// ReportOnlyValue + /// public CefSharp.DevTools.Network.CrossOriginOpenerPolicyValue ReportOnlyValue { get @@ -13213,6 +13436,9 @@ namespace CefSharp.DevTools.Network [System.Runtime.Serialization.DataContractAttribute] public class CrossOriginEmbedderPolicyStatus : CefSharp.DevTools.DevToolsDomainEntityBase { + /// + /// Value + /// public CefSharp.DevTools.Network.CrossOriginEmbedderPolicyValue Value { get @@ -13236,6 +13462,9 @@ namespace CefSharp.DevTools.Network set; } + /// + /// ReportOnlyValue + /// public CefSharp.DevTools.Network.CrossOriginEmbedderPolicyValue ReportOnlyValue { get @@ -13532,6 +13761,9 @@ namespace CefSharp.DevTools.Network private set; } + /// + /// Resource type. + /// public CefSharp.DevTools.Network.ResourceType Type { get @@ -13575,6 +13807,9 @@ namespace CefSharp.DevTools.Network private set; } + /// + /// The reason why loading was blocked, if any. + /// public CefSharp.DevTools.Network.BlockedReason? BlockedReason { get @@ -13697,6 +13932,9 @@ namespace CefSharp.DevTools.Network private set; } + /// + /// How the requested resource will be used. + /// public CefSharp.DevTools.Network.ResourceType ResourceType { get @@ -13762,6 +14000,10 @@ namespace CefSharp.DevTools.Network private set; } + /// + /// Response error if intercepted at response stage or if redirect occurred while intercepting + /// request. + /// public CefSharp.DevTools.Network.ErrorReason? ResponseErrorReason { get @@ -13923,6 +14165,9 @@ namespace CefSharp.DevTools.Network private set; } + /// + /// Type of this resource. + /// public CefSharp.DevTools.Network.ResourceType? Type { get @@ -13983,6 +14228,9 @@ namespace CefSharp.DevTools.Network private set; } + /// + /// New priority + /// public CefSharp.DevTools.Network.ResourcePriority NewPriority { get @@ -14080,6 +14328,9 @@ namespace CefSharp.DevTools.Network private set; } + /// + /// Resource type. + /// public CefSharp.DevTools.Network.ResourceType Type { get @@ -14575,6 +14826,10 @@ namespace CefSharp.DevTools.Network private set; } + /// + /// The IP address space of the resource. The address space can only be determined once the transport + /// established the connection, so we can't send it in `requestWillBeSentExtraInfo`. + /// public CefSharp.DevTools.Network.IPAddressSpace ResourceIPAddressSpace { get @@ -14680,6 +14935,12 @@ namespace CefSharp.DevTools.Network [System.Runtime.Serialization.DataContractAttribute] public class TrustTokenOperationDoneEventArgs : CefSharp.DevTools.DevToolsDomainEventArgsBase { + /// + /// Detailed success or error status of the operation. + /// 'AlreadyExists' also signifies a successful operation, as the result + /// of the operation already exists und thus, the operation was abort + /// preemptively (e.g. a cache hit). + /// public CefSharp.DevTools.Network.TrustTokenOperationDoneStatus Status { get @@ -14706,6 +14967,9 @@ namespace CefSharp.DevTools.Network private set; } + /// + /// Type + /// public CefSharp.DevTools.Network.TrustTokenOperationType Type { get @@ -15164,6 +15428,9 @@ namespace CefSharp.DevTools.Overlay set; } + /// + /// The line pattern (default: solid) + /// public CefSharp.DevTools.Overlay.LineStylePattern? Pattern { get @@ -15373,6 +15640,9 @@ namespace CefSharp.DevTools.Overlay set; } + /// + /// The color format used to format color styles (default: hex). + /// public CefSharp.DevTools.Overlay.ColorFormat? ColorFormat { get @@ -15426,6 +15696,9 @@ namespace CefSharp.DevTools.Overlay set; } + /// + /// The contrast algorithm to use for the contrast ratio (default: aa). + /// public CefSharp.DevTools.Overlay.ContrastAlgorithm? ContrastAlgorithm { get @@ -16148,6 +16421,9 @@ namespace CefSharp.DevTools.Page set; } + /// + /// BlockReason + /// public CefSharp.DevTools.Page.PermissionsPolicyBlockReason BlockReason { get @@ -16178,6 +16454,9 @@ namespace CefSharp.DevTools.Page [System.Runtime.Serialization.DataContractAttribute] public class PermissionsPolicyFeatureState : CefSharp.DevTools.DevToolsDomainEntityBase { + /// + /// Feature + /// public CefSharp.DevTools.Page.PermissionsPolicyFeature Feature { get @@ -16385,6 +16664,9 @@ namespace CefSharp.DevTools.Page set; } + /// + /// UsageRestriction + /// public CefSharp.DevTools.Page.OriginTrialUsageRestriction UsageRestriction { get @@ -16436,6 +16718,9 @@ namespace CefSharp.DevTools.Page set; } + /// + /// Status + /// public CefSharp.DevTools.Page.OriginTrialTokenStatus Status { get @@ -16476,6 +16761,9 @@ namespace CefSharp.DevTools.Page set; } + /// + /// Status + /// public CefSharp.DevTools.Page.OriginTrialStatus Status { get @@ -16619,6 +16907,9 @@ namespace CefSharp.DevTools.Page set; } + /// + /// Indicates whether this frame was tagged as an ad. + /// public CefSharp.DevTools.Page.AdFrameType? AdFrameType { get @@ -16642,6 +16933,9 @@ namespace CefSharp.DevTools.Page set; } + /// + /// Indicates whether the main document is a secure context and explains why that is the case. + /// public CefSharp.DevTools.Page.SecureContextType SecureContextType { get @@ -16665,6 +16959,9 @@ namespace CefSharp.DevTools.Page set; } + /// + /// Indicates whether this is a cross origin isolated context. + /// public CefSharp.DevTools.Page.CrossOriginIsolatedContextType CrossOriginIsolatedContextType { get @@ -16688,6 +16985,9 @@ namespace CefSharp.DevTools.Page set; } + /// + /// Indicated which gated APIs / features are available. + /// public CefSharp.DevTools.Page.GatedAPIFeatures[] GatedAPIFeatures { get @@ -16738,6 +17038,9 @@ namespace CefSharp.DevTools.Page set; } + /// + /// Type of this resource. + /// public CefSharp.DevTools.Network.ResourceType Type { get @@ -16994,6 +17297,9 @@ namespace CefSharp.DevTools.Page set; } + /// + /// Transition type. + /// public CefSharp.DevTools.Page.TransitionType TransitionType { get @@ -17761,6 +18067,9 @@ namespace CefSharp.DevTools.Page private set; } + /// + /// Input mode. + /// public CefSharp.DevTools.Page.FileChooserOpenedMode Mode { get @@ -17872,6 +18181,9 @@ namespace CefSharp.DevTools.Page private set; } + /// + /// Reason + /// public CefSharp.DevTools.Page.FrameDetachedReason Reason { get @@ -17912,6 +18224,9 @@ namespace CefSharp.DevTools.Page private set; } + /// + /// Type + /// public CefSharp.DevTools.Page.NavigationType Type { get @@ -17970,6 +18285,9 @@ namespace CefSharp.DevTools.Page private set; } + /// + /// The reason for the navigation. + /// public CefSharp.DevTools.Page.ClientNavigationReason Reason { get @@ -18003,6 +18321,9 @@ namespace CefSharp.DevTools.Page private set; } + /// + /// The disposition for the navigation. + /// public CefSharp.DevTools.Page.ClientNavigationDisposition Disposition { get @@ -18054,6 +18375,9 @@ namespace CefSharp.DevTools.Page private set; } + /// + /// The reason for the navigation. + /// public CefSharp.DevTools.Page.ClientNavigationReason Reason { get @@ -18229,6 +18553,9 @@ namespace CefSharp.DevTools.Page private set; } + /// + /// Download status. + /// public CefSharp.DevTools.Page.DownloadProgressState State { get @@ -18308,6 +18635,9 @@ namespace CefSharp.DevTools.Page private set; } + /// + /// Dialog type. + /// public CefSharp.DevTools.Page.DialogType Type { get @@ -19184,6 +19514,9 @@ namespace CefSharp.DevTools.Security [System.Runtime.Serialization.DataContractAttribute] public class SafetyTipInfo : CefSharp.DevTools.DevToolsDomainEntityBase { + /// + /// Describes whether the page triggers any safety tips or reputation warnings. Default is unknown. + /// public CefSharp.DevTools.Security.SafetyTipStatus SafetyTipStatus { get @@ -19224,6 +19557,9 @@ namespace CefSharp.DevTools.Security [System.Runtime.Serialization.DataContractAttribute] public class VisibleSecurityState : CefSharp.DevTools.DevToolsDomainEntityBase { + /// + /// The security level of the page. + /// public CefSharp.DevTools.Security.SecurityState SecurityState { get @@ -19284,6 +19620,9 @@ namespace CefSharp.DevTools.Security [System.Runtime.Serialization.DataContractAttribute] public class SecurityStateExplanation : CefSharp.DevTools.DevToolsDomainEntityBase { + /// + /// Security state representing the severity of the factor being explained. + /// public CefSharp.DevTools.Security.SecurityState SecurityState { get @@ -19337,6 +19676,9 @@ namespace CefSharp.DevTools.Security set; } + /// + /// The type of mixed content described by the explanation. + /// public CefSharp.DevTools.Security.MixedContentType MixedContentType { get @@ -19437,6 +19779,9 @@ namespace CefSharp.DevTools.Security set; } + /// + /// Always set to unknown. + /// public CefSharp.DevTools.Security.SecurityState RanInsecureContentStyle { get @@ -19460,6 +19805,9 @@ namespace CefSharp.DevTools.Security set; } + /// + /// Always set to unknown. + /// public CefSharp.DevTools.Security.SecurityState DisplayedInsecureContentStyle { get @@ -19565,6 +19913,9 @@ namespace CefSharp.DevTools.Security [System.Runtime.Serialization.DataContractAttribute] public class SecurityStateChangedEventArgs : CefSharp.DevTools.DevToolsDomainEventArgsBase { + /// + /// Security state. + /// public CefSharp.DevTools.Security.SecurityState SecurityState { get @@ -19770,6 +20121,9 @@ namespace CefSharp.DevTools.ServiceWorker set; } + /// + /// RunningStatus + /// public CefSharp.DevTools.ServiceWorker.ServiceWorkerVersionRunningStatus RunningStatus { get @@ -19793,6 +20147,9 @@ namespace CefSharp.DevTools.ServiceWorker set; } + /// + /// Status + /// public CefSharp.DevTools.ServiceWorker.ServiceWorkerVersionStatus Status { get @@ -20047,6 +20404,9 @@ namespace CefSharp.DevTools.Storage [System.Runtime.Serialization.DataContractAttribute] public class UsageForType : CefSharp.DevTools.DevToolsDomainEntityBase { + /// + /// Name of storage type. + /// public CefSharp.DevTools.Storage.StorageType StorageType { get @@ -20463,6 +20823,9 @@ namespace CefSharp.DevTools.SystemInfo [System.Runtime.Serialization.DataContractAttribute] public class ImageDecodeAcceleratorCapability : CefSharp.DevTools.DevToolsDomainEntityBase { + /// + /// Image coded, e.g. Jpeg. + /// public CefSharp.DevTools.SystemInfo.ImageType ImageType { get @@ -20506,6 +20869,9 @@ namespace CefSharp.DevTools.SystemInfo set; } + /// + /// Optional array of supported subsampling formats, e.g. 4:2:0, if known. + /// public CefSharp.DevTools.SystemInfo.SubsamplingFormat[] Subsamplings { get @@ -21030,6 +21396,9 @@ namespace CefSharp.DevTools.Tracing [System.Runtime.Serialization.DataContractAttribute] public class TraceConfig : CefSharp.DevTools.DevToolsDomainEntityBase { + /// + /// Controls how the trace buffer stores data. + /// public CefSharp.DevTools.Tracing.TraceConfigRecordMode? RecordMode { get @@ -21294,6 +21663,9 @@ namespace CefSharp.DevTools.Tracing private set; } + /// + /// Trace data format of returned stream. + /// public CefSharp.DevTools.Tracing.StreamFormat? TraceFormat { get @@ -21317,6 +21689,9 @@ namespace CefSharp.DevTools.Tracing private set; } + /// + /// Compression format of returned stream. + /// public CefSharp.DevTools.Tracing.StreamCompression? StreamCompression { get @@ -21380,6 +21755,9 @@ namespace CefSharp.DevTools.Fetch set; } + /// + /// If set, only requests for matching resource types will be intercepted. + /// public CefSharp.DevTools.Network.ResourceType? ResourceType { get @@ -21403,6 +21781,9 @@ namespace CefSharp.DevTools.Fetch set; } + /// + /// Stage at which to begin intercepting requests. Default is Request. + /// public CefSharp.DevTools.Fetch.RequestStage? RequestStage { get @@ -21477,6 +21858,9 @@ namespace CefSharp.DevTools.Fetch [System.Runtime.Serialization.DataContractAttribute] public class AuthChallenge : CefSharp.DevTools.DevToolsDomainEntityBase { + /// + /// Source of the authentication challenge. + /// public CefSharp.DevTools.Fetch.AuthChallengeSource? Source { get @@ -21561,6 +21945,11 @@ namespace CefSharp.DevTools.Fetch [System.Runtime.Serialization.DataContractAttribute] public class AuthChallengeResponse : CefSharp.DevTools.DevToolsDomainEntityBase { + /// + /// The decision on what to do in response to the authorization challenge. Default means + /// deferring to the default behavior of the net stack, which will likely either the Cancel + /// authentication or display a popup dialog box. + /// public CefSharp.DevTools.Fetch.AuthChallengeResponseResponse Response { get @@ -21650,6 +22039,9 @@ namespace CefSharp.DevTools.Fetch private set; } + /// + /// How the requested resource will be used. + /// public CefSharp.DevTools.Network.ResourceType ResourceType { get @@ -21673,6 +22065,9 @@ namespace CefSharp.DevTools.Fetch private set; } + /// + /// Response error if intercepted at response stage. + /// public CefSharp.DevTools.Network.ErrorReason? ResponseErrorReason { get @@ -21765,6 +22160,9 @@ namespace CefSharp.DevTools.Fetch private set; } + /// + /// How the requested resource will be used. + /// public CefSharp.DevTools.Network.ResourceType ResourceType { get @@ -21964,6 +22362,9 @@ namespace CefSharp.DevTools.WebAudio set; } + /// + /// ContextType + /// public CefSharp.DevTools.WebAudio.ContextType ContextType { get @@ -21987,6 +22388,9 @@ namespace CefSharp.DevTools.WebAudio set; } + /// + /// ContextState + /// public CefSharp.DevTools.WebAudio.ContextState ContextState { get @@ -22144,6 +22548,9 @@ namespace CefSharp.DevTools.WebAudio set; } + /// + /// ChannelCountMode + /// public CefSharp.DevTools.WebAudio.ChannelCountMode ChannelCountMode { get @@ -22167,6 +22574,9 @@ namespace CefSharp.DevTools.WebAudio set; } + /// + /// ChannelInterpretation + /// public CefSharp.DevTools.WebAudio.ChannelInterpretation ChannelInterpretation { get @@ -22237,6 +22647,9 @@ namespace CefSharp.DevTools.WebAudio set; } + /// + /// Rate + /// public CefSharp.DevTools.WebAudio.AutomationRate Rate { get @@ -22767,6 +23180,9 @@ namespace CefSharp.DevTools.WebAuthn [System.Runtime.Serialization.DataContractAttribute] public class VirtualAuthenticatorOptions : CefSharp.DevTools.DevToolsDomainEntityBase { + /// + /// Protocol + /// public CefSharp.DevTools.WebAuthn.AuthenticatorProtocol Protocol { get @@ -22790,6 +23206,9 @@ namespace CefSharp.DevTools.WebAuthn set; } + /// + /// Defaults to ctap2_0. Ignored if |protocol| == u2f. + /// public CefSharp.DevTools.WebAuthn.Ctap2Version? Ctap2Version { get @@ -22813,6 +23232,9 @@ namespace CefSharp.DevTools.WebAuthn set; } + /// + /// Transport + /// public CefSharp.DevTools.WebAuthn.AuthenticatorTransport Transport { get @@ -23030,6 +23452,17 @@ namespace CefSharp.DevTools.Media [System.Runtime.Serialization.DataContractAttribute] public class PlayerMessage : CefSharp.DevTools.DevToolsDomainEntityBase { + /// + /// Keep in sync with MediaLogMessageLevel + /// We are currently keeping the message level 'error' separate from the + /// PlayerError type because right now they represent different things, + /// this one being a DVLOG(ERROR) style log message that gets printed + /// based on what log level is selected in the UI, and the other is a + /// representation of a media::PipelineStatus object. Soon however we're + /// going to be moving away from using PipelineStatus for errors and + /// introducing a new error type which should hopefully let us integrate + /// the error log level into the PlayerError type. + /// public CefSharp.DevTools.Media.PlayerMessageLevel Level { get @@ -23149,6 +23582,9 @@ namespace CefSharp.DevTools.Media [System.Runtime.Serialization.DataContractAttribute] public class PlayerError : CefSharp.DevTools.DevToolsDomainEntityBase { + /// + /// Type + /// public CefSharp.DevTools.Media.PlayerErrorType Type { get @@ -23570,6 +24006,9 @@ namespace CefSharp.DevTools.Debugger [System.Runtime.Serialization.DataContractAttribute] public class Scope : CefSharp.DevTools.DevToolsDomainEntityBase { + /// + /// Scope type. + /// public CefSharp.DevTools.Debugger.ScopeType Type { get @@ -23721,6 +24160,9 @@ namespace CefSharp.DevTools.Debugger set; } + /// + /// Type + /// public CefSharp.DevTools.Debugger.BreakLocationType? Type { get @@ -23795,6 +24237,9 @@ namespace CefSharp.DevTools.Debugger [System.Runtime.Serialization.DataContractAttribute] public class DebugSymbols : CefSharp.DevTools.DevToolsDomainEntityBase { + /// + /// Type of the debug symbols. + /// public CefSharp.DevTools.Debugger.DebugSymbolsType Type { get @@ -23939,6 +24384,9 @@ namespace CefSharp.DevTools.Debugger private set; } + /// + /// Pause reason. + /// public CefSharp.DevTools.Debugger.PausedReason Reason { get @@ -24169,6 +24617,9 @@ namespace CefSharp.DevTools.Debugger private set; } + /// + /// The language of the script. + /// public CefSharp.DevTools.Debugger.ScriptLanguage? ScriptLanguage { get @@ -24370,6 +24821,9 @@ namespace CefSharp.DevTools.Debugger private set; } + /// + /// The language of the script. + /// public CefSharp.DevTools.Debugger.ScriptLanguage? ScriptLanguage { get @@ -25327,6 +25781,9 @@ namespace CefSharp.DevTools.Runtime [System.Runtime.Serialization.DataContractAttribute] public class RemoteObject : CefSharp.DevTools.DevToolsDomainEntityBase { + /// + /// Object type. + /// public CefSharp.DevTools.Runtime.RemoteObjectType Type { get @@ -25350,6 +25807,11 @@ namespace CefSharp.DevTools.Runtime set; } + /// + /// Object subtype hint. Specified for `object` type values only. + /// NOTE: If you change anything here, make sure to also update + /// `subtype` in `ObjectPreview` and `PropertyPreview` below. + /// public CefSharp.DevTools.Runtime.RemoteObjectSubtype? Subtype { get @@ -25632,6 +26094,9 @@ namespace CefSharp.DevTools.Runtime [System.Runtime.Serialization.DataContractAttribute] public class ObjectPreview : CefSharp.DevTools.DevToolsDomainEntityBase { + /// + /// Object type. + /// public CefSharp.DevTools.Runtime.ObjectPreviewType Type { get @@ -25655,6 +26120,9 @@ namespace CefSharp.DevTools.Runtime set; } + /// + /// Object subtype hint. Specified for `object` type values only. + /// public CefSharp.DevTools.Runtime.ObjectPreviewSubtype? Subtype { get @@ -25889,6 +26357,9 @@ namespace CefSharp.DevTools.Runtime set; } + /// + /// Object type. Accessor means that the property itself is an accessor property. + /// public CefSharp.DevTools.Runtime.PropertyPreviewType Type { get @@ -25932,6 +26403,9 @@ namespace CefSharp.DevTools.Runtime set; } + /// + /// Object subtype hint. Specified for `object` type values only. + /// public CefSharp.DevTools.Runtime.PropertyPreviewSubtype? Subtype { get @@ -26639,6 +27113,9 @@ namespace CefSharp.DevTools.Runtime [System.Runtime.Serialization.DataContractAttribute] public class ConsoleAPICalledEventArgs : CefSharp.DevTools.DevToolsDomainEventArgsBase { + /// + /// Type of the call. + /// public CefSharp.DevTools.Runtime.ConsoleAPICalledType Type { get @@ -27206,8 +27683,6 @@ namespace CefSharp.DevTools.Animation _client = (client); } - private CefSharp.IRegistration _AnimationCanceledEventRegistration; - private System.EventHandler _AnimationCanceled; /// /// Event for when an animation has been cancelled. /// @@ -27215,31 +27690,15 @@ namespace CefSharp.DevTools.Animation { add { - if ((_AnimationCanceled) == (null)) - { - _AnimationCanceledEventRegistration = (_client.RegisterEventHandler("Animation.animationCanceled", OnAnimationCanceled)); - } - - _AnimationCanceled += (value); + _client.AddEventHandler("Animation.animationCanceled", value); } remove { - _AnimationCanceled -= (value); - if ((_AnimationCanceled) == (null)) - { - _AnimationCanceledEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Animation.animationCanceled", value); } } - private void OnAnimationCanceled(object sender, AnimationCanceledEventArgs args) - { - _AnimationCanceled?.Invoke(this, args); - } - - private CefSharp.IRegistration _AnimationCreatedEventRegistration; - private System.EventHandler _AnimationCreated; /// /// Event for each animation that has been created. /// @@ -27247,31 +27706,15 @@ namespace CefSharp.DevTools.Animation { add { - if ((_AnimationCreated) == (null)) - { - _AnimationCreatedEventRegistration = (_client.RegisterEventHandler("Animation.animationCreated", OnAnimationCreated)); - } - - _AnimationCreated += (value); + _client.AddEventHandler("Animation.animationCreated", value); } remove { - _AnimationCreated -= (value); - if ((_AnimationCreated) == (null)) - { - _AnimationCreatedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Animation.animationCreated", value); } } - private void OnAnimationCreated(object sender, AnimationCreatedEventArgs args) - { - _AnimationCreated?.Invoke(this, args); - } - - private CefSharp.IRegistration _AnimationStartedEventRegistration; - private System.EventHandler _AnimationStarted; /// /// Event for animation that has been started. /// @@ -27279,29 +27722,15 @@ namespace CefSharp.DevTools.Animation { add { - if ((_AnimationStarted) == (null)) - { - _AnimationStartedEventRegistration = (_client.RegisterEventHandler("Animation.animationStarted", OnAnimationStarted)); - } - - _AnimationStarted += (value); + _client.AddEventHandler("Animation.animationStarted", value); } remove { - _AnimationStarted -= (value); - if ((_AnimationStarted) == (null)) - { - _AnimationStartedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Animation.animationStarted", value); } } - private void OnAnimationStarted(object sender, AnimationStartedEventArgs args) - { - _AnimationStarted?.Invoke(this, args); - } - /// /// Disables animation domain notifications. /// @@ -27543,8 +27972,6 @@ namespace CefSharp.DevTools.ApplicationCache _client = (client); } - private CefSharp.IRegistration _ApplicationCacheStatusUpdatedEventRegistration; - private System.EventHandler _ApplicationCacheStatusUpdated; /// /// ApplicationCacheStatusUpdated /// @@ -27552,31 +27979,15 @@ namespace CefSharp.DevTools.ApplicationCache { add { - if ((_ApplicationCacheStatusUpdated) == (null)) - { - _ApplicationCacheStatusUpdatedEventRegistration = (_client.RegisterEventHandler("ApplicationCache.applicationCacheStatusUpdated", OnApplicationCacheStatusUpdated)); - } - - _ApplicationCacheStatusUpdated += (value); + _client.AddEventHandler("ApplicationCache.applicationCacheStatusUpdated", value); } remove { - _ApplicationCacheStatusUpdated -= (value); - if ((_ApplicationCacheStatusUpdated) == (null)) - { - _ApplicationCacheStatusUpdatedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("ApplicationCache.applicationCacheStatusUpdated", value); } } - private void OnApplicationCacheStatusUpdated(object sender, ApplicationCacheStatusUpdatedEventArgs args) - { - _ApplicationCacheStatusUpdated?.Invoke(this, args); - } - - private CefSharp.IRegistration _NetworkStateUpdatedEventRegistration; - private System.EventHandler _NetworkStateUpdated; /// /// NetworkStateUpdated /// @@ -27584,29 +27995,15 @@ namespace CefSharp.DevTools.ApplicationCache { add { - if ((_NetworkStateUpdated) == (null)) - { - _NetworkStateUpdatedEventRegistration = (_client.RegisterEventHandler("ApplicationCache.networkStateUpdated", OnNetworkStateUpdated)); - } - - _NetworkStateUpdated += (value); + _client.AddEventHandler("ApplicationCache.networkStateUpdated", value); } remove { - _NetworkStateUpdated -= (value); - if ((_NetworkStateUpdated) == (null)) - { - _NetworkStateUpdatedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("ApplicationCache.networkStateUpdated", value); } } - private void OnNetworkStateUpdated(object sender, NetworkStateUpdatedEventArgs args) - { - _NetworkStateUpdated?.Invoke(this, args); - } - /// /// Enables application cache domain notifications. /// @@ -27763,8 +28160,6 @@ namespace CefSharp.DevTools.Audits _client = (client); } - private CefSharp.IRegistration _IssueAddedEventRegistration; - private System.EventHandler _IssueAdded; /// /// IssueAdded /// @@ -27772,29 +28167,15 @@ namespace CefSharp.DevTools.Audits { add { - if ((_IssueAdded) == (null)) - { - _IssueAddedEventRegistration = (_client.RegisterEventHandler("Audits.issueAdded", OnIssueAdded)); - } - - _IssueAdded += (value); + _client.AddEventHandler("Audits.issueAdded", value); } remove { - _IssueAdded -= (value); - if ((_IssueAdded) == (null)) - { - _IssueAddedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Audits.issueAdded", value); } } - private void OnIssueAdded(object sender, IssueAddedEventArgs args) - { - _IssueAdded?.Invoke(this, args); - } - partial void ValidateGetEncodedResponse(string requestId, CefSharp.DevTools.Audits.GetEncodedResponseEncoding encoding, double? quality = null, bool? sizeOnly = null); /// /// Returns the response body and size if it were re-encoded with the specified settings. Only @@ -27885,8 +28266,6 @@ namespace CefSharp.DevTools.BackgroundService _client = (client); } - private CefSharp.IRegistration _RecordingStateChangedEventRegistration; - private System.EventHandler _RecordingStateChanged; /// /// Called when the recording state for the service has been updated. /// @@ -27894,31 +28273,15 @@ namespace CefSharp.DevTools.BackgroundService { add { - if ((_RecordingStateChanged) == (null)) - { - _RecordingStateChangedEventRegistration = (_client.RegisterEventHandler("BackgroundService.recordingStateChanged", OnRecordingStateChanged)); - } - - _RecordingStateChanged += (value); + _client.AddEventHandler("BackgroundService.recordingStateChanged", value); } remove { - _RecordingStateChanged -= (value); - if ((_RecordingStateChanged) == (null)) - { - _RecordingStateChangedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("BackgroundService.recordingStateChanged", value); } } - private void OnRecordingStateChanged(object sender, RecordingStateChangedEventArgs args) - { - _RecordingStateChanged?.Invoke(this, args); - } - - private CefSharp.IRegistration _BackgroundServiceEventReceivedEventRegistration; - private System.EventHandler _BackgroundServiceEventReceived; /// /// Called with all existing backgroundServiceEvents when enabled, and all new /// events afterwards if enabled and recording. @@ -27927,29 +28290,15 @@ namespace CefSharp.DevTools.BackgroundService { add { - if ((_BackgroundServiceEventReceived) == (null)) - { - _BackgroundServiceEventReceivedEventRegistration = (_client.RegisterEventHandler("BackgroundService.backgroundServiceEventReceived", OnBackgroundServiceEventReceived)); - } - - _BackgroundServiceEventReceived += (value); + _client.AddEventHandler("BackgroundService.backgroundServiceEventReceived", value); } remove { - _BackgroundServiceEventReceived -= (value); - if ((_BackgroundServiceEventReceived) == (null)) - { - _BackgroundServiceEventReceivedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("BackgroundService.backgroundServiceEventReceived", value); } } - private void OnBackgroundServiceEventReceived(object sender, BackgroundServiceEventReceivedEventArgs args) - { - _BackgroundServiceEventReceived?.Invoke(this, args); - } - partial void ValidateStartObserving(CefSharp.DevTools.BackgroundService.ServiceName service); /// /// Enables event updates for the service. @@ -28316,8 +28665,6 @@ namespace CefSharp.DevTools.Browser _client = (client); } - private CefSharp.IRegistration _DownloadWillBeginEventRegistration; - private System.EventHandler _DownloadWillBegin; /// /// Fired when page is about to start a download. /// @@ -28325,31 +28672,15 @@ namespace CefSharp.DevTools.Browser { add { - if ((_DownloadWillBegin) == (null)) - { - _DownloadWillBeginEventRegistration = (_client.RegisterEventHandler("Browser.downloadWillBegin", OnDownloadWillBegin)); - } - - _DownloadWillBegin += (value); + _client.AddEventHandler("Browser.downloadWillBegin", value); } remove { - _DownloadWillBegin -= (value); - if ((_DownloadWillBegin) == (null)) - { - _DownloadWillBeginEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Browser.downloadWillBegin", value); } } - private void OnDownloadWillBegin(object sender, DownloadWillBeginEventArgs args) - { - _DownloadWillBegin?.Invoke(this, args); - } - - private CefSharp.IRegistration _DownloadProgressEventRegistration; - private System.EventHandler _DownloadProgress; /// /// Fired when download makes progress. Last call has |done| == true. /// @@ -28357,29 +28688,15 @@ namespace CefSharp.DevTools.Browser { add { - if ((_DownloadProgress) == (null)) - { - _DownloadProgressEventRegistration = (_client.RegisterEventHandler("Browser.downloadProgress", OnDownloadProgress)); - } - - _DownloadProgress += (value); + _client.AddEventHandler("Browser.downloadProgress", value); } remove { - _DownloadProgress -= (value); - if ((_DownloadProgress) == (null)) - { - _DownloadProgressEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Browser.downloadProgress", value); } } - private void OnDownloadProgress(object sender, DownloadProgressEventArgs args) - { - _DownloadProgress?.Invoke(this, args); - } - partial void ValidateSetPermission(CefSharp.DevTools.Browser.PermissionDescriptor permission, CefSharp.DevTools.Browser.PermissionSetting setting, string origin = null, string browserContextId = null); /// /// Set permission settings for given origin. @@ -29377,8 +29694,6 @@ namespace CefSharp.DevTools.CSS _client = (client); } - private CefSharp.IRegistration _FontsUpdatedEventRegistration; - private System.EventHandler _FontsUpdated; /// /// Fires whenever a web font is updated. A non-empty font parameter indicates a successfully loaded /// web font @@ -29387,64 +29702,32 @@ namespace CefSharp.DevTools.CSS { add { - if ((_FontsUpdated) == (null)) - { - _FontsUpdatedEventRegistration = (_client.RegisterEventHandler("CSS.fontsUpdated", OnFontsUpdated)); - } - - _FontsUpdated += (value); + _client.AddEventHandler("CSS.fontsUpdated", value); } remove { - _FontsUpdated -= (value); - if ((_FontsUpdated) == (null)) - { - _FontsUpdatedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("CSS.fontsUpdated", value); } } - private void OnFontsUpdated(object sender, FontsUpdatedEventArgs args) - { - _FontsUpdated?.Invoke(this, args); - } - - private CefSharp.IRegistration _MediaQueryResultChangedEventRegistration; - private System.EventHandler _MediaQueryResultChanged; /// /// Fires whenever a MediaQuery result changes (for example, after a browser window has been /// resized.) The current implementation considers only viewport-dependent media features. /// - public event System.EventHandler MediaQueryResultChanged + public event System.EventHandler MediaQueryResultChanged { add { - if ((_MediaQueryResultChanged) == (null)) - { - _MediaQueryResultChangedEventRegistration = (_client.RegisterEventHandler("CSS.mediaQueryResultChanged", OnMediaQueryResultChanged)); - } - - _MediaQueryResultChanged += (value); + _client.AddEventHandler("CSS.mediaQueryResultChanged", value); } remove { - _MediaQueryResultChanged -= (value); - if ((_MediaQueryResultChanged) == (null)) - { - _MediaQueryResultChangedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("CSS.mediaQueryResultChanged", value); } } - private void OnMediaQueryResultChanged(object sender, CefSharp.DevTools.DevToolsEventArgs args) - { - _MediaQueryResultChanged?.Invoke(this, args); - } - - private CefSharp.IRegistration _StyleSheetAddedEventRegistration; - private System.EventHandler _StyleSheetAdded; /// /// Fired whenever an active document stylesheet is added. /// @@ -29452,31 +29735,15 @@ namespace CefSharp.DevTools.CSS { add { - if ((_StyleSheetAdded) == (null)) - { - _StyleSheetAddedEventRegistration = (_client.RegisterEventHandler("CSS.styleSheetAdded", OnStyleSheetAdded)); - } - - _StyleSheetAdded += (value); + _client.AddEventHandler("CSS.styleSheetAdded", value); } remove { - _StyleSheetAdded -= (value); - if ((_StyleSheetAdded) == (null)) - { - _StyleSheetAddedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("CSS.styleSheetAdded", value); } } - private void OnStyleSheetAdded(object sender, StyleSheetAddedEventArgs args) - { - _StyleSheetAdded?.Invoke(this, args); - } - - private CefSharp.IRegistration _StyleSheetChangedEventRegistration; - private System.EventHandler _StyleSheetChanged; /// /// Fired whenever a stylesheet is changed as a result of the client operation. /// @@ -29484,31 +29751,15 @@ namespace CefSharp.DevTools.CSS { add { - if ((_StyleSheetChanged) == (null)) - { - _StyleSheetChangedEventRegistration = (_client.RegisterEventHandler("CSS.styleSheetChanged", OnStyleSheetChanged)); - } - - _StyleSheetChanged += (value); + _client.AddEventHandler("CSS.styleSheetChanged", value); } remove { - _StyleSheetChanged -= (value); - if ((_StyleSheetChanged) == (null)) - { - _StyleSheetChangedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("CSS.styleSheetChanged", value); } } - private void OnStyleSheetChanged(object sender, StyleSheetChangedEventArgs args) - { - _StyleSheetChanged?.Invoke(this, args); - } - - private CefSharp.IRegistration _StyleSheetRemovedEventRegistration; - private System.EventHandler _StyleSheetRemoved; /// /// Fired whenever an active document stylesheet is removed. /// @@ -29516,29 +29767,15 @@ namespace CefSharp.DevTools.CSS { add { - if ((_StyleSheetRemoved) == (null)) - { - _StyleSheetRemovedEventRegistration = (_client.RegisterEventHandler("CSS.styleSheetRemoved", OnStyleSheetRemoved)); - } - - _StyleSheetRemoved += (value); + _client.AddEventHandler("CSS.styleSheetRemoved", value); } remove { - _StyleSheetRemoved -= (value); - if ((_StyleSheetRemoved) == (null)) - { - _StyleSheetRemovedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("CSS.styleSheetRemoved", value); } } - private void OnStyleSheetRemoved(object sender, StyleSheetRemovedEventArgs args) - { - _StyleSheetRemoved?.Invoke(this, args); - } - partial void ValidateAddRule(string styleSheetId, string ruleText, CefSharp.DevTools.CSS.SourceRange location); /// /// Inserts a new rule with the given `ruleText` in a stylesheet with given `styleSheetId`, at the @@ -30137,8 +30374,6 @@ namespace CefSharp.DevTools.Cast _client = (client); } - private CefSharp.IRegistration _SinksUpdatedEventRegistration; - private System.EventHandler _SinksUpdated; /// /// This is fired whenever the list of available sinks changes. A sink is a /// device or a software surface that you can cast to. @@ -30147,31 +30382,15 @@ namespace CefSharp.DevTools.Cast { add { - if ((_SinksUpdated) == (null)) - { - _SinksUpdatedEventRegistration = (_client.RegisterEventHandler("Cast.sinksUpdated", OnSinksUpdated)); - } - - _SinksUpdated += (value); + _client.AddEventHandler("Cast.sinksUpdated", value); } remove { - _SinksUpdated -= (value); - if ((_SinksUpdated) == (null)) - { - _SinksUpdatedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Cast.sinksUpdated", value); } } - private void OnSinksUpdated(object sender, SinksUpdatedEventArgs args) - { - _SinksUpdated?.Invoke(this, args); - } - - private CefSharp.IRegistration _IssueUpdatedEventRegistration; - private System.EventHandler _IssueUpdated; /// /// This is fired whenever the outstanding issue/error message changes. /// |issueMessage| is empty if there is no issue. @@ -30180,29 +30399,15 @@ namespace CefSharp.DevTools.Cast { add { - if ((_IssueUpdated) == (null)) - { - _IssueUpdatedEventRegistration = (_client.RegisterEventHandler("Cast.issueUpdated", OnIssueUpdated)); - } - - _IssueUpdated += (value); + _client.AddEventHandler("Cast.issueUpdated", value); } remove { - _IssueUpdated -= (value); - if ((_IssueUpdated) == (null)) - { - _IssueUpdatedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Cast.issueUpdated", value); } } - private void OnIssueUpdated(object sender, IssueUpdatedEventArgs args) - { - _IssueUpdated?.Invoke(this, args); - } - partial void ValidateEnable(string presentationUrl = null); /// /// Starts observing for sinks that can be used for tab mirroring, and if set, @@ -31049,8 +31254,6 @@ namespace CefSharp.DevTools.DOM _client = (client); } - private CefSharp.IRegistration _AttributeModifiedEventRegistration; - private System.EventHandler _AttributeModified; /// /// Fired when `Element`'s attribute is modified. /// @@ -31058,31 +31261,15 @@ namespace CefSharp.DevTools.DOM { add { - if ((_AttributeModified) == (null)) - { - _AttributeModifiedEventRegistration = (_client.RegisterEventHandler("DOM.attributeModified", OnAttributeModified)); - } - - _AttributeModified += (value); + _client.AddEventHandler("DOM.attributeModified", value); } remove { - _AttributeModified -= (value); - if ((_AttributeModified) == (null)) - { - _AttributeModifiedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("DOM.attributeModified", value); } } - private void OnAttributeModified(object sender, AttributeModifiedEventArgs args) - { - _AttributeModified?.Invoke(this, args); - } - - private CefSharp.IRegistration _AttributeRemovedEventRegistration; - private System.EventHandler _AttributeRemoved; /// /// Fired when `Element`'s attribute is removed. /// @@ -31090,31 +31277,15 @@ namespace CefSharp.DevTools.DOM { add { - if ((_AttributeRemoved) == (null)) - { - _AttributeRemovedEventRegistration = (_client.RegisterEventHandler("DOM.attributeRemoved", OnAttributeRemoved)); - } - - _AttributeRemoved += (value); + _client.AddEventHandler("DOM.attributeRemoved", value); } remove { - _AttributeRemoved -= (value); - if ((_AttributeRemoved) == (null)) - { - _AttributeRemovedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("DOM.attributeRemoved", value); } } - private void OnAttributeRemoved(object sender, AttributeRemovedEventArgs args) - { - _AttributeRemoved?.Invoke(this, args); - } - - private CefSharp.IRegistration _CharacterDataModifiedEventRegistration; - private System.EventHandler _CharacterDataModified; /// /// Mirrors `DOMCharacterDataModified` event. /// @@ -31122,31 +31293,15 @@ namespace CefSharp.DevTools.DOM { add { - if ((_CharacterDataModified) == (null)) - { - _CharacterDataModifiedEventRegistration = (_client.RegisterEventHandler("DOM.characterDataModified", OnCharacterDataModified)); - } - - _CharacterDataModified += (value); + _client.AddEventHandler("DOM.characterDataModified", value); } remove { - _CharacterDataModified -= (value); - if ((_CharacterDataModified) == (null)) - { - _CharacterDataModifiedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("DOM.characterDataModified", value); } } - private void OnCharacterDataModified(object sender, CharacterDataModifiedEventArgs args) - { - _CharacterDataModified?.Invoke(this, args); - } - - private CefSharp.IRegistration _ChildNodeCountUpdatedEventRegistration; - private System.EventHandler _ChildNodeCountUpdated; /// /// Fired when `Container`'s child node count has changed. /// @@ -31154,31 +31309,15 @@ namespace CefSharp.DevTools.DOM { add { - if ((_ChildNodeCountUpdated) == (null)) - { - _ChildNodeCountUpdatedEventRegistration = (_client.RegisterEventHandler("DOM.childNodeCountUpdated", OnChildNodeCountUpdated)); - } - - _ChildNodeCountUpdated += (value); + _client.AddEventHandler("DOM.childNodeCountUpdated", value); } remove { - _ChildNodeCountUpdated -= (value); - if ((_ChildNodeCountUpdated) == (null)) - { - _ChildNodeCountUpdatedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("DOM.childNodeCountUpdated", value); } } - private void OnChildNodeCountUpdated(object sender, ChildNodeCountUpdatedEventArgs args) - { - _ChildNodeCountUpdated?.Invoke(this, args); - } - - private CefSharp.IRegistration _ChildNodeInsertedEventRegistration; - private System.EventHandler _ChildNodeInserted; /// /// Mirrors `DOMNodeInserted` event. /// @@ -31186,31 +31325,15 @@ namespace CefSharp.DevTools.DOM { add { - if ((_ChildNodeInserted) == (null)) - { - _ChildNodeInsertedEventRegistration = (_client.RegisterEventHandler("DOM.childNodeInserted", OnChildNodeInserted)); - } - - _ChildNodeInserted += (value); + _client.AddEventHandler("DOM.childNodeInserted", value); } remove { - _ChildNodeInserted -= (value); - if ((_ChildNodeInserted) == (null)) - { - _ChildNodeInsertedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("DOM.childNodeInserted", value); } } - private void OnChildNodeInserted(object sender, ChildNodeInsertedEventArgs args) - { - _ChildNodeInserted?.Invoke(this, args); - } - - private CefSharp.IRegistration _ChildNodeRemovedEventRegistration; - private System.EventHandler _ChildNodeRemoved; /// /// Mirrors `DOMNodeRemoved` event. /// @@ -31218,31 +31341,15 @@ namespace CefSharp.DevTools.DOM { add { - if ((_ChildNodeRemoved) == (null)) - { - _ChildNodeRemovedEventRegistration = (_client.RegisterEventHandler("DOM.childNodeRemoved", OnChildNodeRemoved)); - } - - _ChildNodeRemoved += (value); + _client.AddEventHandler("DOM.childNodeRemoved", value); } remove { - _ChildNodeRemoved -= (value); - if ((_ChildNodeRemoved) == (null)) - { - _ChildNodeRemovedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("DOM.childNodeRemoved", value); } } - private void OnChildNodeRemoved(object sender, ChildNodeRemovedEventArgs args) - { - _ChildNodeRemoved?.Invoke(this, args); - } - - private CefSharp.IRegistration _DistributedNodesUpdatedEventRegistration; - private System.EventHandler _DistributedNodesUpdated; /// /// Called when distribution is changed. /// @@ -31250,63 +31357,31 @@ namespace CefSharp.DevTools.DOM { add { - if ((_DistributedNodesUpdated) == (null)) - { - _DistributedNodesUpdatedEventRegistration = (_client.RegisterEventHandler("DOM.distributedNodesUpdated", OnDistributedNodesUpdated)); - } - - _DistributedNodesUpdated += (value); + _client.AddEventHandler("DOM.distributedNodesUpdated", value); } remove { - _DistributedNodesUpdated -= (value); - if ((_DistributedNodesUpdated) == (null)) - { - _DistributedNodesUpdatedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("DOM.distributedNodesUpdated", value); } } - private void OnDistributedNodesUpdated(object sender, DistributedNodesUpdatedEventArgs args) - { - _DistributedNodesUpdated?.Invoke(this, args); - } - - private CefSharp.IRegistration _DocumentUpdatedEventRegistration; - private System.EventHandler _DocumentUpdated; /// /// Fired when `Document` has been totally updated. Node ids are no longer valid. /// - public event System.EventHandler DocumentUpdated + public event System.EventHandler DocumentUpdated { add { - if ((_DocumentUpdated) == (null)) - { - _DocumentUpdatedEventRegistration = (_client.RegisterEventHandler("DOM.documentUpdated", OnDocumentUpdated)); - } - - _DocumentUpdated += (value); + _client.AddEventHandler("DOM.documentUpdated", value); } remove { - _DocumentUpdated -= (value); - if ((_DocumentUpdated) == (null)) - { - _DocumentUpdatedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("DOM.documentUpdated", value); } } - private void OnDocumentUpdated(object sender, CefSharp.DevTools.DevToolsEventArgs args) - { - _DocumentUpdated?.Invoke(this, args); - } - - private CefSharp.IRegistration _InlineStyleInvalidatedEventRegistration; - private System.EventHandler _InlineStyleInvalidated; /// /// Fired when `Element`'s inline style is modified via a CSS property modification. /// @@ -31314,31 +31389,15 @@ namespace CefSharp.DevTools.DOM { add { - if ((_InlineStyleInvalidated) == (null)) - { - _InlineStyleInvalidatedEventRegistration = (_client.RegisterEventHandler("DOM.inlineStyleInvalidated", OnInlineStyleInvalidated)); - } - - _InlineStyleInvalidated += (value); + _client.AddEventHandler("DOM.inlineStyleInvalidated", value); } remove { - _InlineStyleInvalidated -= (value); - if ((_InlineStyleInvalidated) == (null)) - { - _InlineStyleInvalidatedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("DOM.inlineStyleInvalidated", value); } } - private void OnInlineStyleInvalidated(object sender, InlineStyleInvalidatedEventArgs args) - { - _InlineStyleInvalidated?.Invoke(this, args); - } - - private CefSharp.IRegistration _PseudoElementAddedEventRegistration; - private System.EventHandler _PseudoElementAdded; /// /// Called when a pseudo element is added to an element. /// @@ -31346,31 +31405,15 @@ namespace CefSharp.DevTools.DOM { add { - if ((_PseudoElementAdded) == (null)) - { - _PseudoElementAddedEventRegistration = (_client.RegisterEventHandler("DOM.pseudoElementAdded", OnPseudoElementAdded)); - } - - _PseudoElementAdded += (value); + _client.AddEventHandler("DOM.pseudoElementAdded", value); } remove { - _PseudoElementAdded -= (value); - if ((_PseudoElementAdded) == (null)) - { - _PseudoElementAddedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("DOM.pseudoElementAdded", value); } } - private void OnPseudoElementAdded(object sender, PseudoElementAddedEventArgs args) - { - _PseudoElementAdded?.Invoke(this, args); - } - - private CefSharp.IRegistration _PseudoElementRemovedEventRegistration; - private System.EventHandler _PseudoElementRemoved; /// /// Called when a pseudo element is removed from an element. /// @@ -31378,31 +31421,15 @@ namespace CefSharp.DevTools.DOM { add { - if ((_PseudoElementRemoved) == (null)) - { - _PseudoElementRemovedEventRegistration = (_client.RegisterEventHandler("DOM.pseudoElementRemoved", OnPseudoElementRemoved)); - } - - _PseudoElementRemoved += (value); + _client.AddEventHandler("DOM.pseudoElementRemoved", value); } remove { - _PseudoElementRemoved -= (value); - if ((_PseudoElementRemoved) == (null)) - { - _PseudoElementRemovedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("DOM.pseudoElementRemoved", value); } } - private void OnPseudoElementRemoved(object sender, PseudoElementRemovedEventArgs args) - { - _PseudoElementRemoved?.Invoke(this, args); - } - - private CefSharp.IRegistration _SetChildNodesEventRegistration; - private System.EventHandler _SetChildNodes; /// /// Fired when backend wants to provide client with the missing DOM structure. This happens upon /// most of the calls requesting node ids. @@ -31411,31 +31438,15 @@ namespace CefSharp.DevTools.DOM { add { - if ((_SetChildNodes) == (null)) - { - _SetChildNodesEventRegistration = (_client.RegisterEventHandler("DOM.setChildNodes", OnSetChildNodes)); - } - - _SetChildNodes += (value); + _client.AddEventHandler("DOM.setChildNodes", value); } remove { - _SetChildNodes -= (value); - if ((_SetChildNodes) == (null)) - { - _SetChildNodesEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("DOM.setChildNodes", value); } } - private void OnSetChildNodes(object sender, SetChildNodesEventArgs args) - { - _SetChildNodes?.Invoke(this, args); - } - - private CefSharp.IRegistration _ShadowRootPoppedEventRegistration; - private System.EventHandler _ShadowRootPopped; /// /// Called when shadow root is popped from the element. /// @@ -31443,31 +31454,15 @@ namespace CefSharp.DevTools.DOM { add { - if ((_ShadowRootPopped) == (null)) - { - _ShadowRootPoppedEventRegistration = (_client.RegisterEventHandler("DOM.shadowRootPopped", OnShadowRootPopped)); - } - - _ShadowRootPopped += (value); + _client.AddEventHandler("DOM.shadowRootPopped", value); } remove { - _ShadowRootPopped -= (value); - if ((_ShadowRootPopped) == (null)) - { - _ShadowRootPoppedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("DOM.shadowRootPopped", value); } } - private void OnShadowRootPopped(object sender, ShadowRootPoppedEventArgs args) - { - _ShadowRootPopped?.Invoke(this, args); - } - - private CefSharp.IRegistration _ShadowRootPushedEventRegistration; - private System.EventHandler _ShadowRootPushed; /// /// Called when shadow root is pushed into the element. /// @@ -31475,29 +31470,15 @@ namespace CefSharp.DevTools.DOM { add { - if ((_ShadowRootPushed) == (null)) - { - _ShadowRootPushedEventRegistration = (_client.RegisterEventHandler("DOM.shadowRootPushed", OnShadowRootPushed)); - } - - _ShadowRootPushed += (value); + _client.AddEventHandler("DOM.shadowRootPushed", value); } remove { - _ShadowRootPushed -= (value); - if ((_ShadowRootPushed) == (null)) - { - _ShadowRootPushedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("DOM.shadowRootPushed", value); } } - private void OnShadowRootPushed(object sender, ShadowRootPushedEventArgs args) - { - _ShadowRootPushed?.Invoke(this, args); - } - partial void ValidateCollectClassNamesFromSubtree(int nodeId); /// /// Collects class names for the node with given id and all of it's child nodes. @@ -32755,8 +32736,6 @@ namespace CefSharp.DevTools.DOMStorage _client = (client); } - private CefSharp.IRegistration _DomStorageItemAddedEventRegistration; - private System.EventHandler _DomStorageItemAdded; /// /// DomStorageItemAdded /// @@ -32764,31 +32743,15 @@ namespace CefSharp.DevTools.DOMStorage { add { - if ((_DomStorageItemAdded) == (null)) - { - _DomStorageItemAddedEventRegistration = (_client.RegisterEventHandler("DOMStorage.domStorageItemAdded", OnDomStorageItemAdded)); - } - - _DomStorageItemAdded += (value); + _client.AddEventHandler("DOMStorage.domStorageItemAdded", value); } remove { - _DomStorageItemAdded -= (value); - if ((_DomStorageItemAdded) == (null)) - { - _DomStorageItemAddedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("DOMStorage.domStorageItemAdded", value); } } - private void OnDomStorageItemAdded(object sender, DomStorageItemAddedEventArgs args) - { - _DomStorageItemAdded?.Invoke(this, args); - } - - private CefSharp.IRegistration _DomStorageItemRemovedEventRegistration; - private System.EventHandler _DomStorageItemRemoved; /// /// DomStorageItemRemoved /// @@ -32796,31 +32759,15 @@ namespace CefSharp.DevTools.DOMStorage { add { - if ((_DomStorageItemRemoved) == (null)) - { - _DomStorageItemRemovedEventRegistration = (_client.RegisterEventHandler("DOMStorage.domStorageItemRemoved", OnDomStorageItemRemoved)); - } - - _DomStorageItemRemoved += (value); + _client.AddEventHandler("DOMStorage.domStorageItemRemoved", value); } remove { - _DomStorageItemRemoved -= (value); - if ((_DomStorageItemRemoved) == (null)) - { - _DomStorageItemRemovedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("DOMStorage.domStorageItemRemoved", value); } } - private void OnDomStorageItemRemoved(object sender, DomStorageItemRemovedEventArgs args) - { - _DomStorageItemRemoved?.Invoke(this, args); - } - - private CefSharp.IRegistration _DomStorageItemUpdatedEventRegistration; - private System.EventHandler _DomStorageItemUpdated; /// /// DomStorageItemUpdated /// @@ -32828,31 +32775,15 @@ namespace CefSharp.DevTools.DOMStorage { add { - if ((_DomStorageItemUpdated) == (null)) - { - _DomStorageItemUpdatedEventRegistration = (_client.RegisterEventHandler("DOMStorage.domStorageItemUpdated", OnDomStorageItemUpdated)); - } - - _DomStorageItemUpdated += (value); + _client.AddEventHandler("DOMStorage.domStorageItemUpdated", value); } remove { - _DomStorageItemUpdated -= (value); - if ((_DomStorageItemUpdated) == (null)) - { - _DomStorageItemUpdatedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("DOMStorage.domStorageItemUpdated", value); } } - private void OnDomStorageItemUpdated(object sender, DomStorageItemUpdatedEventArgs args) - { - _DomStorageItemUpdated?.Invoke(this, args); - } - - private CefSharp.IRegistration _DomStorageItemsClearedEventRegistration; - private System.EventHandler _DomStorageItemsCleared; /// /// DomStorageItemsCleared /// @@ -32860,29 +32791,15 @@ namespace CefSharp.DevTools.DOMStorage { add { - if ((_DomStorageItemsCleared) == (null)) - { - _DomStorageItemsClearedEventRegistration = (_client.RegisterEventHandler("DOMStorage.domStorageItemsCleared", OnDomStorageItemsCleared)); - } - - _DomStorageItemsCleared += (value); + _client.AddEventHandler("DOMStorage.domStorageItemsCleared", value); } remove { - _DomStorageItemsCleared -= (value); - if ((_DomStorageItemsCleared) == (null)) - { - _DomStorageItemsClearedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("DOMStorage.domStorageItemsCleared", value); } } - private void OnDomStorageItemsCleared(object sender, DomStorageItemsClearedEventArgs args) - { - _DomStorageItemsCleared?.Invoke(this, args); - } - partial void ValidateClear(CefSharp.DevTools.DOMStorage.StorageId storageId); /// /// Clear @@ -33078,8 +32995,6 @@ namespace CefSharp.DevTools.Database _client = (client); } - private CefSharp.IRegistration _AddDatabaseEventRegistration; - private System.EventHandler _AddDatabase; /// /// AddDatabase /// @@ -33087,29 +33002,15 @@ namespace CefSharp.DevTools.Database { add { - if ((_AddDatabase) == (null)) - { - _AddDatabaseEventRegistration = (_client.RegisterEventHandler("Database.addDatabase", OnAddDatabase)); - } - - _AddDatabase += (value); + _client.AddEventHandler("Database.addDatabase", value); } remove { - _AddDatabase -= (value); - if ((_AddDatabase) == (null)) - { - _AddDatabaseEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Database.addDatabase", value); } } - private void OnAddDatabase(object sender, AddDatabaseEventArgs args) - { - _AddDatabase?.Invoke(this, args); - } - /// /// Disables database tracking, prevents database events from being sent to the client. /// @@ -33340,38 +33241,22 @@ namespace CefSharp.DevTools.Emulation _client = (client); } - private CefSharp.IRegistration _VirtualTimeBudgetExpiredEventRegistration; - private System.EventHandler _VirtualTimeBudgetExpired; /// /// Notification sent after the virtual time budget for the current VirtualTimePolicy has run out. /// - public event System.EventHandler VirtualTimeBudgetExpired + public event System.EventHandler VirtualTimeBudgetExpired { add { - if ((_VirtualTimeBudgetExpired) == (null)) - { - _VirtualTimeBudgetExpiredEventRegistration = (_client.RegisterEventHandler("Emulation.virtualTimeBudgetExpired", OnVirtualTimeBudgetExpired)); - } - - _VirtualTimeBudgetExpired += (value); + _client.AddEventHandler("Emulation.virtualTimeBudgetExpired", value); } remove { - _VirtualTimeBudgetExpired -= (value); - if ((_VirtualTimeBudgetExpired) == (null)) - { - _VirtualTimeBudgetExpiredEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Emulation.virtualTimeBudgetExpired", value); } } - private void OnVirtualTimeBudgetExpired(object sender, CefSharp.DevTools.DevToolsEventArgs args) - { - _VirtualTimeBudgetExpired?.Invoke(this, args); - } - /// /// Tells whether emulation is supported. /// @@ -34631,8 +34516,6 @@ namespace CefSharp.DevTools.Input _client = (client); } - private CefSharp.IRegistration _DragInterceptedEventRegistration; - private System.EventHandler _DragIntercepted; /// /// Emitted only when `Input.setInterceptDrags` is enabled. Use this data with `Input.dispatchDragEvent` to /// restore normal drag and drop behavior. @@ -34641,29 +34524,15 @@ namespace CefSharp.DevTools.Input { add { - if ((_DragIntercepted) == (null)) - { - _DragInterceptedEventRegistration = (_client.RegisterEventHandler("Input.dragIntercepted", OnDragIntercepted)); - } - - _DragIntercepted += (value); + _client.AddEventHandler("Input.dragIntercepted", value); } remove { - _DragIntercepted -= (value); - if ((_DragIntercepted) == (null)) - { - _DragInterceptedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Input.dragIntercepted", value); } } - private void OnDragIntercepted(object sender, DragInterceptedEventArgs args) - { - _DragIntercepted?.Invoke(this, args); - } - partial void ValidateDispatchDragEvent(CefSharp.DevTools.Input.DispatchDragEventType type, double x, double y, CefSharp.DevTools.Input.DragData data, int? modifiers = null); /// /// Dispatches a drag event into the page. @@ -35167,8 +35036,6 @@ namespace CefSharp.DevTools.Inspector _client = (client); } - private CefSharp.IRegistration _DetachedEventRegistration; - private System.EventHandler _Detached; /// /// Fired when remote debugging connection is about to be terminated. Contains detach reason. /// @@ -35176,93 +35043,47 @@ namespace CefSharp.DevTools.Inspector { add { - if ((_Detached) == (null)) - { - _DetachedEventRegistration = (_client.RegisterEventHandler("Inspector.detached", OnDetached)); - } - - _Detached += (value); + _client.AddEventHandler("Inspector.detached", value); } remove { - _Detached -= (value); - if ((_Detached) == (null)) - { - _DetachedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Inspector.detached", value); } } - private void OnDetached(object sender, DetachedEventArgs args) - { - _Detached?.Invoke(this, args); - } - - private CefSharp.IRegistration _TargetCrashedEventRegistration; - private System.EventHandler _TargetCrashed; /// /// Fired when debugging target has crashed /// - public event System.EventHandler TargetCrashed + public event System.EventHandler TargetCrashed { add { - if ((_TargetCrashed) == (null)) - { - _TargetCrashedEventRegistration = (_client.RegisterEventHandler("Inspector.targetCrashed", OnTargetCrashed)); - } - - _TargetCrashed += (value); + _client.AddEventHandler("Inspector.targetCrashed", value); } remove { - _TargetCrashed -= (value); - if ((_TargetCrashed) == (null)) - { - _TargetCrashedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Inspector.targetCrashed", value); } } - private void OnTargetCrashed(object sender, CefSharp.DevTools.DevToolsEventArgs args) - { - _TargetCrashed?.Invoke(this, args); - } - - private CefSharp.IRegistration _TargetReloadedAfterCrashEventRegistration; - private System.EventHandler _TargetReloadedAfterCrash; /// /// Fired when debugging target has reloaded after crash /// - public event System.EventHandler TargetReloadedAfterCrash + public event System.EventHandler TargetReloadedAfterCrash { add { - if ((_TargetReloadedAfterCrash) == (null)) - { - _TargetReloadedAfterCrashEventRegistration = (_client.RegisterEventHandler("Inspector.targetReloadedAfterCrash", OnTargetReloadedAfterCrash)); - } - - _TargetReloadedAfterCrash += (value); + _client.AddEventHandler("Inspector.targetReloadedAfterCrash", value); } remove { - _TargetReloadedAfterCrash -= (value); - if ((_TargetReloadedAfterCrash) == (null)) - { - _TargetReloadedAfterCrashEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Inspector.targetReloadedAfterCrash", value); } } - private void OnTargetReloadedAfterCrash(object sender, CefSharp.DevTools.DevToolsEventArgs args) - { - _TargetReloadedAfterCrash?.Invoke(this, args); - } - /// /// Disables inspector domain notifications. /// @@ -35490,8 +35311,6 @@ namespace CefSharp.DevTools.LayerTree _client = (client); } - private CefSharp.IRegistration _LayerPaintedEventRegistration; - private System.EventHandler _LayerPainted; /// /// LayerPainted /// @@ -35499,31 +35318,15 @@ namespace CefSharp.DevTools.LayerTree { add { - if ((_LayerPainted) == (null)) - { - _LayerPaintedEventRegistration = (_client.RegisterEventHandler("LayerTree.layerPainted", OnLayerPainted)); - } - - _LayerPainted += (value); + _client.AddEventHandler("LayerTree.layerPainted", value); } remove { - _LayerPainted -= (value); - if ((_LayerPainted) == (null)) - { - _LayerPaintedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("LayerTree.layerPainted", value); } } - private void OnLayerPainted(object sender, LayerPaintedEventArgs args) - { - _LayerPainted?.Invoke(this, args); - } - - private CefSharp.IRegistration _LayerTreeDidChangeEventRegistration; - private System.EventHandler _LayerTreeDidChange; /// /// LayerTreeDidChange /// @@ -35531,29 +35334,15 @@ namespace CefSharp.DevTools.LayerTree { add { - if ((_LayerTreeDidChange) == (null)) - { - _LayerTreeDidChangeEventRegistration = (_client.RegisterEventHandler("LayerTree.layerTreeDidChange", OnLayerTreeDidChange)); - } - - _LayerTreeDidChange += (value); + _client.AddEventHandler("LayerTree.layerTreeDidChange", value); } remove { - _LayerTreeDidChange -= (value); - if ((_LayerTreeDidChange) == (null)) - { - _LayerTreeDidChangeEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("LayerTree.layerTreeDidChange", value); } } - private void OnLayerTreeDidChange(object sender, LayerTreeDidChangeEventArgs args) - { - _LayerTreeDidChange?.Invoke(this, args); - } - partial void ValidateCompositingReasons(string layerId); /// /// Provides the reasons why the given layer was composited. @@ -35729,8 +35518,6 @@ namespace CefSharp.DevTools.Log _client = (client); } - private CefSharp.IRegistration _EntryAddedEventRegistration; - private System.EventHandler _EntryAdded; /// /// Issued when new message was logged. /// @@ -35738,29 +35525,15 @@ namespace CefSharp.DevTools.Log { add { - if ((_EntryAdded) == (null)) - { - _EntryAddedEventRegistration = (_client.RegisterEventHandler("Log.entryAdded", OnEntryAdded)); - } - - _EntryAdded += (value); + _client.AddEventHandler("Log.entryAdded", value); } remove { - _EntryAdded -= (value); - if ((_EntryAdded) == (null)) - { - _EntryAddedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Log.entryAdded", value); } } - private void OnEntryAdded(object sender, EntryAddedEventArgs args) - { - _EntryAdded?.Invoke(this, args); - } - /// /// Clears the log. /// @@ -36476,8 +36249,6 @@ namespace CefSharp.DevTools.Network _client = (client); } - private CefSharp.IRegistration _DataReceivedEventRegistration; - private System.EventHandler _DataReceived; /// /// Fired when data chunk was received over the network. /// @@ -36485,31 +36256,15 @@ namespace CefSharp.DevTools.Network { add { - if ((_DataReceived) == (null)) - { - _DataReceivedEventRegistration = (_client.RegisterEventHandler("Network.dataReceived", OnDataReceived)); - } - - _DataReceived += (value); + _client.AddEventHandler("Network.dataReceived", value); } remove { - _DataReceived -= (value); - if ((_DataReceived) == (null)) - { - _DataReceivedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Network.dataReceived", value); } } - private void OnDataReceived(object sender, DataReceivedEventArgs args) - { - _DataReceived?.Invoke(this, args); - } - - private CefSharp.IRegistration _EventSourceMessageReceivedEventRegistration; - private System.EventHandler _EventSourceMessageReceived; /// /// Fired when EventSource message is received. /// @@ -36517,31 +36272,15 @@ namespace CefSharp.DevTools.Network { add { - if ((_EventSourceMessageReceived) == (null)) - { - _EventSourceMessageReceivedEventRegistration = (_client.RegisterEventHandler("Network.eventSourceMessageReceived", OnEventSourceMessageReceived)); - } - - _EventSourceMessageReceived += (value); + _client.AddEventHandler("Network.eventSourceMessageReceived", value); } remove { - _EventSourceMessageReceived -= (value); - if ((_EventSourceMessageReceived) == (null)) - { - _EventSourceMessageReceivedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Network.eventSourceMessageReceived", value); } } - private void OnEventSourceMessageReceived(object sender, EventSourceMessageReceivedEventArgs args) - { - _EventSourceMessageReceived?.Invoke(this, args); - } - - private CefSharp.IRegistration _LoadingFailedEventRegistration; - private System.EventHandler _LoadingFailed; /// /// Fired when HTTP request has failed to load. /// @@ -36549,31 +36288,15 @@ namespace CefSharp.DevTools.Network { add { - if ((_LoadingFailed) == (null)) - { - _LoadingFailedEventRegistration = (_client.RegisterEventHandler("Network.loadingFailed", OnLoadingFailed)); - } - - _LoadingFailed += (value); + _client.AddEventHandler("Network.loadingFailed", value); } remove { - _LoadingFailed -= (value); - if ((_LoadingFailed) == (null)) - { - _LoadingFailedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Network.loadingFailed", value); } } - private void OnLoadingFailed(object sender, LoadingFailedEventArgs args) - { - _LoadingFailed?.Invoke(this, args); - } - - private CefSharp.IRegistration _LoadingFinishedEventRegistration; - private System.EventHandler _LoadingFinished; /// /// Fired when HTTP request has finished loading. /// @@ -36581,31 +36304,15 @@ namespace CefSharp.DevTools.Network { add { - if ((_LoadingFinished) == (null)) - { - _LoadingFinishedEventRegistration = (_client.RegisterEventHandler("Network.loadingFinished", OnLoadingFinished)); - } - - _LoadingFinished += (value); + _client.AddEventHandler("Network.loadingFinished", value); } remove { - _LoadingFinished -= (value); - if ((_LoadingFinished) == (null)) - { - _LoadingFinishedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Network.loadingFinished", value); } } - private void OnLoadingFinished(object sender, LoadingFinishedEventArgs args) - { - _LoadingFinished?.Invoke(this, args); - } - - private CefSharp.IRegistration _RequestServedFromCacheEventRegistration; - private System.EventHandler _RequestServedFromCache; /// /// Fired if request ended up loading from cache. /// @@ -36613,31 +36320,15 @@ namespace CefSharp.DevTools.Network { add { - if ((_RequestServedFromCache) == (null)) - { - _RequestServedFromCacheEventRegistration = (_client.RegisterEventHandler("Network.requestServedFromCache", OnRequestServedFromCache)); - } - - _RequestServedFromCache += (value); + _client.AddEventHandler("Network.requestServedFromCache", value); } remove { - _RequestServedFromCache -= (value); - if ((_RequestServedFromCache) == (null)) - { - _RequestServedFromCacheEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Network.requestServedFromCache", value); } } - private void OnRequestServedFromCache(object sender, RequestServedFromCacheEventArgs args) - { - _RequestServedFromCache?.Invoke(this, args); - } - - private CefSharp.IRegistration _RequestWillBeSentEventRegistration; - private System.EventHandler _RequestWillBeSent; /// /// Fired when page is about to send HTTP request. /// @@ -36645,31 +36336,15 @@ namespace CefSharp.DevTools.Network { add { - if ((_RequestWillBeSent) == (null)) - { - _RequestWillBeSentEventRegistration = (_client.RegisterEventHandler("Network.requestWillBeSent", OnRequestWillBeSent)); - } - - _RequestWillBeSent += (value); + _client.AddEventHandler("Network.requestWillBeSent", value); } remove { - _RequestWillBeSent -= (value); - if ((_RequestWillBeSent) == (null)) - { - _RequestWillBeSentEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Network.requestWillBeSent", value); } } - private void OnRequestWillBeSent(object sender, RequestWillBeSentEventArgs args) - { - _RequestWillBeSent?.Invoke(this, args); - } - - private CefSharp.IRegistration _ResourceChangedPriorityEventRegistration; - private System.EventHandler _ResourceChangedPriority; /// /// Fired when resource loading priority is changed /// @@ -36677,31 +36352,15 @@ namespace CefSharp.DevTools.Network { add { - if ((_ResourceChangedPriority) == (null)) - { - _ResourceChangedPriorityEventRegistration = (_client.RegisterEventHandler("Network.resourceChangedPriority", OnResourceChangedPriority)); - } - - _ResourceChangedPriority += (value); + _client.AddEventHandler("Network.resourceChangedPriority", value); } remove { - _ResourceChangedPriority -= (value); - if ((_ResourceChangedPriority) == (null)) - { - _ResourceChangedPriorityEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Network.resourceChangedPriority", value); } } - private void OnResourceChangedPriority(object sender, ResourceChangedPriorityEventArgs args) - { - _ResourceChangedPriority?.Invoke(this, args); - } - - private CefSharp.IRegistration _SignedExchangeReceivedEventRegistration; - private System.EventHandler _SignedExchangeReceived; /// /// Fired when a signed exchange was received over the network /// @@ -36709,31 +36368,15 @@ namespace CefSharp.DevTools.Network { add { - if ((_SignedExchangeReceived) == (null)) - { - _SignedExchangeReceivedEventRegistration = (_client.RegisterEventHandler("Network.signedExchangeReceived", OnSignedExchangeReceived)); - } - - _SignedExchangeReceived += (value); + _client.AddEventHandler("Network.signedExchangeReceived", value); } remove { - _SignedExchangeReceived -= (value); - if ((_SignedExchangeReceived) == (null)) - { - _SignedExchangeReceivedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Network.signedExchangeReceived", value); } } - private void OnSignedExchangeReceived(object sender, SignedExchangeReceivedEventArgs args) - { - _SignedExchangeReceived?.Invoke(this, args); - } - - private CefSharp.IRegistration _ResponseReceivedEventRegistration; - private System.EventHandler _ResponseReceived; /// /// Fired when HTTP response is available. /// @@ -36741,31 +36384,15 @@ namespace CefSharp.DevTools.Network { add { - if ((_ResponseReceived) == (null)) - { - _ResponseReceivedEventRegistration = (_client.RegisterEventHandler("Network.responseReceived", OnResponseReceived)); - } - - _ResponseReceived += (value); + _client.AddEventHandler("Network.responseReceived", value); } remove { - _ResponseReceived -= (value); - if ((_ResponseReceived) == (null)) - { - _ResponseReceivedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Network.responseReceived", value); } } - private void OnResponseReceived(object sender, ResponseReceivedEventArgs args) - { - _ResponseReceived?.Invoke(this, args); - } - - private CefSharp.IRegistration _WebSocketClosedEventRegistration; - private System.EventHandler _WebSocketClosed; /// /// Fired when WebSocket is closed. /// @@ -36773,31 +36400,15 @@ namespace CefSharp.DevTools.Network { add { - if ((_WebSocketClosed) == (null)) - { - _WebSocketClosedEventRegistration = (_client.RegisterEventHandler("Network.webSocketClosed", OnWebSocketClosed)); - } - - _WebSocketClosed += (value); + _client.AddEventHandler("Network.webSocketClosed", value); } remove { - _WebSocketClosed -= (value); - if ((_WebSocketClosed) == (null)) - { - _WebSocketClosedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Network.webSocketClosed", value); } } - private void OnWebSocketClosed(object sender, WebSocketClosedEventArgs args) - { - _WebSocketClosed?.Invoke(this, args); - } - - private CefSharp.IRegistration _WebSocketCreatedEventRegistration; - private System.EventHandler _WebSocketCreated; /// /// Fired upon WebSocket creation. /// @@ -36805,31 +36416,15 @@ namespace CefSharp.DevTools.Network { add { - if ((_WebSocketCreated) == (null)) - { - _WebSocketCreatedEventRegistration = (_client.RegisterEventHandler("Network.webSocketCreated", OnWebSocketCreated)); - } - - _WebSocketCreated += (value); + _client.AddEventHandler("Network.webSocketCreated", value); } remove { - _WebSocketCreated -= (value); - if ((_WebSocketCreated) == (null)) - { - _WebSocketCreatedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Network.webSocketCreated", value); } } - private void OnWebSocketCreated(object sender, WebSocketCreatedEventArgs args) - { - _WebSocketCreated?.Invoke(this, args); - } - - private CefSharp.IRegistration _WebSocketFrameErrorEventRegistration; - private System.EventHandler _WebSocketFrameError; /// /// Fired when WebSocket message error occurs. /// @@ -36837,31 +36432,15 @@ namespace CefSharp.DevTools.Network { add { - if ((_WebSocketFrameError) == (null)) - { - _WebSocketFrameErrorEventRegistration = (_client.RegisterEventHandler("Network.webSocketFrameError", OnWebSocketFrameError)); - } - - _WebSocketFrameError += (value); + _client.AddEventHandler("Network.webSocketFrameError", value); } remove { - _WebSocketFrameError -= (value); - if ((_WebSocketFrameError) == (null)) - { - _WebSocketFrameErrorEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Network.webSocketFrameError", value); } } - private void OnWebSocketFrameError(object sender, WebSocketFrameErrorEventArgs args) - { - _WebSocketFrameError?.Invoke(this, args); - } - - private CefSharp.IRegistration _WebSocketFrameReceivedEventRegistration; - private System.EventHandler _WebSocketFrameReceived; /// /// Fired when WebSocket message is received. /// @@ -36869,31 +36448,15 @@ namespace CefSharp.DevTools.Network { add { - if ((_WebSocketFrameReceived) == (null)) - { - _WebSocketFrameReceivedEventRegistration = (_client.RegisterEventHandler("Network.webSocketFrameReceived", OnWebSocketFrameReceived)); - } - - _WebSocketFrameReceived += (value); + _client.AddEventHandler("Network.webSocketFrameReceived", value); } remove { - _WebSocketFrameReceived -= (value); - if ((_WebSocketFrameReceived) == (null)) - { - _WebSocketFrameReceivedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Network.webSocketFrameReceived", value); } } - private void OnWebSocketFrameReceived(object sender, WebSocketFrameReceivedEventArgs args) - { - _WebSocketFrameReceived?.Invoke(this, args); - } - - private CefSharp.IRegistration _WebSocketFrameSentEventRegistration; - private System.EventHandler _WebSocketFrameSent; /// /// Fired when WebSocket message is sent. /// @@ -36901,31 +36464,15 @@ namespace CefSharp.DevTools.Network { add { - if ((_WebSocketFrameSent) == (null)) - { - _WebSocketFrameSentEventRegistration = (_client.RegisterEventHandler("Network.webSocketFrameSent", OnWebSocketFrameSent)); - } - - _WebSocketFrameSent += (value); + _client.AddEventHandler("Network.webSocketFrameSent", value); } remove { - _WebSocketFrameSent -= (value); - if ((_WebSocketFrameSent) == (null)) - { - _WebSocketFrameSentEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Network.webSocketFrameSent", value); } } - private void OnWebSocketFrameSent(object sender, WebSocketFrameSentEventArgs args) - { - _WebSocketFrameSent?.Invoke(this, args); - } - - private CefSharp.IRegistration _WebSocketHandshakeResponseReceivedEventRegistration; - private System.EventHandler _WebSocketHandshakeResponseReceived; /// /// Fired when WebSocket handshake response becomes available. /// @@ -36933,31 +36480,15 @@ namespace CefSharp.DevTools.Network { add { - if ((_WebSocketHandshakeResponseReceived) == (null)) - { - _WebSocketHandshakeResponseReceivedEventRegistration = (_client.RegisterEventHandler("Network.webSocketHandshakeResponseReceived", OnWebSocketHandshakeResponseReceived)); - } - - _WebSocketHandshakeResponseReceived += (value); + _client.AddEventHandler("Network.webSocketHandshakeResponseReceived", value); } remove { - _WebSocketHandshakeResponseReceived -= (value); - if ((_WebSocketHandshakeResponseReceived) == (null)) - { - _WebSocketHandshakeResponseReceivedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Network.webSocketHandshakeResponseReceived", value); } } - private void OnWebSocketHandshakeResponseReceived(object sender, WebSocketHandshakeResponseReceivedEventArgs args) - { - _WebSocketHandshakeResponseReceived?.Invoke(this, args); - } - - private CefSharp.IRegistration _WebSocketWillSendHandshakeRequestEventRegistration; - private System.EventHandler _WebSocketWillSendHandshakeRequest; /// /// Fired when WebSocket is about to initiate handshake. /// @@ -36965,31 +36496,15 @@ namespace CefSharp.DevTools.Network { add { - if ((_WebSocketWillSendHandshakeRequest) == (null)) - { - _WebSocketWillSendHandshakeRequestEventRegistration = (_client.RegisterEventHandler("Network.webSocketWillSendHandshakeRequest", OnWebSocketWillSendHandshakeRequest)); - } - - _WebSocketWillSendHandshakeRequest += (value); + _client.AddEventHandler("Network.webSocketWillSendHandshakeRequest", value); } remove { - _WebSocketWillSendHandshakeRequest -= (value); - if ((_WebSocketWillSendHandshakeRequest) == (null)) - { - _WebSocketWillSendHandshakeRequestEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Network.webSocketWillSendHandshakeRequest", value); } } - private void OnWebSocketWillSendHandshakeRequest(object sender, WebSocketWillSendHandshakeRequestEventArgs args) - { - _WebSocketWillSendHandshakeRequest?.Invoke(this, args); - } - - private CefSharp.IRegistration _WebTransportCreatedEventRegistration; - private System.EventHandler _WebTransportCreated; /// /// Fired upon WebTransport creation. /// @@ -36997,31 +36512,15 @@ namespace CefSharp.DevTools.Network { add { - if ((_WebTransportCreated) == (null)) - { - _WebTransportCreatedEventRegistration = (_client.RegisterEventHandler("Network.webTransportCreated", OnWebTransportCreated)); - } - - _WebTransportCreated += (value); + _client.AddEventHandler("Network.webTransportCreated", value); } remove { - _WebTransportCreated -= (value); - if ((_WebTransportCreated) == (null)) - { - _WebTransportCreatedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Network.webTransportCreated", value); } } - private void OnWebTransportCreated(object sender, WebTransportCreatedEventArgs args) - { - _WebTransportCreated?.Invoke(this, args); - } - - private CefSharp.IRegistration _WebTransportConnectionEstablishedEventRegistration; - private System.EventHandler _WebTransportConnectionEstablished; /// /// Fired when WebTransport handshake is finished. /// @@ -37029,31 +36528,15 @@ namespace CefSharp.DevTools.Network { add { - if ((_WebTransportConnectionEstablished) == (null)) - { - _WebTransportConnectionEstablishedEventRegistration = (_client.RegisterEventHandler("Network.webTransportConnectionEstablished", OnWebTransportConnectionEstablished)); - } - - _WebTransportConnectionEstablished += (value); + _client.AddEventHandler("Network.webTransportConnectionEstablished", value); } remove { - _WebTransportConnectionEstablished -= (value); - if ((_WebTransportConnectionEstablished) == (null)) - { - _WebTransportConnectionEstablishedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Network.webTransportConnectionEstablished", value); } } - private void OnWebTransportConnectionEstablished(object sender, WebTransportConnectionEstablishedEventArgs args) - { - _WebTransportConnectionEstablished?.Invoke(this, args); - } - - private CefSharp.IRegistration _WebTransportClosedEventRegistration; - private System.EventHandler _WebTransportClosed; /// /// Fired when WebTransport is disposed. /// @@ -37061,31 +36544,15 @@ namespace CefSharp.DevTools.Network { add { - if ((_WebTransportClosed) == (null)) - { - _WebTransportClosedEventRegistration = (_client.RegisterEventHandler("Network.webTransportClosed", OnWebTransportClosed)); - } - - _WebTransportClosed += (value); + _client.AddEventHandler("Network.webTransportClosed", value); } remove { - _WebTransportClosed -= (value); - if ((_WebTransportClosed) == (null)) - { - _WebTransportClosedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Network.webTransportClosed", value); } } - private void OnWebTransportClosed(object sender, WebTransportClosedEventArgs args) - { - _WebTransportClosed?.Invoke(this, args); - } - - private CefSharp.IRegistration _RequestWillBeSentExtraInfoEventRegistration; - private System.EventHandler _RequestWillBeSentExtraInfo; /// /// Fired when additional information about a requestWillBeSent event is available from the /// network stack. Not every requestWillBeSent event will have an additional @@ -37096,31 +36563,15 @@ namespace CefSharp.DevTools.Network { add { - if ((_RequestWillBeSentExtraInfo) == (null)) - { - _RequestWillBeSentExtraInfoEventRegistration = (_client.RegisterEventHandler("Network.requestWillBeSentExtraInfo", OnRequestWillBeSentExtraInfo)); - } - - _RequestWillBeSentExtraInfo += (value); + _client.AddEventHandler("Network.requestWillBeSentExtraInfo", value); } remove { - _RequestWillBeSentExtraInfo -= (value); - if ((_RequestWillBeSentExtraInfo) == (null)) - { - _RequestWillBeSentExtraInfoEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Network.requestWillBeSentExtraInfo", value); } } - private void OnRequestWillBeSentExtraInfo(object sender, RequestWillBeSentExtraInfoEventArgs args) - { - _RequestWillBeSentExtraInfo?.Invoke(this, args); - } - - private CefSharp.IRegistration _ResponseReceivedExtraInfoEventRegistration; - private System.EventHandler _ResponseReceivedExtraInfo; /// /// Fired when additional information about a responseReceived event is available from the network /// stack. Not every responseReceived event will have an additional responseReceivedExtraInfo for @@ -37130,31 +36581,15 @@ namespace CefSharp.DevTools.Network { add { - if ((_ResponseReceivedExtraInfo) == (null)) - { - _ResponseReceivedExtraInfoEventRegistration = (_client.RegisterEventHandler("Network.responseReceivedExtraInfo", OnResponseReceivedExtraInfo)); - } - - _ResponseReceivedExtraInfo += (value); + _client.AddEventHandler("Network.responseReceivedExtraInfo", value); } remove { - _ResponseReceivedExtraInfo -= (value); - if ((_ResponseReceivedExtraInfo) == (null)) - { - _ResponseReceivedExtraInfoEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Network.responseReceivedExtraInfo", value); } } - private void OnResponseReceivedExtraInfo(object sender, ResponseReceivedExtraInfoEventArgs args) - { - _ResponseReceivedExtraInfo?.Invoke(this, args); - } - - private CefSharp.IRegistration _TrustTokenOperationDoneEventRegistration; - private System.EventHandler _TrustTokenOperationDone; /// /// Fired exactly once for each Trust Token operation. Depending on /// the type of the operation and whether the operation succeeded or @@ -37165,29 +36600,15 @@ namespace CefSharp.DevTools.Network { add { - if ((_TrustTokenOperationDone) == (null)) - { - _TrustTokenOperationDoneEventRegistration = (_client.RegisterEventHandler("Network.trustTokenOperationDone", OnTrustTokenOperationDone)); - } - - _TrustTokenOperationDone += (value); + _client.AddEventHandler("Network.trustTokenOperationDone", value); } remove { - _TrustTokenOperationDone -= (value); - if ((_TrustTokenOperationDone) == (null)) - { - _TrustTokenOperationDoneEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Network.trustTokenOperationDone", value); } } - private void OnTrustTokenOperationDone(object sender, TrustTokenOperationDoneEventArgs args) - { - _TrustTokenOperationDone?.Invoke(this, args); - } - partial void ValidateSetAcceptedEncodings(CefSharp.DevTools.Network.ContentEncoding[] encodings); /// /// Sets a list of content encodings that will be accepted. Empty list means no encoding is accepted. @@ -37832,8 +37253,6 @@ namespace CefSharp.DevTools.Overlay _client = (client); } - private CefSharp.IRegistration _InspectNodeRequestedEventRegistration; - private System.EventHandler _InspectNodeRequested; /// /// Fired when the node should be inspected. This happens after call to `setInspectMode` or when /// user manually inspects an element. @@ -37842,31 +37261,15 @@ namespace CefSharp.DevTools.Overlay { add { - if ((_InspectNodeRequested) == (null)) - { - _InspectNodeRequestedEventRegistration = (_client.RegisterEventHandler("Overlay.inspectNodeRequested", OnInspectNodeRequested)); - } - - _InspectNodeRequested += (value); + _client.AddEventHandler("Overlay.inspectNodeRequested", value); } remove { - _InspectNodeRequested -= (value); - if ((_InspectNodeRequested) == (null)) - { - _InspectNodeRequestedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Overlay.inspectNodeRequested", value); } } - private void OnInspectNodeRequested(object sender, InspectNodeRequestedEventArgs args) - { - _InspectNodeRequested?.Invoke(this, args); - } - - private CefSharp.IRegistration _NodeHighlightRequestedEventRegistration; - private System.EventHandler _NodeHighlightRequested; /// /// Fired when the node should be highlighted. This happens after call to `setInspectMode`. /// @@ -37874,31 +37277,15 @@ namespace CefSharp.DevTools.Overlay { add { - if ((_NodeHighlightRequested) == (null)) - { - _NodeHighlightRequestedEventRegistration = (_client.RegisterEventHandler("Overlay.nodeHighlightRequested", OnNodeHighlightRequested)); - } - - _NodeHighlightRequested += (value); + _client.AddEventHandler("Overlay.nodeHighlightRequested", value); } remove { - _NodeHighlightRequested -= (value); - if ((_NodeHighlightRequested) == (null)) - { - _NodeHighlightRequestedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Overlay.nodeHighlightRequested", value); } } - private void OnNodeHighlightRequested(object sender, NodeHighlightRequestedEventArgs args) - { - _NodeHighlightRequested?.Invoke(this, args); - } - - private CefSharp.IRegistration _ScreenshotRequestedEventRegistration; - private System.EventHandler _ScreenshotRequested; /// /// Fired when user asks to capture screenshot of some area on the page. /// @@ -37906,61 +37293,31 @@ namespace CefSharp.DevTools.Overlay { add { - if ((_ScreenshotRequested) == (null)) - { - _ScreenshotRequestedEventRegistration = (_client.RegisterEventHandler("Overlay.screenshotRequested", OnScreenshotRequested)); - } - - _ScreenshotRequested += (value); + _client.AddEventHandler("Overlay.screenshotRequested", value); } remove { - _ScreenshotRequested -= (value); - if ((_ScreenshotRequested) == (null)) - { - _ScreenshotRequestedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Overlay.screenshotRequested", value); } } - private void OnScreenshotRequested(object sender, ScreenshotRequestedEventArgs args) - { - _ScreenshotRequested?.Invoke(this, args); - } - - private CefSharp.IRegistration _InspectModeCanceledEventRegistration; - private System.EventHandler _InspectModeCanceled; /// /// Fired when user cancels the inspect mode. /// - public event System.EventHandler InspectModeCanceled + public event System.EventHandler InspectModeCanceled { add { - if ((_InspectModeCanceled) == (null)) - { - _InspectModeCanceledEventRegistration = (_client.RegisterEventHandler("Overlay.inspectModeCanceled", OnInspectModeCanceled)); - } - - _InspectModeCanceled += (value); + _client.AddEventHandler("Overlay.inspectModeCanceled", value); } remove { - _InspectModeCanceled -= (value); - if ((_InspectModeCanceled) == (null)) - { - _InspectModeCanceledEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Overlay.inspectModeCanceled", value); } } - private void OnInspectModeCanceled(object sender, CefSharp.DevTools.DevToolsEventArgs args) - { - _InspectModeCanceled?.Invoke(this, args); - } - /// /// Disables domain notifications. /// @@ -39221,8 +38578,6 @@ namespace CefSharp.DevTools.Page _client = (client); } - private CefSharp.IRegistration _DomContentEventFiredEventRegistration; - private System.EventHandler _DomContentEventFired; /// /// DomContentEventFired /// @@ -39230,31 +38585,15 @@ namespace CefSharp.DevTools.Page { add { - if ((_DomContentEventFired) == (null)) - { - _DomContentEventFiredEventRegistration = (_client.RegisterEventHandler("Page.domContentEventFired", OnDomContentEventFired)); - } - - _DomContentEventFired += (value); + _client.AddEventHandler("Page.domContentEventFired", value); } remove { - _DomContentEventFired -= (value); - if ((_DomContentEventFired) == (null)) - { - _DomContentEventFiredEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Page.domContentEventFired", value); } } - private void OnDomContentEventFired(object sender, DomContentEventFiredEventArgs args) - { - _DomContentEventFired?.Invoke(this, args); - } - - private CefSharp.IRegistration _FileChooserOpenedEventRegistration; - private System.EventHandler _FileChooserOpened; /// /// Emitted only when `page.interceptFileChooser` is enabled. /// @@ -39262,31 +38601,15 @@ namespace CefSharp.DevTools.Page { add { - if ((_FileChooserOpened) == (null)) - { - _FileChooserOpenedEventRegistration = (_client.RegisterEventHandler("Page.fileChooserOpened", OnFileChooserOpened)); - } - - _FileChooserOpened += (value); + _client.AddEventHandler("Page.fileChooserOpened", value); } remove { - _FileChooserOpened -= (value); - if ((_FileChooserOpened) == (null)) - { - _FileChooserOpenedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Page.fileChooserOpened", value); } } - private void OnFileChooserOpened(object sender, FileChooserOpenedEventArgs args) - { - _FileChooserOpened?.Invoke(this, args); - } - - private CefSharp.IRegistration _FrameAttachedEventRegistration; - private System.EventHandler _FrameAttached; /// /// Fired when frame has been attached to its parent. /// @@ -39294,31 +38617,15 @@ namespace CefSharp.DevTools.Page { add { - if ((_FrameAttached) == (null)) - { - _FrameAttachedEventRegistration = (_client.RegisterEventHandler("Page.frameAttached", OnFrameAttached)); - } - - _FrameAttached += (value); + _client.AddEventHandler("Page.frameAttached", value); } remove { - _FrameAttached -= (value); - if ((_FrameAttached) == (null)) - { - _FrameAttachedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Page.frameAttached", value); } } - private void OnFrameAttached(object sender, FrameAttachedEventArgs args) - { - _FrameAttached?.Invoke(this, args); - } - - private CefSharp.IRegistration _FrameDetachedEventRegistration; - private System.EventHandler _FrameDetached; /// /// Fired when frame has been detached from its parent. /// @@ -39326,31 +38633,15 @@ namespace CefSharp.DevTools.Page { add { - if ((_FrameDetached) == (null)) - { - _FrameDetachedEventRegistration = (_client.RegisterEventHandler("Page.frameDetached", OnFrameDetached)); - } - - _FrameDetached += (value); + _client.AddEventHandler("Page.frameDetached", value); } remove { - _FrameDetached -= (value); - if ((_FrameDetached) == (null)) - { - _FrameDetachedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Page.frameDetached", value); } } - private void OnFrameDetached(object sender, FrameDetachedEventArgs args) - { - _FrameDetached?.Invoke(this, args); - } - - private CefSharp.IRegistration _FrameNavigatedEventRegistration; - private System.EventHandler _FrameNavigated; /// /// Fired once navigation of the frame has completed. Frame is now associated with the new loader. /// @@ -39358,31 +38649,15 @@ namespace CefSharp.DevTools.Page { add { - if ((_FrameNavigated) == (null)) - { - _FrameNavigatedEventRegistration = (_client.RegisterEventHandler("Page.frameNavigated", OnFrameNavigated)); - } - - _FrameNavigated += (value); + _client.AddEventHandler("Page.frameNavigated", value); } remove { - _FrameNavigated -= (value); - if ((_FrameNavigated) == (null)) - { - _FrameNavigatedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Page.frameNavigated", value); } } - private void OnFrameNavigated(object sender, FrameNavigatedEventArgs args) - { - _FrameNavigated?.Invoke(this, args); - } - - private CefSharp.IRegistration _DocumentOpenedEventRegistration; - private System.EventHandler _DocumentOpened; /// /// Fired when opening document to write to. /// @@ -39390,63 +38665,31 @@ namespace CefSharp.DevTools.Page { add { - if ((_DocumentOpened) == (null)) - { - _DocumentOpenedEventRegistration = (_client.RegisterEventHandler("Page.documentOpened", OnDocumentOpened)); - } - - _DocumentOpened += (value); + _client.AddEventHandler("Page.documentOpened", value); } remove { - _DocumentOpened -= (value); - if ((_DocumentOpened) == (null)) - { - _DocumentOpenedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Page.documentOpened", value); } } - private void OnDocumentOpened(object sender, DocumentOpenedEventArgs args) - { - _DocumentOpened?.Invoke(this, args); - } - - private CefSharp.IRegistration _FrameResizedEventRegistration; - private System.EventHandler _FrameResized; /// /// FrameResized /// - public event System.EventHandler FrameResized + public event System.EventHandler FrameResized { add { - if ((_FrameResized) == (null)) - { - _FrameResizedEventRegistration = (_client.RegisterEventHandler("Page.frameResized", OnFrameResized)); - } - - _FrameResized += (value); + _client.AddEventHandler("Page.frameResized", value); } remove { - _FrameResized -= (value); - if ((_FrameResized) == (null)) - { - _FrameResizedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Page.frameResized", value); } } - private void OnFrameResized(object sender, CefSharp.DevTools.DevToolsEventArgs args) - { - _FrameResized?.Invoke(this, args); - } - - private CefSharp.IRegistration _FrameRequestedNavigationEventRegistration; - private System.EventHandler _FrameRequestedNavigation; /// /// Fired when a renderer-initiated navigation is requested. /// Navigation may still be cancelled after the event is issued. @@ -39455,31 +38698,15 @@ namespace CefSharp.DevTools.Page { add { - if ((_FrameRequestedNavigation) == (null)) - { - _FrameRequestedNavigationEventRegistration = (_client.RegisterEventHandler("Page.frameRequestedNavigation", OnFrameRequestedNavigation)); - } - - _FrameRequestedNavigation += (value); + _client.AddEventHandler("Page.frameRequestedNavigation", value); } remove { - _FrameRequestedNavigation -= (value); - if ((_FrameRequestedNavigation) == (null)) - { - _FrameRequestedNavigationEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Page.frameRequestedNavigation", value); } } - private void OnFrameRequestedNavigation(object sender, FrameRequestedNavigationEventArgs args) - { - _FrameRequestedNavigation?.Invoke(this, args); - } - - private CefSharp.IRegistration _FrameStartedLoadingEventRegistration; - private System.EventHandler _FrameStartedLoading; /// /// Fired when frame has started loading. /// @@ -39487,31 +38714,15 @@ namespace CefSharp.DevTools.Page { add { - if ((_FrameStartedLoading) == (null)) - { - _FrameStartedLoadingEventRegistration = (_client.RegisterEventHandler("Page.frameStartedLoading", OnFrameStartedLoading)); - } - - _FrameStartedLoading += (value); + _client.AddEventHandler("Page.frameStartedLoading", value); } remove { - _FrameStartedLoading -= (value); - if ((_FrameStartedLoading) == (null)) - { - _FrameStartedLoadingEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Page.frameStartedLoading", value); } } - private void OnFrameStartedLoading(object sender, FrameStartedLoadingEventArgs args) - { - _FrameStartedLoading?.Invoke(this, args); - } - - private CefSharp.IRegistration _FrameStoppedLoadingEventRegistration; - private System.EventHandler _FrameStoppedLoading; /// /// Fired when frame has stopped loading. /// @@ -39519,95 +38730,47 @@ namespace CefSharp.DevTools.Page { add { - if ((_FrameStoppedLoading) == (null)) - { - _FrameStoppedLoadingEventRegistration = (_client.RegisterEventHandler("Page.frameStoppedLoading", OnFrameStoppedLoading)); - } - - _FrameStoppedLoading += (value); + _client.AddEventHandler("Page.frameStoppedLoading", value); } remove { - _FrameStoppedLoading -= (value); - if ((_FrameStoppedLoading) == (null)) - { - _FrameStoppedLoadingEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Page.frameStoppedLoading", value); } } - private void OnFrameStoppedLoading(object sender, FrameStoppedLoadingEventArgs args) - { - _FrameStoppedLoading?.Invoke(this, args); - } - - private CefSharp.IRegistration _InterstitialHiddenEventRegistration; - private System.EventHandler _InterstitialHidden; /// /// Fired when interstitial page was hidden /// - public event System.EventHandler InterstitialHidden + public event System.EventHandler InterstitialHidden { add { - if ((_InterstitialHidden) == (null)) - { - _InterstitialHiddenEventRegistration = (_client.RegisterEventHandler("Page.interstitialHidden", OnInterstitialHidden)); - } - - _InterstitialHidden += (value); + _client.AddEventHandler("Page.interstitialHidden", value); } remove { - _InterstitialHidden -= (value); - if ((_InterstitialHidden) == (null)) - { - _InterstitialHiddenEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Page.interstitialHidden", value); } } - private void OnInterstitialHidden(object sender, CefSharp.DevTools.DevToolsEventArgs args) - { - _InterstitialHidden?.Invoke(this, args); - } - - private CefSharp.IRegistration _InterstitialShownEventRegistration; - private System.EventHandler _InterstitialShown; /// /// Fired when interstitial page was shown /// - public event System.EventHandler InterstitialShown + public event System.EventHandler InterstitialShown { add { - if ((_InterstitialShown) == (null)) - { - _InterstitialShownEventRegistration = (_client.RegisterEventHandler("Page.interstitialShown", OnInterstitialShown)); - } - - _InterstitialShown += (value); + _client.AddEventHandler("Page.interstitialShown", value); } remove { - _InterstitialShown -= (value); - if ((_InterstitialShown) == (null)) - { - _InterstitialShownEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Page.interstitialShown", value); } } - private void OnInterstitialShown(object sender, CefSharp.DevTools.DevToolsEventArgs args) - { - _InterstitialShown?.Invoke(this, args); - } - - private CefSharp.IRegistration _JavascriptDialogClosedEventRegistration; - private System.EventHandler _JavascriptDialogClosed; /// /// Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) has been /// closed. @@ -39616,31 +38779,15 @@ namespace CefSharp.DevTools.Page { add { - if ((_JavascriptDialogClosed) == (null)) - { - _JavascriptDialogClosedEventRegistration = (_client.RegisterEventHandler("Page.javascriptDialogClosed", OnJavascriptDialogClosed)); - } - - _JavascriptDialogClosed += (value); + _client.AddEventHandler("Page.javascriptDialogClosed", value); } remove { - _JavascriptDialogClosed -= (value); - if ((_JavascriptDialogClosed) == (null)) - { - _JavascriptDialogClosedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Page.javascriptDialogClosed", value); } } - private void OnJavascriptDialogClosed(object sender, JavascriptDialogClosedEventArgs args) - { - _JavascriptDialogClosed?.Invoke(this, args); - } - - private CefSharp.IRegistration _JavascriptDialogOpeningEventRegistration; - private System.EventHandler _JavascriptDialogOpening; /// /// Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) is about to /// open. @@ -39649,31 +38796,15 @@ namespace CefSharp.DevTools.Page { add { - if ((_JavascriptDialogOpening) == (null)) - { - _JavascriptDialogOpeningEventRegistration = (_client.RegisterEventHandler("Page.javascriptDialogOpening", OnJavascriptDialogOpening)); - } - - _JavascriptDialogOpening += (value); + _client.AddEventHandler("Page.javascriptDialogOpening", value); } remove { - _JavascriptDialogOpening -= (value); - if ((_JavascriptDialogOpening) == (null)) - { - _JavascriptDialogOpeningEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Page.javascriptDialogOpening", value); } } - private void OnJavascriptDialogOpening(object sender, JavascriptDialogOpeningEventArgs args) - { - _JavascriptDialogOpening?.Invoke(this, args); - } - - private CefSharp.IRegistration _LifecycleEventEventRegistration; - private System.EventHandler _LifecycleEvent; /// /// Fired for top level page lifecycle events such as navigation, load, paint, etc. /// @@ -39681,31 +38812,15 @@ namespace CefSharp.DevTools.Page { add { - if ((_LifecycleEvent) == (null)) - { - _LifecycleEventEventRegistration = (_client.RegisterEventHandler("Page.lifecycleEvent", OnLifecycleEvent)); - } - - _LifecycleEvent += (value); + _client.AddEventHandler("Page.lifecycleEvent", value); } remove { - _LifecycleEvent -= (value); - if ((_LifecycleEvent) == (null)) - { - _LifecycleEventEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Page.lifecycleEvent", value); } } - private void OnLifecycleEvent(object sender, LifecycleEventEventArgs args) - { - _LifecycleEvent?.Invoke(this, args); - } - - private CefSharp.IRegistration _BackForwardCacheNotUsedEventRegistration; - private System.EventHandler _BackForwardCacheNotUsed; /// /// Fired for failed bfcache history navigations if BackForwardCache feature is enabled. Do /// not assume any ordering with the Page.frameNavigated event. This event is fired only for @@ -39716,31 +38831,15 @@ namespace CefSharp.DevTools.Page { add { - if ((_BackForwardCacheNotUsed) == (null)) - { - _BackForwardCacheNotUsedEventRegistration = (_client.RegisterEventHandler("Page.backForwardCacheNotUsed", OnBackForwardCacheNotUsed)); - } - - _BackForwardCacheNotUsed += (value); + _client.AddEventHandler("Page.backForwardCacheNotUsed", value); } remove { - _BackForwardCacheNotUsed -= (value); - if ((_BackForwardCacheNotUsed) == (null)) - { - _BackForwardCacheNotUsedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Page.backForwardCacheNotUsed", value); } } - private void OnBackForwardCacheNotUsed(object sender, BackForwardCacheNotUsedEventArgs args) - { - _BackForwardCacheNotUsed?.Invoke(this, args); - } - - private CefSharp.IRegistration _LoadEventFiredEventRegistration; - private System.EventHandler _LoadEventFired; /// /// LoadEventFired /// @@ -39748,31 +38847,15 @@ namespace CefSharp.DevTools.Page { add { - if ((_LoadEventFired) == (null)) - { - _LoadEventFiredEventRegistration = (_client.RegisterEventHandler("Page.loadEventFired", OnLoadEventFired)); - } - - _LoadEventFired += (value); + _client.AddEventHandler("Page.loadEventFired", value); } remove { - _LoadEventFired -= (value); - if ((_LoadEventFired) == (null)) - { - _LoadEventFiredEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Page.loadEventFired", value); } } - private void OnLoadEventFired(object sender, LoadEventFiredEventArgs args) - { - _LoadEventFired?.Invoke(this, args); - } - - private CefSharp.IRegistration _NavigatedWithinDocumentEventRegistration; - private System.EventHandler _NavigatedWithinDocument; /// /// Fired when same-document navigation happens, e.g. due to history API usage or anchor navigation. /// @@ -39780,31 +38863,15 @@ namespace CefSharp.DevTools.Page { add { - if ((_NavigatedWithinDocument) == (null)) - { - _NavigatedWithinDocumentEventRegistration = (_client.RegisterEventHandler("Page.navigatedWithinDocument", OnNavigatedWithinDocument)); - } - - _NavigatedWithinDocument += (value); + _client.AddEventHandler("Page.navigatedWithinDocument", value); } remove { - _NavigatedWithinDocument -= (value); - if ((_NavigatedWithinDocument) == (null)) - { - _NavigatedWithinDocumentEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Page.navigatedWithinDocument", value); } } - private void OnNavigatedWithinDocument(object sender, NavigatedWithinDocumentEventArgs args) - { - _NavigatedWithinDocument?.Invoke(this, args); - } - - private CefSharp.IRegistration _ScreencastFrameEventRegistration; - private System.EventHandler _ScreencastFrame; /// /// Compressed image data requested by the `startScreencast`. /// @@ -39812,31 +38879,15 @@ namespace CefSharp.DevTools.Page { add { - if ((_ScreencastFrame) == (null)) - { - _ScreencastFrameEventRegistration = (_client.RegisterEventHandler("Page.screencastFrame", OnScreencastFrame)); - } - - _ScreencastFrame += (value); + _client.AddEventHandler("Page.screencastFrame", value); } remove { - _ScreencastFrame -= (value); - if ((_ScreencastFrame) == (null)) - { - _ScreencastFrameEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Page.screencastFrame", value); } } - private void OnScreencastFrame(object sender, ScreencastFrameEventArgs args) - { - _ScreencastFrame?.Invoke(this, args); - } - - private CefSharp.IRegistration _ScreencastVisibilityChangedEventRegistration; - private System.EventHandler _ScreencastVisibilityChanged; /// /// Fired when the page with currently enabled screencast was shown or hidden `. /// @@ -39844,31 +38895,15 @@ namespace CefSharp.DevTools.Page { add { - if ((_ScreencastVisibilityChanged) == (null)) - { - _ScreencastVisibilityChangedEventRegistration = (_client.RegisterEventHandler("Page.screencastVisibilityChanged", OnScreencastVisibilityChanged)); - } - - _ScreencastVisibilityChanged += (value); + _client.AddEventHandler("Page.screencastVisibilityChanged", value); } remove { - _ScreencastVisibilityChanged -= (value); - if ((_ScreencastVisibilityChanged) == (null)) - { - _ScreencastVisibilityChangedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Page.screencastVisibilityChanged", value); } } - private void OnScreencastVisibilityChanged(object sender, ScreencastVisibilityChangedEventArgs args) - { - _ScreencastVisibilityChanged?.Invoke(this, args); - } - - private CefSharp.IRegistration _WindowOpenEventRegistration; - private System.EventHandler _WindowOpen; /// /// Fired when a new window is going to be opened, via window.open(), link click, form submission, /// etc. @@ -39877,31 +38912,15 @@ namespace CefSharp.DevTools.Page { add { - if ((_WindowOpen) == (null)) - { - _WindowOpenEventRegistration = (_client.RegisterEventHandler("Page.windowOpen", OnWindowOpen)); - } - - _WindowOpen += (value); + _client.AddEventHandler("Page.windowOpen", value); } remove { - _WindowOpen -= (value); - if ((_WindowOpen) == (null)) - { - _WindowOpenEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Page.windowOpen", value); } } - private void OnWindowOpen(object sender, WindowOpenEventArgs args) - { - _WindowOpen?.Invoke(this, args); - } - - private CefSharp.IRegistration _CompilationCacheProducedEventRegistration; - private System.EventHandler _CompilationCacheProduced; /// /// Issued for every compilation cache generated. Is only available /// if Page.setGenerateCompilationCache is enabled. @@ -39910,29 +38929,15 @@ namespace CefSharp.DevTools.Page { add { - if ((_CompilationCacheProduced) == (null)) - { - _CompilationCacheProducedEventRegistration = (_client.RegisterEventHandler("Page.compilationCacheProduced", OnCompilationCacheProduced)); - } - - _CompilationCacheProduced += (value); + _client.AddEventHandler("Page.compilationCacheProduced", value); } remove { - _CompilationCacheProduced -= (value); - if ((_CompilationCacheProduced) == (null)) - { - _CompilationCacheProducedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Page.compilationCacheProduced", value); } } - private void OnCompilationCacheProduced(object sender, CompilationCacheProducedEventArgs args) - { - _CompilationCacheProduced?.Invoke(this, args); - } - partial void ValidateAddScriptToEvaluateOnNewDocument(string source, string worldName = null, bool? includeCommandLineAPI = null); /// /// Evaluates given script in every frame upon creation (before loading frame's scripts). @@ -40808,8 +39813,6 @@ namespace CefSharp.DevTools.Performance _client = (client); } - private CefSharp.IRegistration _MetricsEventRegistration; - private System.EventHandler _Metrics; /// /// Current values of the metrics. /// @@ -40817,29 +39820,15 @@ namespace CefSharp.DevTools.Performance { add { - if ((_Metrics) == (null)) - { - _MetricsEventRegistration = (_client.RegisterEventHandler("Performance.metrics", OnMetrics)); - } - - _Metrics += (value); + _client.AddEventHandler("Performance.metrics", value); } remove { - _Metrics -= (value); - if ((_Metrics) == (null)) - { - _MetricsEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Performance.metrics", value); } } - private void OnMetrics(object sender, MetricsEventArgs args) - { - _Metrics?.Invoke(this, args); - } - /// /// Disable collecting and reporting metrics. /// @@ -40900,8 +39889,6 @@ namespace CefSharp.DevTools.PerformanceTimeline _client = (client); } - private CefSharp.IRegistration _TimelineEventAddedEventRegistration; - private System.EventHandler _TimelineEventAdded; /// /// Sent when a performance timeline event is added. See reportPerformanceTimeline method. /// @@ -40909,29 +39896,15 @@ namespace CefSharp.DevTools.PerformanceTimeline { add { - if ((_TimelineEventAdded) == (null)) - { - _TimelineEventAddedEventRegistration = (_client.RegisterEventHandler("PerformanceTimeline.timelineEventAdded", OnTimelineEventAdded)); - } - - _TimelineEventAdded += (value); + _client.AddEventHandler("PerformanceTimeline.timelineEventAdded", value); } remove { - _TimelineEventAdded -= (value); - if ((_TimelineEventAdded) == (null)) - { - _TimelineEventAddedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("PerformanceTimeline.timelineEventAdded", value); } } - private void OnTimelineEventAdded(object sender, TimelineEventAddedEventArgs args) - { - _TimelineEventAdded?.Invoke(this, args); - } - partial void ValidateEnable(string[] eventTypes); /// /// Previously buffered events would be reported before method returns. @@ -40968,8 +39941,6 @@ namespace CefSharp.DevTools.Security _client = (client); } - private CefSharp.IRegistration _VisibleSecurityStateChangedEventRegistration; - private System.EventHandler _VisibleSecurityStateChanged; /// /// The security state of the page changed. /// @@ -40977,31 +39948,15 @@ namespace CefSharp.DevTools.Security { add { - if ((_VisibleSecurityStateChanged) == (null)) - { - _VisibleSecurityStateChangedEventRegistration = (_client.RegisterEventHandler("Security.visibleSecurityStateChanged", OnVisibleSecurityStateChanged)); - } - - _VisibleSecurityStateChanged += (value); + _client.AddEventHandler("Security.visibleSecurityStateChanged", value); } remove { - _VisibleSecurityStateChanged -= (value); - if ((_VisibleSecurityStateChanged) == (null)) - { - _VisibleSecurityStateChangedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Security.visibleSecurityStateChanged", value); } } - private void OnVisibleSecurityStateChanged(object sender, VisibleSecurityStateChangedEventArgs args) - { - _VisibleSecurityStateChanged?.Invoke(this, args); - } - - private CefSharp.IRegistration _SecurityStateChangedEventRegistration; - private System.EventHandler _SecurityStateChanged; /// /// The security state of the page changed. /// @@ -41009,29 +39964,15 @@ namespace CefSharp.DevTools.Security { add { - if ((_SecurityStateChanged) == (null)) - { - _SecurityStateChangedEventRegistration = (_client.RegisterEventHandler("Security.securityStateChanged", OnSecurityStateChanged)); - } - - _SecurityStateChanged += (value); + _client.AddEventHandler("Security.securityStateChanged", value); } remove { - _SecurityStateChanged -= (value); - if ((_SecurityStateChanged) == (null)) - { - _SecurityStateChangedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Security.securityStateChanged", value); } } - private void OnSecurityStateChanged(object sender, SecurityStateChangedEventArgs args) - { - _SecurityStateChanged?.Invoke(this, args); - } - /// /// Disables tracking security state changes. /// @@ -41087,8 +40028,6 @@ namespace CefSharp.DevTools.ServiceWorker _client = (client); } - private CefSharp.IRegistration _WorkerErrorReportedEventRegistration; - private System.EventHandler _WorkerErrorReported; /// /// WorkerErrorReported /// @@ -41096,31 +40035,15 @@ namespace CefSharp.DevTools.ServiceWorker { add { - if ((_WorkerErrorReported) == (null)) - { - _WorkerErrorReportedEventRegistration = (_client.RegisterEventHandler("ServiceWorker.workerErrorReported", OnWorkerErrorReported)); - } - - _WorkerErrorReported += (value); + _client.AddEventHandler("ServiceWorker.workerErrorReported", value); } remove { - _WorkerErrorReported -= (value); - if ((_WorkerErrorReported) == (null)) - { - _WorkerErrorReportedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("ServiceWorker.workerErrorReported", value); } } - private void OnWorkerErrorReported(object sender, WorkerErrorReportedEventArgs args) - { - _WorkerErrorReported?.Invoke(this, args); - } - - private CefSharp.IRegistration _WorkerRegistrationUpdatedEventRegistration; - private System.EventHandler _WorkerRegistrationUpdated; /// /// WorkerRegistrationUpdated /// @@ -41128,31 +40051,15 @@ namespace CefSharp.DevTools.ServiceWorker { add { - if ((_WorkerRegistrationUpdated) == (null)) - { - _WorkerRegistrationUpdatedEventRegistration = (_client.RegisterEventHandler("ServiceWorker.workerRegistrationUpdated", OnWorkerRegistrationUpdated)); - } - - _WorkerRegistrationUpdated += (value); + _client.AddEventHandler("ServiceWorker.workerRegistrationUpdated", value); } remove { - _WorkerRegistrationUpdated -= (value); - if ((_WorkerRegistrationUpdated) == (null)) - { - _WorkerRegistrationUpdatedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("ServiceWorker.workerRegistrationUpdated", value); } } - private void OnWorkerRegistrationUpdated(object sender, WorkerRegistrationUpdatedEventArgs args) - { - _WorkerRegistrationUpdated?.Invoke(this, args); - } - - private CefSharp.IRegistration _WorkerVersionUpdatedEventRegistration; - private System.EventHandler _WorkerVersionUpdated; /// /// WorkerVersionUpdated /// @@ -41160,29 +40067,15 @@ namespace CefSharp.DevTools.ServiceWorker { add { - if ((_WorkerVersionUpdated) == (null)) - { - _WorkerVersionUpdatedEventRegistration = (_client.RegisterEventHandler("ServiceWorker.workerVersionUpdated", OnWorkerVersionUpdated)); - } - - _WorkerVersionUpdated += (value); + _client.AddEventHandler("ServiceWorker.workerVersionUpdated", value); } remove { - _WorkerVersionUpdated -= (value); - if ((_WorkerVersionUpdated) == (null)) - { - _WorkerVersionUpdatedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("ServiceWorker.workerVersionUpdated", value); } } - private void OnWorkerVersionUpdated(object sender, WorkerVersionUpdatedEventArgs args) - { - _WorkerVersionUpdated?.Invoke(this, args); - } - partial void ValidateDeliverPushMessage(string origin, string registrationId, string data); /// /// DeliverPushMessage @@ -41554,8 +40447,6 @@ namespace CefSharp.DevTools.Storage _client = (client); } - private CefSharp.IRegistration _CacheStorageContentUpdatedEventRegistration; - private System.EventHandler _CacheStorageContentUpdated; /// /// A cache's contents have been modified. /// @@ -41563,31 +40454,15 @@ namespace CefSharp.DevTools.Storage { add { - if ((_CacheStorageContentUpdated) == (null)) - { - _CacheStorageContentUpdatedEventRegistration = (_client.RegisterEventHandler("Storage.cacheStorageContentUpdated", OnCacheStorageContentUpdated)); - } - - _CacheStorageContentUpdated += (value); + _client.AddEventHandler("Storage.cacheStorageContentUpdated", value); } remove { - _CacheStorageContentUpdated -= (value); - if ((_CacheStorageContentUpdated) == (null)) - { - _CacheStorageContentUpdatedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Storage.cacheStorageContentUpdated", value); } } - private void OnCacheStorageContentUpdated(object sender, CacheStorageContentUpdatedEventArgs args) - { - _CacheStorageContentUpdated?.Invoke(this, args); - } - - private CefSharp.IRegistration _CacheStorageListUpdatedEventRegistration; - private System.EventHandler _CacheStorageListUpdated; /// /// A cache has been added/deleted. /// @@ -41595,31 +40470,15 @@ namespace CefSharp.DevTools.Storage { add { - if ((_CacheStorageListUpdated) == (null)) - { - _CacheStorageListUpdatedEventRegistration = (_client.RegisterEventHandler("Storage.cacheStorageListUpdated", OnCacheStorageListUpdated)); - } - - _CacheStorageListUpdated += (value); + _client.AddEventHandler("Storage.cacheStorageListUpdated", value); } remove { - _CacheStorageListUpdated -= (value); - if ((_CacheStorageListUpdated) == (null)) - { - _CacheStorageListUpdatedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Storage.cacheStorageListUpdated", value); } } - private void OnCacheStorageListUpdated(object sender, CacheStorageListUpdatedEventArgs args) - { - _CacheStorageListUpdated?.Invoke(this, args); - } - - private CefSharp.IRegistration _IndexedDBContentUpdatedEventRegistration; - private System.EventHandler _IndexedDBContentUpdated; /// /// The origin's IndexedDB object store has been modified. /// @@ -41627,31 +40486,15 @@ namespace CefSharp.DevTools.Storage { add { - if ((_IndexedDBContentUpdated) == (null)) - { - _IndexedDBContentUpdatedEventRegistration = (_client.RegisterEventHandler("Storage.indexedDBContentUpdated", OnIndexedDBContentUpdated)); - } - - _IndexedDBContentUpdated += (value); + _client.AddEventHandler("Storage.indexedDBContentUpdated", value); } remove { - _IndexedDBContentUpdated -= (value); - if ((_IndexedDBContentUpdated) == (null)) - { - _IndexedDBContentUpdatedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Storage.indexedDBContentUpdated", value); } } - private void OnIndexedDBContentUpdated(object sender, IndexedDBContentUpdatedEventArgs args) - { - _IndexedDBContentUpdated?.Invoke(this, args); - } - - private CefSharp.IRegistration _IndexedDBListUpdatedEventRegistration; - private System.EventHandler _IndexedDBListUpdated; /// /// The origin's IndexedDB database list has been modified. /// @@ -41659,29 +40502,15 @@ namespace CefSharp.DevTools.Storage { add { - if ((_IndexedDBListUpdated) == (null)) - { - _IndexedDBListUpdatedEventRegistration = (_client.RegisterEventHandler("Storage.indexedDBListUpdated", OnIndexedDBListUpdated)); - } - - _IndexedDBListUpdated += (value); + _client.AddEventHandler("Storage.indexedDBListUpdated", value); } remove { - _IndexedDBListUpdated -= (value); - if ((_IndexedDBListUpdated) == (null)) - { - _IndexedDBListUpdatedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Storage.indexedDBListUpdated", value); } } - private void OnIndexedDBListUpdated(object sender, IndexedDBListUpdatedEventArgs args) - { - _IndexedDBListUpdated?.Invoke(this, args); - } - partial void ValidateClearDataForOrigin(string origin, string storageTypes); /// /// Clears storage for origin. @@ -42266,8 +41095,6 @@ namespace CefSharp.DevTools.Target _client = (client); } - private CefSharp.IRegistration _AttachedToTargetEventRegistration; - private System.EventHandler _AttachedToTarget; /// /// Issued when attached to target because of auto-attach or `attachToTarget` command. /// @@ -42275,31 +41102,15 @@ namespace CefSharp.DevTools.Target { add { - if ((_AttachedToTarget) == (null)) - { - _AttachedToTargetEventRegistration = (_client.RegisterEventHandler("Target.attachedToTarget", OnAttachedToTarget)); - } - - _AttachedToTarget += (value); + _client.AddEventHandler("Target.attachedToTarget", value); } remove { - _AttachedToTarget -= (value); - if ((_AttachedToTarget) == (null)) - { - _AttachedToTargetEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Target.attachedToTarget", value); } } - private void OnAttachedToTarget(object sender, AttachedToTargetEventArgs args) - { - _AttachedToTarget?.Invoke(this, args); - } - - private CefSharp.IRegistration _DetachedFromTargetEventRegistration; - private System.EventHandler _DetachedFromTarget; /// /// Issued when detached from target for any reason (including `detachFromTarget` command). Can be /// issued multiple times per target if multiple sessions have been attached to it. @@ -42308,31 +41119,15 @@ namespace CefSharp.DevTools.Target { add { - if ((_DetachedFromTarget) == (null)) - { - _DetachedFromTargetEventRegistration = (_client.RegisterEventHandler("Target.detachedFromTarget", OnDetachedFromTarget)); - } - - _DetachedFromTarget += (value); + _client.AddEventHandler("Target.detachedFromTarget", value); } remove { - _DetachedFromTarget -= (value); - if ((_DetachedFromTarget) == (null)) - { - _DetachedFromTargetEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Target.detachedFromTarget", value); } } - private void OnDetachedFromTarget(object sender, DetachedFromTargetEventArgs args) - { - _DetachedFromTarget?.Invoke(this, args); - } - - private CefSharp.IRegistration _ReceivedMessageFromTargetEventRegistration; - private System.EventHandler _ReceivedMessageFromTarget; /// /// Notifies about a new protocol message received from the session (as reported in /// `attachedToTarget` event). @@ -42341,31 +41136,15 @@ namespace CefSharp.DevTools.Target { add { - if ((_ReceivedMessageFromTarget) == (null)) - { - _ReceivedMessageFromTargetEventRegistration = (_client.RegisterEventHandler("Target.receivedMessageFromTarget", OnReceivedMessageFromTarget)); - } - - _ReceivedMessageFromTarget += (value); + _client.AddEventHandler("Target.receivedMessageFromTarget", value); } remove { - _ReceivedMessageFromTarget -= (value); - if ((_ReceivedMessageFromTarget) == (null)) - { - _ReceivedMessageFromTargetEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Target.receivedMessageFromTarget", value); } } - private void OnReceivedMessageFromTarget(object sender, ReceivedMessageFromTargetEventArgs args) - { - _ReceivedMessageFromTarget?.Invoke(this, args); - } - - private CefSharp.IRegistration _TargetCreatedEventRegistration; - private System.EventHandler _TargetCreated; /// /// Issued when a possible inspection target is created. /// @@ -42373,31 +41152,15 @@ namespace CefSharp.DevTools.Target { add { - if ((_TargetCreated) == (null)) - { - _TargetCreatedEventRegistration = (_client.RegisterEventHandler("Target.targetCreated", OnTargetCreated)); - } - - _TargetCreated += (value); + _client.AddEventHandler("Target.targetCreated", value); } remove { - _TargetCreated -= (value); - if ((_TargetCreated) == (null)) - { - _TargetCreatedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Target.targetCreated", value); } } - private void OnTargetCreated(object sender, TargetCreatedEventArgs args) - { - _TargetCreated?.Invoke(this, args); - } - - private CefSharp.IRegistration _TargetDestroyedEventRegistration; - private System.EventHandler _TargetDestroyed; /// /// Issued when a target is destroyed. /// @@ -42405,31 +41168,15 @@ namespace CefSharp.DevTools.Target { add { - if ((_TargetDestroyed) == (null)) - { - _TargetDestroyedEventRegistration = (_client.RegisterEventHandler("Target.targetDestroyed", OnTargetDestroyed)); - } - - _TargetDestroyed += (value); + _client.AddEventHandler("Target.targetDestroyed", value); } remove { - _TargetDestroyed -= (value); - if ((_TargetDestroyed) == (null)) - { - _TargetDestroyedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Target.targetDestroyed", value); } } - private void OnTargetDestroyed(object sender, TargetDestroyedEventArgs args) - { - _TargetDestroyed?.Invoke(this, args); - } - - private CefSharp.IRegistration _TargetCrashedEventRegistration; - private System.EventHandler _TargetCrashed; /// /// Issued when a target has crashed. /// @@ -42437,31 +41184,15 @@ namespace CefSharp.DevTools.Target { add { - if ((_TargetCrashed) == (null)) - { - _TargetCrashedEventRegistration = (_client.RegisterEventHandler("Target.targetCrashed", OnTargetCrashed)); - } - - _TargetCrashed += (value); + _client.AddEventHandler("Target.targetCrashed", value); } remove { - _TargetCrashed -= (value); - if ((_TargetCrashed) == (null)) - { - _TargetCrashedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Target.targetCrashed", value); } } - private void OnTargetCrashed(object sender, TargetCrashedEventArgs args) - { - _TargetCrashed?.Invoke(this, args); - } - - private CefSharp.IRegistration _TargetInfoChangedEventRegistration; - private System.EventHandler _TargetInfoChanged; /// /// Issued when some information about a target has changed. This only happens between /// `targetCreated` and `targetDestroyed`. @@ -42470,29 +41201,15 @@ namespace CefSharp.DevTools.Target { add { - if ((_TargetInfoChanged) == (null)) - { - _TargetInfoChangedEventRegistration = (_client.RegisterEventHandler("Target.targetInfoChanged", OnTargetInfoChanged)); - } - - _TargetInfoChanged += (value); + _client.AddEventHandler("Target.targetInfoChanged", value); } remove { - _TargetInfoChanged -= (value); - if ((_TargetInfoChanged) == (null)) - { - _TargetInfoChangedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Target.targetInfoChanged", value); } } - private void OnTargetInfoChanged(object sender, TargetInfoChangedEventArgs args) - { - _TargetInfoChanged?.Invoke(this, args); - } - partial void ValidateActivateTarget(string targetId); /// /// Activates (focuses) the target. @@ -42811,8 +41528,6 @@ namespace CefSharp.DevTools.Tethering _client = (client); } - private CefSharp.IRegistration _AcceptedEventRegistration; - private System.EventHandler _Accepted; /// /// Informs that port was successfully bound and got a specified connection id. /// @@ -42820,29 +41535,15 @@ namespace CefSharp.DevTools.Tethering { add { - if ((_Accepted) == (null)) - { - _AcceptedEventRegistration = (_client.RegisterEventHandler("Tethering.accepted", OnAccepted)); - } - - _Accepted += (value); + _client.AddEventHandler("Tethering.accepted", value); } remove { - _Accepted -= (value); - if ((_Accepted) == (null)) - { - _AcceptedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Tethering.accepted", value); } } - private void OnAccepted(object sender, AcceptedEventArgs args) - { - _Accepted?.Invoke(this, args); - } - partial void ValidateBind(int port); /// /// Request browser port binding. @@ -42984,8 +41685,6 @@ namespace CefSharp.DevTools.Tracing _client = (client); } - private CefSharp.IRegistration _BufferUsageEventRegistration; - private System.EventHandler _BufferUsage; /// /// BufferUsage /// @@ -42993,31 +41692,15 @@ namespace CefSharp.DevTools.Tracing { add { - if ((_BufferUsage) == (null)) - { - _BufferUsageEventRegistration = (_client.RegisterEventHandler("Tracing.bufferUsage", OnBufferUsage)); - } - - _BufferUsage += (value); + _client.AddEventHandler("Tracing.bufferUsage", value); } remove { - _BufferUsage -= (value); - if ((_BufferUsage) == (null)) - { - _BufferUsageEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Tracing.bufferUsage", value); } } - private void OnBufferUsage(object sender, BufferUsageEventArgs args) - { - _BufferUsage?.Invoke(this, args); - } - - private CefSharp.IRegistration _DataCollectedEventRegistration; - private System.EventHandler _DataCollected; /// /// Contains an bucket of collected trace events. When tracing is stopped collected events will be /// send as a sequence of dataCollected events followed by tracingComplete event. @@ -43026,31 +41709,15 @@ namespace CefSharp.DevTools.Tracing { add { - if ((_DataCollected) == (null)) - { - _DataCollectedEventRegistration = (_client.RegisterEventHandler("Tracing.dataCollected", OnDataCollected)); - } - - _DataCollected += (value); + _client.AddEventHandler("Tracing.dataCollected", value); } remove { - _DataCollected -= (value); - if ((_DataCollected) == (null)) - { - _DataCollectedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Tracing.dataCollected", value); } } - private void OnDataCollected(object sender, DataCollectedEventArgs args) - { - _DataCollected?.Invoke(this, args); - } - - private CefSharp.IRegistration _TracingCompleteEventRegistration; - private System.EventHandler _TracingComplete; /// /// Signals that tracing is stopped and there is no trace buffers pending flush, all data were /// delivered via dataCollected events. @@ -43059,29 +41726,15 @@ namespace CefSharp.DevTools.Tracing { add { - if ((_TracingComplete) == (null)) - { - _TracingCompleteEventRegistration = (_client.RegisterEventHandler("Tracing.tracingComplete", OnTracingComplete)); - } - - _TracingComplete += (value); + _client.AddEventHandler("Tracing.tracingComplete", value); } remove { - _TracingComplete -= (value); - if ((_TracingComplete) == (null)) - { - _TracingCompleteEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Tracing.tracingComplete", value); } } - private void OnTracingComplete(object sender, TracingCompleteEventArgs args) - { - _TracingComplete?.Invoke(this, args); - } - /// /// Stop trace events collection. /// @@ -43301,8 +41954,6 @@ namespace CefSharp.DevTools.Fetch _client = (client); } - private CefSharp.IRegistration _RequestPausedEventRegistration; - private System.EventHandler _RequestPaused; /// /// Issued when the domain is enabled and the request URL matches the /// specified filter. The request is paused until the client responds @@ -43315,31 +41966,15 @@ namespace CefSharp.DevTools.Fetch { add { - if ((_RequestPaused) == (null)) - { - _RequestPausedEventRegistration = (_client.RegisterEventHandler("Fetch.requestPaused", OnRequestPaused)); - } - - _RequestPaused += (value); + _client.AddEventHandler("Fetch.requestPaused", value); } remove { - _RequestPaused -= (value); - if ((_RequestPaused) == (null)) - { - _RequestPausedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Fetch.requestPaused", value); } } - private void OnRequestPaused(object sender, RequestPausedEventArgs args) - { - _RequestPaused?.Invoke(this, args); - } - - private CefSharp.IRegistration _AuthRequiredEventRegistration; - private System.EventHandler _AuthRequired; /// /// Issued when the domain is enabled with handleAuthRequests set to true. /// The request is paused until client responds with continueWithAuth. @@ -43348,29 +41983,15 @@ namespace CefSharp.DevTools.Fetch { add { - if ((_AuthRequired) == (null)) - { - _AuthRequiredEventRegistration = (_client.RegisterEventHandler("Fetch.authRequired", OnAuthRequired)); - } - - _AuthRequired += (value); + _client.AddEventHandler("Fetch.authRequired", value); } remove { - _AuthRequired -= (value); - if ((_AuthRequired) == (null)) - { - _AuthRequiredEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Fetch.authRequired", value); } } - private void OnAuthRequired(object sender, AuthRequiredEventArgs args) - { - _AuthRequired?.Invoke(this, args); - } - /// /// Disables the fetch domain. /// @@ -43608,8 +42229,6 @@ namespace CefSharp.DevTools.WebAudio _client = (client); } - private CefSharp.IRegistration _ContextCreatedEventRegistration; - private System.EventHandler _ContextCreated; /// /// Notifies that a new BaseAudioContext has been created. /// @@ -43617,31 +42236,15 @@ namespace CefSharp.DevTools.WebAudio { add { - if ((_ContextCreated) == (null)) - { - _ContextCreatedEventRegistration = (_client.RegisterEventHandler("WebAudio.contextCreated", OnContextCreated)); - } - - _ContextCreated += (value); + _client.AddEventHandler("WebAudio.contextCreated", value); } remove { - _ContextCreated -= (value); - if ((_ContextCreated) == (null)) - { - _ContextCreatedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("WebAudio.contextCreated", value); } } - private void OnContextCreated(object sender, ContextCreatedEventArgs args) - { - _ContextCreated?.Invoke(this, args); - } - - private CefSharp.IRegistration _ContextWillBeDestroyedEventRegistration; - private System.EventHandler _ContextWillBeDestroyed; /// /// Notifies that an existing BaseAudioContext will be destroyed. /// @@ -43649,31 +42252,15 @@ namespace CefSharp.DevTools.WebAudio { add { - if ((_ContextWillBeDestroyed) == (null)) - { - _ContextWillBeDestroyedEventRegistration = (_client.RegisterEventHandler("WebAudio.contextWillBeDestroyed", OnContextWillBeDestroyed)); - } - - _ContextWillBeDestroyed += (value); + _client.AddEventHandler("WebAudio.contextWillBeDestroyed", value); } remove { - _ContextWillBeDestroyed -= (value); - if ((_ContextWillBeDestroyed) == (null)) - { - _ContextWillBeDestroyedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("WebAudio.contextWillBeDestroyed", value); } } - private void OnContextWillBeDestroyed(object sender, ContextWillBeDestroyedEventArgs args) - { - _ContextWillBeDestroyed?.Invoke(this, args); - } - - private CefSharp.IRegistration _ContextChangedEventRegistration; - private System.EventHandler _ContextChanged; /// /// Notifies that existing BaseAudioContext has changed some properties (id stays the same).. /// @@ -43681,31 +42268,15 @@ namespace CefSharp.DevTools.WebAudio { add { - if ((_ContextChanged) == (null)) - { - _ContextChangedEventRegistration = (_client.RegisterEventHandler("WebAudio.contextChanged", OnContextChanged)); - } - - _ContextChanged += (value); + _client.AddEventHandler("WebAudio.contextChanged", value); } remove { - _ContextChanged -= (value); - if ((_ContextChanged) == (null)) - { - _ContextChangedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("WebAudio.contextChanged", value); } } - private void OnContextChanged(object sender, ContextChangedEventArgs args) - { - _ContextChanged?.Invoke(this, args); - } - - private CefSharp.IRegistration _AudioListenerCreatedEventRegistration; - private System.EventHandler _AudioListenerCreated; /// /// Notifies that the construction of an AudioListener has finished. /// @@ -43713,31 +42284,15 @@ namespace CefSharp.DevTools.WebAudio { add { - if ((_AudioListenerCreated) == (null)) - { - _AudioListenerCreatedEventRegistration = (_client.RegisterEventHandler("WebAudio.audioListenerCreated", OnAudioListenerCreated)); - } - - _AudioListenerCreated += (value); + _client.AddEventHandler("WebAudio.audioListenerCreated", value); } remove { - _AudioListenerCreated -= (value); - if ((_AudioListenerCreated) == (null)) - { - _AudioListenerCreatedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("WebAudio.audioListenerCreated", value); } } - private void OnAudioListenerCreated(object sender, AudioListenerCreatedEventArgs args) - { - _AudioListenerCreated?.Invoke(this, args); - } - - private CefSharp.IRegistration _AudioListenerWillBeDestroyedEventRegistration; - private System.EventHandler _AudioListenerWillBeDestroyed; /// /// Notifies that a new AudioListener has been created. /// @@ -43745,31 +42300,15 @@ namespace CefSharp.DevTools.WebAudio { add { - if ((_AudioListenerWillBeDestroyed) == (null)) - { - _AudioListenerWillBeDestroyedEventRegistration = (_client.RegisterEventHandler("WebAudio.audioListenerWillBeDestroyed", OnAudioListenerWillBeDestroyed)); - } - - _AudioListenerWillBeDestroyed += (value); + _client.AddEventHandler("WebAudio.audioListenerWillBeDestroyed", value); } remove { - _AudioListenerWillBeDestroyed -= (value); - if ((_AudioListenerWillBeDestroyed) == (null)) - { - _AudioListenerWillBeDestroyedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("WebAudio.audioListenerWillBeDestroyed", value); } } - private void OnAudioListenerWillBeDestroyed(object sender, AudioListenerWillBeDestroyedEventArgs args) - { - _AudioListenerWillBeDestroyed?.Invoke(this, args); - } - - private CefSharp.IRegistration _AudioNodeCreatedEventRegistration; - private System.EventHandler _AudioNodeCreated; /// /// Notifies that a new AudioNode has been created. /// @@ -43777,31 +42316,15 @@ namespace CefSharp.DevTools.WebAudio { add { - if ((_AudioNodeCreated) == (null)) - { - _AudioNodeCreatedEventRegistration = (_client.RegisterEventHandler("WebAudio.audioNodeCreated", OnAudioNodeCreated)); - } - - _AudioNodeCreated += (value); + _client.AddEventHandler("WebAudio.audioNodeCreated", value); } remove { - _AudioNodeCreated -= (value); - if ((_AudioNodeCreated) == (null)) - { - _AudioNodeCreatedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("WebAudio.audioNodeCreated", value); } } - private void OnAudioNodeCreated(object sender, AudioNodeCreatedEventArgs args) - { - _AudioNodeCreated?.Invoke(this, args); - } - - private CefSharp.IRegistration _AudioNodeWillBeDestroyedEventRegistration; - private System.EventHandler _AudioNodeWillBeDestroyed; /// /// Notifies that an existing AudioNode has been destroyed. /// @@ -43809,31 +42332,15 @@ namespace CefSharp.DevTools.WebAudio { add { - if ((_AudioNodeWillBeDestroyed) == (null)) - { - _AudioNodeWillBeDestroyedEventRegistration = (_client.RegisterEventHandler("WebAudio.audioNodeWillBeDestroyed", OnAudioNodeWillBeDestroyed)); - } - - _AudioNodeWillBeDestroyed += (value); + _client.AddEventHandler("WebAudio.audioNodeWillBeDestroyed", value); } remove { - _AudioNodeWillBeDestroyed -= (value); - if ((_AudioNodeWillBeDestroyed) == (null)) - { - _AudioNodeWillBeDestroyedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("WebAudio.audioNodeWillBeDestroyed", value); } } - private void OnAudioNodeWillBeDestroyed(object sender, AudioNodeWillBeDestroyedEventArgs args) - { - _AudioNodeWillBeDestroyed?.Invoke(this, args); - } - - private CefSharp.IRegistration _AudioParamCreatedEventRegistration; - private System.EventHandler _AudioParamCreated; /// /// Notifies that a new AudioParam has been created. /// @@ -43841,31 +42348,15 @@ namespace CefSharp.DevTools.WebAudio { add { - if ((_AudioParamCreated) == (null)) - { - _AudioParamCreatedEventRegistration = (_client.RegisterEventHandler("WebAudio.audioParamCreated", OnAudioParamCreated)); - } - - _AudioParamCreated += (value); + _client.AddEventHandler("WebAudio.audioParamCreated", value); } remove { - _AudioParamCreated -= (value); - if ((_AudioParamCreated) == (null)) - { - _AudioParamCreatedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("WebAudio.audioParamCreated", value); } } - private void OnAudioParamCreated(object sender, AudioParamCreatedEventArgs args) - { - _AudioParamCreated?.Invoke(this, args); - } - - private CefSharp.IRegistration _AudioParamWillBeDestroyedEventRegistration; - private System.EventHandler _AudioParamWillBeDestroyed; /// /// Notifies that an existing AudioParam has been destroyed. /// @@ -43873,31 +42364,15 @@ namespace CefSharp.DevTools.WebAudio { add { - if ((_AudioParamWillBeDestroyed) == (null)) - { - _AudioParamWillBeDestroyedEventRegistration = (_client.RegisterEventHandler("WebAudio.audioParamWillBeDestroyed", OnAudioParamWillBeDestroyed)); - } - - _AudioParamWillBeDestroyed += (value); + _client.AddEventHandler("WebAudio.audioParamWillBeDestroyed", value); } remove { - _AudioParamWillBeDestroyed -= (value); - if ((_AudioParamWillBeDestroyed) == (null)) - { - _AudioParamWillBeDestroyedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("WebAudio.audioParamWillBeDestroyed", value); } } - private void OnAudioParamWillBeDestroyed(object sender, AudioParamWillBeDestroyedEventArgs args) - { - _AudioParamWillBeDestroyed?.Invoke(this, args); - } - - private CefSharp.IRegistration _NodesConnectedEventRegistration; - private System.EventHandler _NodesConnected; /// /// Notifies that two AudioNodes are connected. /// @@ -43905,31 +42380,15 @@ namespace CefSharp.DevTools.WebAudio { add { - if ((_NodesConnected) == (null)) - { - _NodesConnectedEventRegistration = (_client.RegisterEventHandler("WebAudio.nodesConnected", OnNodesConnected)); - } - - _NodesConnected += (value); + _client.AddEventHandler("WebAudio.nodesConnected", value); } remove { - _NodesConnected -= (value); - if ((_NodesConnected) == (null)) - { - _NodesConnectedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("WebAudio.nodesConnected", value); } } - private void OnNodesConnected(object sender, NodesConnectedEventArgs args) - { - _NodesConnected?.Invoke(this, args); - } - - private CefSharp.IRegistration _NodesDisconnectedEventRegistration; - private System.EventHandler _NodesDisconnected; /// /// Notifies that AudioNodes are disconnected. The destination can be null, and it means all the outgoing connections from the source are disconnected. /// @@ -43937,31 +42396,15 @@ namespace CefSharp.DevTools.WebAudio { add { - if ((_NodesDisconnected) == (null)) - { - _NodesDisconnectedEventRegistration = (_client.RegisterEventHandler("WebAudio.nodesDisconnected", OnNodesDisconnected)); - } - - _NodesDisconnected += (value); + _client.AddEventHandler("WebAudio.nodesDisconnected", value); } remove { - _NodesDisconnected -= (value); - if ((_NodesDisconnected) == (null)) - { - _NodesDisconnectedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("WebAudio.nodesDisconnected", value); } } - private void OnNodesDisconnected(object sender, NodesDisconnectedEventArgs args) - { - _NodesDisconnected?.Invoke(this, args); - } - - private CefSharp.IRegistration _NodeParamConnectedEventRegistration; - private System.EventHandler _NodeParamConnected; /// /// Notifies that an AudioNode is connected to an AudioParam. /// @@ -43969,31 +42412,15 @@ namespace CefSharp.DevTools.WebAudio { add { - if ((_NodeParamConnected) == (null)) - { - _NodeParamConnectedEventRegistration = (_client.RegisterEventHandler("WebAudio.nodeParamConnected", OnNodeParamConnected)); - } - - _NodeParamConnected += (value); + _client.AddEventHandler("WebAudio.nodeParamConnected", value); } remove { - _NodeParamConnected -= (value); - if ((_NodeParamConnected) == (null)) - { - _NodeParamConnectedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("WebAudio.nodeParamConnected", value); } } - private void OnNodeParamConnected(object sender, NodeParamConnectedEventArgs args) - { - _NodeParamConnected?.Invoke(this, args); - } - - private CefSharp.IRegistration _NodeParamDisconnectedEventRegistration; - private System.EventHandler _NodeParamDisconnected; /// /// Notifies that an AudioNode is disconnected to an AudioParam. /// @@ -44001,29 +42428,15 @@ namespace CefSharp.DevTools.WebAudio { add { - if ((_NodeParamDisconnected) == (null)) - { - _NodeParamDisconnectedEventRegistration = (_client.RegisterEventHandler("WebAudio.nodeParamDisconnected", OnNodeParamDisconnected)); - } - - _NodeParamDisconnected += (value); + _client.AddEventHandler("WebAudio.nodeParamDisconnected", value); } remove { - _NodeParamDisconnected -= (value); - if ((_NodeParamDisconnected) == (null)) - { - _NodeParamDisconnectedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("WebAudio.nodeParamDisconnected", value); } } - private void OnNodeParamDisconnected(object sender, NodeParamDisconnectedEventArgs args) - { - _NodeParamDisconnected?.Invoke(this, args); - } - /// /// Enables the WebAudio domain and starts sending context lifetime events. /// @@ -44345,8 +42758,6 @@ namespace CefSharp.DevTools.Media _client = (client); } - private CefSharp.IRegistration _PlayerPropertiesChangedEventRegistration; - private System.EventHandler _PlayerPropertiesChanged; /// /// This can be called multiple times, and can be used to set / override / /// remove player properties. A null propValue indicates removal. @@ -44355,31 +42766,15 @@ namespace CefSharp.DevTools.Media { add { - if ((_PlayerPropertiesChanged) == (null)) - { - _PlayerPropertiesChangedEventRegistration = (_client.RegisterEventHandler("Media.playerPropertiesChanged", OnPlayerPropertiesChanged)); - } - - _PlayerPropertiesChanged += (value); + _client.AddEventHandler("Media.playerPropertiesChanged", value); } remove { - _PlayerPropertiesChanged -= (value); - if ((_PlayerPropertiesChanged) == (null)) - { - _PlayerPropertiesChangedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Media.playerPropertiesChanged", value); } } - private void OnPlayerPropertiesChanged(object sender, PlayerPropertiesChangedEventArgs args) - { - _PlayerPropertiesChanged?.Invoke(this, args); - } - - private CefSharp.IRegistration _PlayerEventsAddedEventRegistration; - private System.EventHandler _PlayerEventsAdded; /// /// Send events as a list, allowing them to be batched on the browser for less /// congestion. If batched, events must ALWAYS be in chronological order. @@ -44388,31 +42783,15 @@ namespace CefSharp.DevTools.Media { add { - if ((_PlayerEventsAdded) == (null)) - { - _PlayerEventsAddedEventRegistration = (_client.RegisterEventHandler("Media.playerEventsAdded", OnPlayerEventsAdded)); - } - - _PlayerEventsAdded += (value); + _client.AddEventHandler("Media.playerEventsAdded", value); } remove { - _PlayerEventsAdded -= (value); - if ((_PlayerEventsAdded) == (null)) - { - _PlayerEventsAddedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Media.playerEventsAdded", value); } } - private void OnPlayerEventsAdded(object sender, PlayerEventsAddedEventArgs args) - { - _PlayerEventsAdded?.Invoke(this, args); - } - - private CefSharp.IRegistration _PlayerMessagesLoggedEventRegistration; - private System.EventHandler _PlayerMessagesLogged; /// /// Send a list of any messages that need to be delivered. /// @@ -44420,31 +42799,15 @@ namespace CefSharp.DevTools.Media { add { - if ((_PlayerMessagesLogged) == (null)) - { - _PlayerMessagesLoggedEventRegistration = (_client.RegisterEventHandler("Media.playerMessagesLogged", OnPlayerMessagesLogged)); - } - - _PlayerMessagesLogged += (value); + _client.AddEventHandler("Media.playerMessagesLogged", value); } remove { - _PlayerMessagesLogged -= (value); - if ((_PlayerMessagesLogged) == (null)) - { - _PlayerMessagesLoggedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Media.playerMessagesLogged", value); } } - private void OnPlayerMessagesLogged(object sender, PlayerMessagesLoggedEventArgs args) - { - _PlayerMessagesLogged?.Invoke(this, args); - } - - private CefSharp.IRegistration _PlayerErrorsRaisedEventRegistration; - private System.EventHandler _PlayerErrorsRaised; /// /// Send a list of any errors that need to be delivered. /// @@ -44452,31 +42815,15 @@ namespace CefSharp.DevTools.Media { add { - if ((_PlayerErrorsRaised) == (null)) - { - _PlayerErrorsRaisedEventRegistration = (_client.RegisterEventHandler("Media.playerErrorsRaised", OnPlayerErrorsRaised)); - } - - _PlayerErrorsRaised += (value); + _client.AddEventHandler("Media.playerErrorsRaised", value); } remove { - _PlayerErrorsRaised -= (value); - if ((_PlayerErrorsRaised) == (null)) - { - _PlayerErrorsRaisedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Media.playerErrorsRaised", value); } } - private void OnPlayerErrorsRaised(object sender, PlayerErrorsRaisedEventArgs args) - { - _PlayerErrorsRaised?.Invoke(this, args); - } - - private CefSharp.IRegistration _PlayersCreatedEventRegistration; - private System.EventHandler _PlayersCreated; /// /// Called whenever a player is created, or when a new agent joins and receives /// a list of active players. If an agent is restored, it will receive the full @@ -44486,29 +42833,15 @@ namespace CefSharp.DevTools.Media { add { - if ((_PlayersCreated) == (null)) - { - _PlayersCreatedEventRegistration = (_client.RegisterEventHandler("Media.playersCreated", OnPlayersCreated)); - } - - _PlayersCreated += (value); + _client.AddEventHandler("Media.playersCreated", value); } remove { - _PlayersCreated -= (value); - if ((_PlayersCreated) == (null)) - { - _PlayersCreatedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Media.playersCreated", value); } } - private void OnPlayersCreated(object sender, PlayersCreatedEventArgs args) - { - _PlayersCreated?.Invoke(this, args); - } - /// /// Enables the Media domain /// @@ -45059,8 +43392,6 @@ namespace CefSharp.DevTools.Debugger _client = (client); } - private CefSharp.IRegistration _BreakpointResolvedEventRegistration; - private System.EventHandler _BreakpointResolved; /// /// Fired when breakpoint is resolved to an actual script and location. /// @@ -45068,31 +43399,15 @@ namespace CefSharp.DevTools.Debugger { add { - if ((_BreakpointResolved) == (null)) - { - _BreakpointResolvedEventRegistration = (_client.RegisterEventHandler("Debugger.breakpointResolved", OnBreakpointResolved)); - } - - _BreakpointResolved += (value); + _client.AddEventHandler("Debugger.breakpointResolved", value); } remove { - _BreakpointResolved -= (value); - if ((_BreakpointResolved) == (null)) - { - _BreakpointResolvedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Debugger.breakpointResolved", value); } } - private void OnBreakpointResolved(object sender, BreakpointResolvedEventArgs args) - { - _BreakpointResolved?.Invoke(this, args); - } - - private CefSharp.IRegistration _PausedEventRegistration; - private System.EventHandler _Paused; /// /// Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. /// @@ -45100,63 +43415,31 @@ namespace CefSharp.DevTools.Debugger { add { - if ((_Paused) == (null)) - { - _PausedEventRegistration = (_client.RegisterEventHandler("Debugger.paused", OnPaused)); - } - - _Paused += (value); + _client.AddEventHandler("Debugger.paused", value); } remove { - _Paused -= (value); - if ((_Paused) == (null)) - { - _PausedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Debugger.paused", value); } } - private void OnPaused(object sender, PausedEventArgs args) - { - _Paused?.Invoke(this, args); - } - - private CefSharp.IRegistration _ResumedEventRegistration; - private System.EventHandler _Resumed; /// /// Fired when the virtual machine resumed execution. /// - public event System.EventHandler Resumed + public event System.EventHandler Resumed { add { - if ((_Resumed) == (null)) - { - _ResumedEventRegistration = (_client.RegisterEventHandler("Debugger.resumed", OnResumed)); - } - - _Resumed += (value); + _client.AddEventHandler("Debugger.resumed", value); } remove { - _Resumed -= (value); - if ((_Resumed) == (null)) - { - _ResumedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Debugger.resumed", value); } } - private void OnResumed(object sender, CefSharp.DevTools.DevToolsEventArgs args) - { - _Resumed?.Invoke(this, args); - } - - private CefSharp.IRegistration _ScriptFailedToParseEventRegistration; - private System.EventHandler _ScriptFailedToParse; /// /// Fired when virtual machine fails to parse the script. /// @@ -45164,31 +43447,15 @@ namespace CefSharp.DevTools.Debugger { add { - if ((_ScriptFailedToParse) == (null)) - { - _ScriptFailedToParseEventRegistration = (_client.RegisterEventHandler("Debugger.scriptFailedToParse", OnScriptFailedToParse)); - } - - _ScriptFailedToParse += (value); + _client.AddEventHandler("Debugger.scriptFailedToParse", value); } remove { - _ScriptFailedToParse -= (value); - if ((_ScriptFailedToParse) == (null)) - { - _ScriptFailedToParseEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Debugger.scriptFailedToParse", value); } } - private void OnScriptFailedToParse(object sender, ScriptFailedToParseEventArgs args) - { - _ScriptFailedToParse?.Invoke(this, args); - } - - private CefSharp.IRegistration _ScriptParsedEventRegistration; - private System.EventHandler _ScriptParsed; /// /// Fired when virtual machine parses script. This event is also fired for all known and uncollected /// scripts upon enabling debugger. @@ -45197,29 +43464,15 @@ namespace CefSharp.DevTools.Debugger { add { - if ((_ScriptParsed) == (null)) - { - _ScriptParsedEventRegistration = (_client.RegisterEventHandler("Debugger.scriptParsed", OnScriptParsed)); - } - - _ScriptParsed += (value); + _client.AddEventHandler("Debugger.scriptParsed", value); } remove { - _ScriptParsed -= (value); - if ((_ScriptParsed) == (null)) - { - _ScriptParsedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Debugger.scriptParsed", value); } } - private void OnScriptParsed(object sender, ScriptParsedEventArgs args) - { - _ScriptParsed?.Invoke(this, args); - } - partial void ValidateContinueToLocation(CefSharp.DevTools.Debugger.Location location, CefSharp.DevTools.Debugger.ContinueToLocationTargetCallFrames? targetCallFrames = null); /// /// Continues execution until specific location is reached. @@ -45889,8 +44142,6 @@ namespace CefSharp.DevTools.HeapProfiler _client = (client); } - private CefSharp.IRegistration _AddHeapSnapshotChunkEventRegistration; - private System.EventHandler _AddHeapSnapshotChunk; /// /// AddHeapSnapshotChunk /// @@ -45898,31 +44149,15 @@ namespace CefSharp.DevTools.HeapProfiler { add { - if ((_AddHeapSnapshotChunk) == (null)) - { - _AddHeapSnapshotChunkEventRegistration = (_client.RegisterEventHandler("HeapProfiler.addHeapSnapshotChunk", OnAddHeapSnapshotChunk)); - } - - _AddHeapSnapshotChunk += (value); + _client.AddEventHandler("HeapProfiler.addHeapSnapshotChunk", value); } remove { - _AddHeapSnapshotChunk -= (value); - if ((_AddHeapSnapshotChunk) == (null)) - { - _AddHeapSnapshotChunkEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("HeapProfiler.addHeapSnapshotChunk", value); } } - private void OnAddHeapSnapshotChunk(object sender, AddHeapSnapshotChunkEventArgs args) - { - _AddHeapSnapshotChunk?.Invoke(this, args); - } - - private CefSharp.IRegistration _HeapStatsUpdateEventRegistration; - private System.EventHandler _HeapStatsUpdate; /// /// If heap objects tracking has been started then backend may send update for one or more fragments /// @@ -45930,31 +44165,15 @@ namespace CefSharp.DevTools.HeapProfiler { add { - if ((_HeapStatsUpdate) == (null)) - { - _HeapStatsUpdateEventRegistration = (_client.RegisterEventHandler("HeapProfiler.heapStatsUpdate", OnHeapStatsUpdate)); - } - - _HeapStatsUpdate += (value); + _client.AddEventHandler("HeapProfiler.heapStatsUpdate", value); } remove { - _HeapStatsUpdate -= (value); - if ((_HeapStatsUpdate) == (null)) - { - _HeapStatsUpdateEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("HeapProfiler.heapStatsUpdate", value); } } - private void OnHeapStatsUpdate(object sender, HeapStatsUpdateEventArgs args) - { - _HeapStatsUpdate?.Invoke(this, args); - } - - private CefSharp.IRegistration _LastSeenObjectIdEventRegistration; - private System.EventHandler _LastSeenObjectId; /// /// If heap objects tracking has been started then backend regularly sends a current value for last /// seen object id and corresponding timestamp. If the were changes in the heap since last event @@ -45964,31 +44183,15 @@ namespace CefSharp.DevTools.HeapProfiler { add { - if ((_LastSeenObjectId) == (null)) - { - _LastSeenObjectIdEventRegistration = (_client.RegisterEventHandler("HeapProfiler.lastSeenObjectId", OnLastSeenObjectId)); - } - - _LastSeenObjectId += (value); + _client.AddEventHandler("HeapProfiler.lastSeenObjectId", value); } remove { - _LastSeenObjectId -= (value); - if ((_LastSeenObjectId) == (null)) - { - _LastSeenObjectIdEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("HeapProfiler.lastSeenObjectId", value); } } - private void OnLastSeenObjectId(object sender, LastSeenObjectIdEventArgs args) - { - _LastSeenObjectId?.Invoke(this, args); - } - - private CefSharp.IRegistration _ReportHeapSnapshotProgressEventRegistration; - private System.EventHandler _ReportHeapSnapshotProgress; /// /// ReportHeapSnapshotProgress /// @@ -45996,61 +44199,31 @@ namespace CefSharp.DevTools.HeapProfiler { add { - if ((_ReportHeapSnapshotProgress) == (null)) - { - _ReportHeapSnapshotProgressEventRegistration = (_client.RegisterEventHandler("HeapProfiler.reportHeapSnapshotProgress", OnReportHeapSnapshotProgress)); - } - - _ReportHeapSnapshotProgress += (value); + _client.AddEventHandler("HeapProfiler.reportHeapSnapshotProgress", value); } remove { - _ReportHeapSnapshotProgress -= (value); - if ((_ReportHeapSnapshotProgress) == (null)) - { - _ReportHeapSnapshotProgressEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("HeapProfiler.reportHeapSnapshotProgress", value); } } - private void OnReportHeapSnapshotProgress(object sender, ReportHeapSnapshotProgressEventArgs args) - { - _ReportHeapSnapshotProgress?.Invoke(this, args); - } - - private CefSharp.IRegistration _ResetProfilesEventRegistration; - private System.EventHandler _ResetProfiles; /// /// ResetProfiles /// - public event System.EventHandler ResetProfiles + public event System.EventHandler ResetProfiles { add { - if ((_ResetProfiles) == (null)) - { - _ResetProfilesEventRegistration = (_client.RegisterEventHandler("HeapProfiler.resetProfiles", OnResetProfiles)); - } - - _ResetProfiles += (value); + _client.AddEventHandler("HeapProfiler.resetProfiles", value); } remove { - _ResetProfiles -= (value); - if ((_ResetProfiles) == (null)) - { - _ResetProfilesEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("HeapProfiler.resetProfiles", value); } } - private void OnResetProfiles(object sender, CefSharp.DevTools.DevToolsEventArgs args) - { - _ResetProfiles?.Invoke(this, args); - } - partial void ValidateAddInspectedHeapObject(string heapObjectId); /// /// Enables console to refer to the node with given id via $x (see Command Line API for more details @@ -46481,8 +44654,6 @@ namespace CefSharp.DevTools.Profiler _client = (client); } - private CefSharp.IRegistration _ConsoleProfileFinishedEventRegistration; - private System.EventHandler _ConsoleProfileFinished; /// /// ConsoleProfileFinished /// @@ -46490,31 +44661,15 @@ namespace CefSharp.DevTools.Profiler { add { - if ((_ConsoleProfileFinished) == (null)) - { - _ConsoleProfileFinishedEventRegistration = (_client.RegisterEventHandler("Profiler.consoleProfileFinished", OnConsoleProfileFinished)); - } - - _ConsoleProfileFinished += (value); + _client.AddEventHandler("Profiler.consoleProfileFinished", value); } remove { - _ConsoleProfileFinished -= (value); - if ((_ConsoleProfileFinished) == (null)) - { - _ConsoleProfileFinishedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Profiler.consoleProfileFinished", value); } } - private void OnConsoleProfileFinished(object sender, ConsoleProfileFinishedEventArgs args) - { - _ConsoleProfileFinished?.Invoke(this, args); - } - - private CefSharp.IRegistration _ConsoleProfileStartedEventRegistration; - private System.EventHandler _ConsoleProfileStarted; /// /// Sent when new profile recording is started using console.profile() call. /// @@ -46522,31 +44677,15 @@ namespace CefSharp.DevTools.Profiler { add { - if ((_ConsoleProfileStarted) == (null)) - { - _ConsoleProfileStartedEventRegistration = (_client.RegisterEventHandler("Profiler.consoleProfileStarted", OnConsoleProfileStarted)); - } - - _ConsoleProfileStarted += (value); + _client.AddEventHandler("Profiler.consoleProfileStarted", value); } remove { - _ConsoleProfileStarted -= (value); - if ((_ConsoleProfileStarted) == (null)) - { - _ConsoleProfileStartedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Profiler.consoleProfileStarted", value); } } - private void OnConsoleProfileStarted(object sender, ConsoleProfileStartedEventArgs args) - { - _ConsoleProfileStarted?.Invoke(this, args); - } - - private CefSharp.IRegistration _PreciseCoverageDeltaUpdateEventRegistration; - private System.EventHandler _PreciseCoverageDeltaUpdate; /// /// Reports coverage delta since the last poll (either from an event like this, or from /// `takePreciseCoverage` for the current isolate. May only be sent if precise code @@ -46557,29 +44696,15 @@ namespace CefSharp.DevTools.Profiler { add { - if ((_PreciseCoverageDeltaUpdate) == (null)) - { - _PreciseCoverageDeltaUpdateEventRegistration = (_client.RegisterEventHandler("Profiler.preciseCoverageDeltaUpdate", OnPreciseCoverageDeltaUpdate)); - } - - _PreciseCoverageDeltaUpdate += (value); + _client.AddEventHandler("Profiler.preciseCoverageDeltaUpdate", value); } remove { - _PreciseCoverageDeltaUpdate -= (value); - if ((_PreciseCoverageDeltaUpdate) == (null)) - { - _PreciseCoverageDeltaUpdateEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Profiler.preciseCoverageDeltaUpdate", value); } } - private void OnPreciseCoverageDeltaUpdate(object sender, PreciseCoverageDeltaUpdateEventArgs args) - { - _PreciseCoverageDeltaUpdate?.Invoke(this, args); - } - /// /// Disable /// @@ -47256,8 +45381,6 @@ namespace CefSharp.DevTools.Runtime _client = (client); } - private CefSharp.IRegistration _BindingCalledEventRegistration; - private System.EventHandler _BindingCalled; /// /// Notification is issued every time when binding is called. /// @@ -47265,31 +45388,15 @@ namespace CefSharp.DevTools.Runtime { add { - if ((_BindingCalled) == (null)) - { - _BindingCalledEventRegistration = (_client.RegisterEventHandler("Runtime.bindingCalled", OnBindingCalled)); - } - - _BindingCalled += (value); + _client.AddEventHandler("Runtime.bindingCalled", value); } remove { - _BindingCalled -= (value); - if ((_BindingCalled) == (null)) - { - _BindingCalledEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Runtime.bindingCalled", value); } } - private void OnBindingCalled(object sender, BindingCalledEventArgs args) - { - _BindingCalled?.Invoke(this, args); - } - - private CefSharp.IRegistration _ConsoleAPICalledEventRegistration; - private System.EventHandler _ConsoleAPICalled; /// /// Issued when console API was called. /// @@ -47297,31 +45404,15 @@ namespace CefSharp.DevTools.Runtime { add { - if ((_ConsoleAPICalled) == (null)) - { - _ConsoleAPICalledEventRegistration = (_client.RegisterEventHandler("Runtime.consoleAPICalled", OnConsoleAPICalled)); - } - - _ConsoleAPICalled += (value); + _client.AddEventHandler("Runtime.consoleAPICalled", value); } remove { - _ConsoleAPICalled -= (value); - if ((_ConsoleAPICalled) == (null)) - { - _ConsoleAPICalledEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Runtime.consoleAPICalled", value); } } - private void OnConsoleAPICalled(object sender, ConsoleAPICalledEventArgs args) - { - _ConsoleAPICalled?.Invoke(this, args); - } - - private CefSharp.IRegistration _ExceptionRevokedEventRegistration; - private System.EventHandler _ExceptionRevoked; /// /// Issued when unhandled exception was revoked. /// @@ -47329,31 +45420,15 @@ namespace CefSharp.DevTools.Runtime { add { - if ((_ExceptionRevoked) == (null)) - { - _ExceptionRevokedEventRegistration = (_client.RegisterEventHandler("Runtime.exceptionRevoked", OnExceptionRevoked)); - } - - _ExceptionRevoked += (value); + _client.AddEventHandler("Runtime.exceptionRevoked", value); } remove { - _ExceptionRevoked -= (value); - if ((_ExceptionRevoked) == (null)) - { - _ExceptionRevokedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Runtime.exceptionRevoked", value); } } - private void OnExceptionRevoked(object sender, ExceptionRevokedEventArgs args) - { - _ExceptionRevoked?.Invoke(this, args); - } - - private CefSharp.IRegistration _ExceptionThrownEventRegistration; - private System.EventHandler _ExceptionThrown; /// /// Issued when exception was thrown and unhandled. /// @@ -47361,31 +45436,15 @@ namespace CefSharp.DevTools.Runtime { add { - if ((_ExceptionThrown) == (null)) - { - _ExceptionThrownEventRegistration = (_client.RegisterEventHandler("Runtime.exceptionThrown", OnExceptionThrown)); - } - - _ExceptionThrown += (value); + _client.AddEventHandler("Runtime.exceptionThrown", value); } remove { - _ExceptionThrown -= (value); - if ((_ExceptionThrown) == (null)) - { - _ExceptionThrownEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Runtime.exceptionThrown", value); } } - private void OnExceptionThrown(object sender, ExceptionThrownEventArgs args) - { - _ExceptionThrown?.Invoke(this, args); - } - - private CefSharp.IRegistration _ExecutionContextCreatedEventRegistration; - private System.EventHandler _ExecutionContextCreated; /// /// Issued when new execution context is created. /// @@ -47393,31 +45452,15 @@ namespace CefSharp.DevTools.Runtime { add { - if ((_ExecutionContextCreated) == (null)) - { - _ExecutionContextCreatedEventRegistration = (_client.RegisterEventHandler("Runtime.executionContextCreated", OnExecutionContextCreated)); - } - - _ExecutionContextCreated += (value); + _client.AddEventHandler("Runtime.executionContextCreated", value); } remove { - _ExecutionContextCreated -= (value); - if ((_ExecutionContextCreated) == (null)) - { - _ExecutionContextCreatedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Runtime.executionContextCreated", value); } } - private void OnExecutionContextCreated(object sender, ExecutionContextCreatedEventArgs args) - { - _ExecutionContextCreated?.Invoke(this, args); - } - - private CefSharp.IRegistration _ExecutionContextDestroyedEventRegistration; - private System.EventHandler _ExecutionContextDestroyed; /// /// Issued when execution context is destroyed. /// @@ -47425,63 +45468,31 @@ namespace CefSharp.DevTools.Runtime { add { - if ((_ExecutionContextDestroyed) == (null)) - { - _ExecutionContextDestroyedEventRegistration = (_client.RegisterEventHandler("Runtime.executionContextDestroyed", OnExecutionContextDestroyed)); - } - - _ExecutionContextDestroyed += (value); + _client.AddEventHandler("Runtime.executionContextDestroyed", value); } remove { - _ExecutionContextDestroyed -= (value); - if ((_ExecutionContextDestroyed) == (null)) - { - _ExecutionContextDestroyedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Runtime.executionContextDestroyed", value); } } - private void OnExecutionContextDestroyed(object sender, ExecutionContextDestroyedEventArgs args) - { - _ExecutionContextDestroyed?.Invoke(this, args); - } - - private CefSharp.IRegistration _ExecutionContextsClearedEventRegistration; - private System.EventHandler _ExecutionContextsCleared; /// /// Issued when all executionContexts were cleared in browser /// - public event System.EventHandler ExecutionContextsCleared + public event System.EventHandler ExecutionContextsCleared { add { - if ((_ExecutionContextsCleared) == (null)) - { - _ExecutionContextsClearedEventRegistration = (_client.RegisterEventHandler("Runtime.executionContextsCleared", OnExecutionContextsCleared)); - } - - _ExecutionContextsCleared += (value); + _client.AddEventHandler("Runtime.executionContextsCleared", value); } remove { - _ExecutionContextsCleared -= (value); - if ((_ExecutionContextsCleared) == (null)) - { - _ExecutionContextsClearedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Runtime.executionContextsCleared", value); } } - private void OnExecutionContextsCleared(object sender, CefSharp.DevTools.DevToolsEventArgs args) - { - _ExecutionContextsCleared?.Invoke(this, args); - } - - private CefSharp.IRegistration _InspectRequestedEventRegistration; - private System.EventHandler _InspectRequested; /// /// Issued when object should be inspected (for example, as a result of inspect() command line API /// call). @@ -47490,29 +45501,15 @@ namespace CefSharp.DevTools.Runtime { add { - if ((_InspectRequested) == (null)) - { - _InspectRequestedEventRegistration = (_client.RegisterEventHandler("Runtime.inspectRequested", OnInspectRequested)); - } - - _InspectRequested += (value); + _client.AddEventHandler("Runtime.inspectRequested", value); } remove { - _InspectRequested -= (value); - if ((_InspectRequested) == (null)) - { - _InspectRequestedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Runtime.inspectRequested", value); } } - private void OnInspectRequested(object sender, InspectRequestedEventArgs args) - { - _InspectRequested?.Invoke(this, args); - } - partial void ValidateAwaitPromise(string promiseObjectId, bool? returnByValue = null, bool? generatePreview = null); /// /// Add handler to promise with given promise object id. @@ -48057,6 +46054,9 @@ namespace CefSharp.DevTools public partial class DevToolsClient { private CefSharp.DevTools.Accessibility.AccessibilityClient _Accessibility; + /// + /// Accessibility + /// public CefSharp.DevTools.Accessibility.AccessibilityClient Accessibility { get @@ -48071,6 +46071,9 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.Animation.AnimationClient _Animation; + /// + /// Animation + /// public CefSharp.DevTools.Animation.AnimationClient Animation { get @@ -48085,6 +46088,9 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.ApplicationCache.ApplicationCacheClient _ApplicationCache; + /// + /// ApplicationCache + /// public CefSharp.DevTools.ApplicationCache.ApplicationCacheClient ApplicationCache { get @@ -48099,6 +46105,9 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.Audits.AuditsClient _Audits; + /// + /// Audits domain allows investigation of page violations and possible improvements. + /// public CefSharp.DevTools.Audits.AuditsClient Audits { get @@ -48113,6 +46122,9 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.BackgroundService.BackgroundServiceClient _BackgroundService; + /// + /// Defines events for background web platform features. + /// public CefSharp.DevTools.BackgroundService.BackgroundServiceClient BackgroundService { get @@ -48127,6 +46139,9 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.Browser.BrowserClient _Browser; + /// + /// The Browser domain defines methods and events for browser managing. + /// public CefSharp.DevTools.Browser.BrowserClient Browser { get @@ -48141,6 +46156,14 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.CSS.CSSClient _CSS; + /// + /// This domain exposes CSS read/write operations. All CSS objects (stylesheets, rules, and styles) + /// have an associated `id` used in subsequent operations on the related object. Each object type has + /// a specific `id` structure, and those are not interchangeable between objects of different kinds. + /// CSS objects can be loaded using the `get*ForNode()` calls (which accept a DOM node id). A client + /// can also keep track of stylesheets via the `styleSheetAdded`/`styleSheetRemoved` events and + /// subsequently load the required stylesheet contents using the `getStyleSheet[Text]()` methods. + /// public CefSharp.DevTools.CSS.CSSClient CSS { get @@ -48155,6 +46178,9 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.CacheStorage.CacheStorageClient _CacheStorage; + /// + /// CacheStorage + /// public CefSharp.DevTools.CacheStorage.CacheStorageClient CacheStorage { get @@ -48169,6 +46195,10 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.Cast.CastClient _Cast; + /// + /// A domain for interacting with Cast, Presentation API, and Remote Playback API + /// functionalities. + /// public CefSharp.DevTools.Cast.CastClient Cast { get @@ -48183,6 +46213,15 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.DOM.DOMClient _DOM; + /// + /// This domain exposes DOM read/write operations. Each DOM Node is represented with its mirror object + /// that has an `id`. This `id` can be used to get additional information on the Node, resolve it into + /// the JavaScript object wrapper, etc. It is important that client receives DOM events only for the + /// nodes that are known to the client. Backend keeps track of the nodes that were sent to the client + /// and never sends the same node twice. It is client's responsibility to collect information about + /// the nodes that were sent to the client.<p>Note that `iframe` owner elements will return + /// corresponding document elements as their child nodes.</p> + /// public CefSharp.DevTools.DOM.DOMClient DOM { get @@ -48197,6 +46236,10 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.DOMDebugger.DOMDebuggerClient _DOMDebugger; + /// + /// DOM debugging allows setting breakpoints on particular DOM operations and events. JavaScript + /// execution will stop on these operations as if there was a regular breakpoint set. + /// public CefSharp.DevTools.DOMDebugger.DOMDebuggerClient DOMDebugger { get @@ -48211,6 +46254,9 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.DOMSnapshot.DOMSnapshotClient _DOMSnapshot; + /// + /// This domain facilitates obtaining document snapshots with DOM, layout, and style information. + /// public CefSharp.DevTools.DOMSnapshot.DOMSnapshotClient DOMSnapshot { get @@ -48225,6 +46271,9 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.DOMStorage.DOMStorageClient _DOMStorage; + /// + /// Query and modify DOM storage. + /// public CefSharp.DevTools.DOMStorage.DOMStorageClient DOMStorage { get @@ -48239,6 +46288,9 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.Database.DatabaseClient _Database; + /// + /// Database + /// public CefSharp.DevTools.Database.DatabaseClient Database { get @@ -48253,6 +46305,9 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.DeviceOrientation.DeviceOrientationClient _DeviceOrientation; + /// + /// DeviceOrientation + /// public CefSharp.DevTools.DeviceOrientation.DeviceOrientationClient DeviceOrientation { get @@ -48267,6 +46322,9 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.Emulation.EmulationClient _Emulation; + /// + /// This domain emulates different environments for the page. + /// public CefSharp.DevTools.Emulation.EmulationClient Emulation { get @@ -48281,6 +46339,9 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.HeadlessExperimental.HeadlessExperimentalClient _HeadlessExperimental; + /// + /// This domain provides experimental commands only supported in headless mode. + /// public CefSharp.DevTools.HeadlessExperimental.HeadlessExperimentalClient HeadlessExperimental { get @@ -48295,6 +46356,9 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.IO.IOClient _IO; + /// + /// Input/Output operations for streams produced by DevTools. + /// public CefSharp.DevTools.IO.IOClient IO { get @@ -48309,6 +46373,9 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.IndexedDB.IndexedDBClient _IndexedDB; + /// + /// IndexedDB + /// public CefSharp.DevTools.IndexedDB.IndexedDBClient IndexedDB { get @@ -48323,6 +46390,9 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.Input.InputClient _Input; + /// + /// Input + /// public CefSharp.DevTools.Input.InputClient Input { get @@ -48337,6 +46407,9 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.Inspector.InspectorClient _Inspector; + /// + /// Inspector + /// public CefSharp.DevTools.Inspector.InspectorClient Inspector { get @@ -48351,6 +46424,9 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.LayerTree.LayerTreeClient _LayerTree; + /// + /// LayerTree + /// public CefSharp.DevTools.LayerTree.LayerTreeClient LayerTree { get @@ -48365,6 +46441,9 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.Log.LogClient _Log; + /// + /// Provides access to log entries. + /// public CefSharp.DevTools.Log.LogClient Log { get @@ -48379,6 +46458,9 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.Memory.MemoryClient _Memory; + /// + /// Memory + /// public CefSharp.DevTools.Memory.MemoryClient Memory { get @@ -48393,6 +46475,10 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.Network.NetworkClient _Network; + /// + /// Network domain allows tracking network activities of the page. It exposes information about http, + /// file, data and other requests and responses, their headers, bodies, timing, etc. + /// public CefSharp.DevTools.Network.NetworkClient Network { get @@ -48407,6 +46493,9 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.Overlay.OverlayClient _Overlay; + /// + /// This domain provides various functionality related to drawing atop the inspected page. + /// public CefSharp.DevTools.Overlay.OverlayClient Overlay { get @@ -48421,6 +46510,9 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.Page.PageClient _Page; + /// + /// Actions and events related to the inspected page belong to the page domain. + /// public CefSharp.DevTools.Page.PageClient Page { get @@ -48435,6 +46527,9 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.Performance.PerformanceClient _Performance; + /// + /// Performance + /// public CefSharp.DevTools.Performance.PerformanceClient Performance { get @@ -48449,6 +46544,10 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.PerformanceTimeline.PerformanceTimelineClient _PerformanceTimeline; + /// + /// Reporting of performance timeline events, as specified in + /// https://w3c.github.io/performance-timeline/#dom-performanceobserver. + /// public CefSharp.DevTools.PerformanceTimeline.PerformanceTimelineClient PerformanceTimeline { get @@ -48463,6 +46562,9 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.Security.SecurityClient _Security; + /// + /// Security + /// public CefSharp.DevTools.Security.SecurityClient Security { get @@ -48477,6 +46579,9 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.ServiceWorker.ServiceWorkerClient _ServiceWorker; + /// + /// ServiceWorker + /// public CefSharp.DevTools.ServiceWorker.ServiceWorkerClient ServiceWorker { get @@ -48491,6 +46596,9 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.Storage.StorageClient _Storage; + /// + /// Storage + /// public CefSharp.DevTools.Storage.StorageClient Storage { get @@ -48505,6 +46613,9 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.SystemInfo.SystemInfoClient _SystemInfo; + /// + /// The SystemInfo domain defines methods and events for querying low-level system information. + /// public CefSharp.DevTools.SystemInfo.SystemInfoClient SystemInfo { get @@ -48519,6 +46630,9 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.Target.TargetClient _Target; + /// + /// Supports additional targets discovery and allows to attach to them. + /// public CefSharp.DevTools.Target.TargetClient Target { get @@ -48533,6 +46647,9 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.Tethering.TetheringClient _Tethering; + /// + /// The Tethering domain defines methods and events for browser port binding. + /// public CefSharp.DevTools.Tethering.TetheringClient Tethering { get @@ -48547,6 +46664,9 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.Tracing.TracingClient _Tracing; + /// + /// Tracing + /// public CefSharp.DevTools.Tracing.TracingClient Tracing { get @@ -48561,6 +46681,9 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.Fetch.FetchClient _Fetch; + /// + /// A domain for letting clients substitute browser's network layer with client code. + /// public CefSharp.DevTools.Fetch.FetchClient Fetch { get @@ -48575,6 +46698,10 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.WebAudio.WebAudioClient _WebAudio; + /// + /// This domain allows inspection of Web Audio API. + /// https://webaudio.github.io/web-audio-api/ + /// public CefSharp.DevTools.WebAudio.WebAudioClient WebAudio { get @@ -48589,6 +46716,10 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.WebAuthn.WebAuthnClient _WebAuthn; + /// + /// This domain allows configuring virtual authenticators to test the WebAuthn + /// API. + /// public CefSharp.DevTools.WebAuthn.WebAuthnClient WebAuthn { get @@ -48603,6 +46734,9 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.Media.MediaClient _Media; + /// + /// This domain allows detailed inspection of media elements + /// public CefSharp.DevTools.Media.MediaClient Media { get @@ -48617,6 +46751,10 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.Debugger.DebuggerClient _Debugger; + /// + /// Debugger domain exposes JavaScript debugging capabilities. It allows setting and removing + /// breakpoints, stepping through execution, exploring stack traces, etc. + /// public CefSharp.DevTools.Debugger.DebuggerClient Debugger { get @@ -48631,6 +46769,9 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.HeapProfiler.HeapProfilerClient _HeapProfiler; + /// + /// HeapProfiler + /// public CefSharp.DevTools.HeapProfiler.HeapProfilerClient HeapProfiler { get @@ -48645,6 +46786,9 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.Profiler.ProfilerClient _Profiler; + /// + /// Profiler + /// public CefSharp.DevTools.Profiler.ProfilerClient Profiler { get @@ -48659,6 +46803,13 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.Runtime.RuntimeClient _Runtime; + /// + /// Runtime domain exposes JavaScript runtime by means of remote evaluation and mirror objects. + /// Evaluation results are returned as mirror object that expose object type, string representation + /// and unique identifier that can be used for further object reference. Original objects are + /// maintained in memory unless they are either explicitly released or are released along with the + /// other objects in their object group. + /// public CefSharp.DevTools.Runtime.RuntimeClient Runtime { get diff --git a/CefSharp/DevTools/DevToolsClient.Generated.netcore.cs b/CefSharp/DevTools/DevToolsClient.Generated.netcore.cs index 4650dfe40..20cc36d07 100644 --- a/CefSharp/DevTools/DevToolsClient.Generated.netcore.cs +++ b/CefSharp/DevTools/DevToolsClient.Generated.netcore.cs @@ -3,7 +3,7 @@ // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. // // **This code was generated by a tool, do not change directly** -// CHROMIUM VERSION 92.0.4515.131 +// CHROMIUM VERSION 92.0.4515.159 namespace CefSharp.DevTools.Accessibility { /// @@ -25795,8 +25795,6 @@ namespace CefSharp.DevTools.Animation _client = (client); } - private CefSharp.IRegistration _AnimationCanceledEventRegistration; - private System.EventHandler _AnimationCanceled; /// /// Event for when an animation has been cancelled. /// @@ -25804,31 +25802,15 @@ namespace CefSharp.DevTools.Animation { add { - if ((_AnimationCanceled) == (null)) - { - _AnimationCanceledEventRegistration = (_client.RegisterEventHandler("Animation.animationCanceled", OnAnimationCanceled)); - } - - _AnimationCanceled += (value); + _client.AddEventHandler("Animation.animationCanceled", value); } remove { - _AnimationCanceled -= (value); - if ((_AnimationCanceled) == (null)) - { - _AnimationCanceledEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Animation.animationCanceled", value); } } - private void OnAnimationCanceled(object sender, AnimationCanceledEventArgs args) - { - _AnimationCanceled?.Invoke(this, args); - } - - private CefSharp.IRegistration _AnimationCreatedEventRegistration; - private System.EventHandler _AnimationCreated; /// /// Event for each animation that has been created. /// @@ -25836,31 +25818,15 @@ namespace CefSharp.DevTools.Animation { add { - if ((_AnimationCreated) == (null)) - { - _AnimationCreatedEventRegistration = (_client.RegisterEventHandler("Animation.animationCreated", OnAnimationCreated)); - } - - _AnimationCreated += (value); + _client.AddEventHandler("Animation.animationCreated", value); } remove { - _AnimationCreated -= (value); - if ((_AnimationCreated) == (null)) - { - _AnimationCreatedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Animation.animationCreated", value); } } - private void OnAnimationCreated(object sender, AnimationCreatedEventArgs args) - { - _AnimationCreated?.Invoke(this, args); - } - - private CefSharp.IRegistration _AnimationStartedEventRegistration; - private System.EventHandler _AnimationStarted; /// /// Event for animation that has been started. /// @@ -25868,29 +25834,15 @@ namespace CefSharp.DevTools.Animation { add { - if ((_AnimationStarted) == (null)) - { - _AnimationStartedEventRegistration = (_client.RegisterEventHandler("Animation.animationStarted", OnAnimationStarted)); - } - - _AnimationStarted += (value); + _client.AddEventHandler("Animation.animationStarted", value); } remove { - _AnimationStarted -= (value); - if ((_AnimationStarted) == (null)) - { - _AnimationStartedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Animation.animationStarted", value); } } - private void OnAnimationStarted(object sender, AnimationStartedEventArgs args) - { - _AnimationStarted?.Invoke(this, args); - } - /// /// Disables animation domain notifications. /// @@ -26108,8 +26060,6 @@ namespace CefSharp.DevTools.ApplicationCache _client = (client); } - private CefSharp.IRegistration _ApplicationCacheStatusUpdatedEventRegistration; - private System.EventHandler _ApplicationCacheStatusUpdated; /// /// ApplicationCacheStatusUpdated /// @@ -26117,31 +26067,15 @@ namespace CefSharp.DevTools.ApplicationCache { add { - if ((_ApplicationCacheStatusUpdated) == (null)) - { - _ApplicationCacheStatusUpdatedEventRegistration = (_client.RegisterEventHandler("ApplicationCache.applicationCacheStatusUpdated", OnApplicationCacheStatusUpdated)); - } - - _ApplicationCacheStatusUpdated += (value); + _client.AddEventHandler("ApplicationCache.applicationCacheStatusUpdated", value); } remove { - _ApplicationCacheStatusUpdated -= (value); - if ((_ApplicationCacheStatusUpdated) == (null)) - { - _ApplicationCacheStatusUpdatedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("ApplicationCache.applicationCacheStatusUpdated", value); } } - private void OnApplicationCacheStatusUpdated(object sender, ApplicationCacheStatusUpdatedEventArgs args) - { - _ApplicationCacheStatusUpdated?.Invoke(this, args); - } - - private CefSharp.IRegistration _NetworkStateUpdatedEventRegistration; - private System.EventHandler _NetworkStateUpdated; /// /// NetworkStateUpdated /// @@ -26149,29 +26083,15 @@ namespace CefSharp.DevTools.ApplicationCache { add { - if ((_NetworkStateUpdated) == (null)) - { - _NetworkStateUpdatedEventRegistration = (_client.RegisterEventHandler("ApplicationCache.networkStateUpdated", OnNetworkStateUpdated)); - } - - _NetworkStateUpdated += (value); + _client.AddEventHandler("ApplicationCache.networkStateUpdated", value); } remove { - _NetworkStateUpdated -= (value); - if ((_NetworkStateUpdated) == (null)) - { - _NetworkStateUpdatedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("ApplicationCache.networkStateUpdated", value); } } - private void OnNetworkStateUpdated(object sender, NetworkStateUpdatedEventArgs args) - { - _NetworkStateUpdated?.Invoke(this, args); - } - /// /// Enables application cache domain notifications. /// @@ -26306,8 +26226,6 @@ namespace CefSharp.DevTools.Audits _client = (client); } - private CefSharp.IRegistration _IssueAddedEventRegistration; - private System.EventHandler _IssueAdded; /// /// IssueAdded /// @@ -26315,29 +26233,15 @@ namespace CefSharp.DevTools.Audits { add { - if ((_IssueAdded) == (null)) - { - _IssueAddedEventRegistration = (_client.RegisterEventHandler("Audits.issueAdded", OnIssueAdded)); - } - - _IssueAdded += (value); + _client.AddEventHandler("Audits.issueAdded", value); } remove { - _IssueAdded -= (value); - if ((_IssueAdded) == (null)) - { - _IssueAddedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Audits.issueAdded", value); } } - private void OnIssueAdded(object sender, IssueAddedEventArgs args) - { - _IssueAdded?.Invoke(this, args); - } - partial void ValidateGetEncodedResponse(string requestId, CefSharp.DevTools.Audits.GetEncodedResponseEncoding encoding, double? quality = null, bool? sizeOnly = null); /// /// Returns the response body and size if it were re-encoded with the specified settings. Only @@ -26428,8 +26332,6 @@ namespace CefSharp.DevTools.BackgroundService _client = (client); } - private CefSharp.IRegistration _RecordingStateChangedEventRegistration; - private System.EventHandler _RecordingStateChanged; /// /// Called when the recording state for the service has been updated. /// @@ -26437,31 +26339,15 @@ namespace CefSharp.DevTools.BackgroundService { add { - if ((_RecordingStateChanged) == (null)) - { - _RecordingStateChangedEventRegistration = (_client.RegisterEventHandler("BackgroundService.recordingStateChanged", OnRecordingStateChanged)); - } - - _RecordingStateChanged += (value); + _client.AddEventHandler("BackgroundService.recordingStateChanged", value); } remove { - _RecordingStateChanged -= (value); - if ((_RecordingStateChanged) == (null)) - { - _RecordingStateChangedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("BackgroundService.recordingStateChanged", value); } } - private void OnRecordingStateChanged(object sender, RecordingStateChangedEventArgs args) - { - _RecordingStateChanged?.Invoke(this, args); - } - - private CefSharp.IRegistration _BackgroundServiceEventReceivedEventRegistration; - private System.EventHandler _BackgroundServiceEventReceived; /// /// Called with all existing backgroundServiceEvents when enabled, and all new /// events afterwards if enabled and recording. @@ -26470,29 +26356,15 @@ namespace CefSharp.DevTools.BackgroundService { add { - if ((_BackgroundServiceEventReceived) == (null)) - { - _BackgroundServiceEventReceivedEventRegistration = (_client.RegisterEventHandler("BackgroundService.backgroundServiceEventReceived", OnBackgroundServiceEventReceived)); - } - - _BackgroundServiceEventReceived += (value); + _client.AddEventHandler("BackgroundService.backgroundServiceEventReceived", value); } remove { - _BackgroundServiceEventReceived -= (value); - if ((_BackgroundServiceEventReceived) == (null)) - { - _BackgroundServiceEventReceivedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("BackgroundService.backgroundServiceEventReceived", value); } } - private void OnBackgroundServiceEventReceived(object sender, BackgroundServiceEventReceivedEventArgs args) - { - _BackgroundServiceEventReceived?.Invoke(this, args); - } - partial void ValidateStartObserving(CefSharp.DevTools.BackgroundService.ServiceName service); /// /// Enables event updates for the service. @@ -26776,8 +26648,6 @@ namespace CefSharp.DevTools.Browser _client = (client); } - private CefSharp.IRegistration _DownloadWillBeginEventRegistration; - private System.EventHandler _DownloadWillBegin; /// /// Fired when page is about to start a download. /// @@ -26785,31 +26655,15 @@ namespace CefSharp.DevTools.Browser { add { - if ((_DownloadWillBegin) == (null)) - { - _DownloadWillBeginEventRegistration = (_client.RegisterEventHandler("Browser.downloadWillBegin", OnDownloadWillBegin)); - } - - _DownloadWillBegin += (value); + _client.AddEventHandler("Browser.downloadWillBegin", value); } remove { - _DownloadWillBegin -= (value); - if ((_DownloadWillBegin) == (null)) - { - _DownloadWillBeginEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Browser.downloadWillBegin", value); } } - private void OnDownloadWillBegin(object sender, DownloadWillBeginEventArgs args) - { - _DownloadWillBegin?.Invoke(this, args); - } - - private CefSharp.IRegistration _DownloadProgressEventRegistration; - private System.EventHandler _DownloadProgress; /// /// Fired when download makes progress. Last call has |done| == true. /// @@ -26817,29 +26671,15 @@ namespace CefSharp.DevTools.Browser { add { - if ((_DownloadProgress) == (null)) - { - _DownloadProgressEventRegistration = (_client.RegisterEventHandler("Browser.downloadProgress", OnDownloadProgress)); - } - - _DownloadProgress += (value); + _client.AddEventHandler("Browser.downloadProgress", value); } remove { - _DownloadProgress -= (value); - if ((_DownloadProgress) == (null)) - { - _DownloadProgressEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Browser.downloadProgress", value); } } - private void OnDownloadProgress(object sender, DownloadProgressEventArgs args) - { - _DownloadProgress?.Invoke(this, args); - } - partial void ValidateSetPermission(CefSharp.DevTools.Browser.PermissionDescriptor permission, CefSharp.DevTools.Browser.PermissionSetting setting, string origin = null, string browserContextId = null); /// /// Set permission settings for given origin. @@ -27630,8 +27470,6 @@ namespace CefSharp.DevTools.CSS _client = (client); } - private CefSharp.IRegistration _FontsUpdatedEventRegistration; - private System.EventHandler _FontsUpdated; /// /// Fires whenever a web font is updated. A non-empty font parameter indicates a successfully loaded /// web font @@ -27640,64 +27478,32 @@ namespace CefSharp.DevTools.CSS { add { - if ((_FontsUpdated) == (null)) - { - _FontsUpdatedEventRegistration = (_client.RegisterEventHandler("CSS.fontsUpdated", OnFontsUpdated)); - } - - _FontsUpdated += (value); + _client.AddEventHandler("CSS.fontsUpdated", value); } remove { - _FontsUpdated -= (value); - if ((_FontsUpdated) == (null)) - { - _FontsUpdatedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("CSS.fontsUpdated", value); } } - private void OnFontsUpdated(object sender, FontsUpdatedEventArgs args) - { - _FontsUpdated?.Invoke(this, args); - } - - private CefSharp.IRegistration _MediaQueryResultChangedEventRegistration; - private System.EventHandler _MediaQueryResultChanged; /// /// Fires whenever a MediaQuery result changes (for example, after a browser window has been /// resized.) The current implementation considers only viewport-dependent media features. /// - public event System.EventHandler MediaQueryResultChanged + public event System.EventHandler MediaQueryResultChanged { add { - if ((_MediaQueryResultChanged) == (null)) - { - _MediaQueryResultChangedEventRegistration = (_client.RegisterEventHandler("CSS.mediaQueryResultChanged", OnMediaQueryResultChanged)); - } - - _MediaQueryResultChanged += (value); + _client.AddEventHandler("CSS.mediaQueryResultChanged", value); } remove { - _MediaQueryResultChanged -= (value); - if ((_MediaQueryResultChanged) == (null)) - { - _MediaQueryResultChangedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("CSS.mediaQueryResultChanged", value); } } - private void OnMediaQueryResultChanged(object sender, CefSharp.DevTools.DevToolsEventArgs args) - { - _MediaQueryResultChanged?.Invoke(this, args); - } - - private CefSharp.IRegistration _StyleSheetAddedEventRegistration; - private System.EventHandler _StyleSheetAdded; /// /// Fired whenever an active document stylesheet is added. /// @@ -27705,31 +27511,15 @@ namespace CefSharp.DevTools.CSS { add { - if ((_StyleSheetAdded) == (null)) - { - _StyleSheetAddedEventRegistration = (_client.RegisterEventHandler("CSS.styleSheetAdded", OnStyleSheetAdded)); - } - - _StyleSheetAdded += (value); + _client.AddEventHandler("CSS.styleSheetAdded", value); } remove { - _StyleSheetAdded -= (value); - if ((_StyleSheetAdded) == (null)) - { - _StyleSheetAddedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("CSS.styleSheetAdded", value); } } - private void OnStyleSheetAdded(object sender, StyleSheetAddedEventArgs args) - { - _StyleSheetAdded?.Invoke(this, args); - } - - private CefSharp.IRegistration _StyleSheetChangedEventRegistration; - private System.EventHandler _StyleSheetChanged; /// /// Fired whenever a stylesheet is changed as a result of the client operation. /// @@ -27737,31 +27527,15 @@ namespace CefSharp.DevTools.CSS { add { - if ((_StyleSheetChanged) == (null)) - { - _StyleSheetChangedEventRegistration = (_client.RegisterEventHandler("CSS.styleSheetChanged", OnStyleSheetChanged)); - } - - _StyleSheetChanged += (value); + _client.AddEventHandler("CSS.styleSheetChanged", value); } remove { - _StyleSheetChanged -= (value); - if ((_StyleSheetChanged) == (null)) - { - _StyleSheetChangedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("CSS.styleSheetChanged", value); } } - private void OnStyleSheetChanged(object sender, StyleSheetChangedEventArgs args) - { - _StyleSheetChanged?.Invoke(this, args); - } - - private CefSharp.IRegistration _StyleSheetRemovedEventRegistration; - private System.EventHandler _StyleSheetRemoved; /// /// Fired whenever an active document stylesheet is removed. /// @@ -27769,29 +27543,15 @@ namespace CefSharp.DevTools.CSS { add { - if ((_StyleSheetRemoved) == (null)) - { - _StyleSheetRemovedEventRegistration = (_client.RegisterEventHandler("CSS.styleSheetRemoved", OnStyleSheetRemoved)); - } - - _StyleSheetRemoved += (value); + _client.AddEventHandler("CSS.styleSheetRemoved", value); } remove { - _StyleSheetRemoved -= (value); - if ((_StyleSheetRemoved) == (null)) - { - _StyleSheetRemovedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("CSS.styleSheetRemoved", value); } } - private void OnStyleSheetRemoved(object sender, StyleSheetRemovedEventArgs args) - { - _StyleSheetRemoved?.Invoke(this, args); - } - partial void ValidateAddRule(string styleSheetId, string ruleText, CefSharp.DevTools.CSS.SourceRange location); /// /// Inserts a new rule with the given `ruleText` in a stylesheet with given `styleSheetId`, at the @@ -28359,8 +28119,6 @@ namespace CefSharp.DevTools.Cast _client = (client); } - private CefSharp.IRegistration _SinksUpdatedEventRegistration; - private System.EventHandler _SinksUpdated; /// /// This is fired whenever the list of available sinks changes. A sink is a /// device or a software surface that you can cast to. @@ -28369,31 +28127,15 @@ namespace CefSharp.DevTools.Cast { add { - if ((_SinksUpdated) == (null)) - { - _SinksUpdatedEventRegistration = (_client.RegisterEventHandler("Cast.sinksUpdated", OnSinksUpdated)); - } - - _SinksUpdated += (value); + _client.AddEventHandler("Cast.sinksUpdated", value); } remove { - _SinksUpdated -= (value); - if ((_SinksUpdated) == (null)) - { - _SinksUpdatedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Cast.sinksUpdated", value); } } - private void OnSinksUpdated(object sender, SinksUpdatedEventArgs args) - { - _SinksUpdated?.Invoke(this, args); - } - - private CefSharp.IRegistration _IssueUpdatedEventRegistration; - private System.EventHandler _IssueUpdated; /// /// This is fired whenever the outstanding issue/error message changes. /// |issueMessage| is empty if there is no issue. @@ -28402,29 +28144,15 @@ namespace CefSharp.DevTools.Cast { add { - if ((_IssueUpdated) == (null)) - { - _IssueUpdatedEventRegistration = (_client.RegisterEventHandler("Cast.issueUpdated", OnIssueUpdated)); - } - - _IssueUpdated += (value); + _client.AddEventHandler("Cast.issueUpdated", value); } remove { - _IssueUpdated -= (value); - if ((_IssueUpdated) == (null)) - { - _IssueUpdatedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Cast.issueUpdated", value); } } - private void OnIssueUpdated(object sender, IssueUpdatedEventArgs args) - { - _IssueUpdated?.Invoke(this, args); - } - partial void ValidateEnable(string presentationUrl = null); /// /// Starts observing for sinks that can be used for tab mirroring, and if set, @@ -29051,8 +28779,6 @@ namespace CefSharp.DevTools.DOM _client = (client); } - private CefSharp.IRegistration _AttributeModifiedEventRegistration; - private System.EventHandler _AttributeModified; /// /// Fired when `Element`'s attribute is modified. /// @@ -29060,31 +28786,15 @@ namespace CefSharp.DevTools.DOM { add { - if ((_AttributeModified) == (null)) - { - _AttributeModifiedEventRegistration = (_client.RegisterEventHandler("DOM.attributeModified", OnAttributeModified)); - } - - _AttributeModified += (value); + _client.AddEventHandler("DOM.attributeModified", value); } remove { - _AttributeModified -= (value); - if ((_AttributeModified) == (null)) - { - _AttributeModifiedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("DOM.attributeModified", value); } } - private void OnAttributeModified(object sender, AttributeModifiedEventArgs args) - { - _AttributeModified?.Invoke(this, args); - } - - private CefSharp.IRegistration _AttributeRemovedEventRegistration; - private System.EventHandler _AttributeRemoved; /// /// Fired when `Element`'s attribute is removed. /// @@ -29092,31 +28802,15 @@ namespace CefSharp.DevTools.DOM { add { - if ((_AttributeRemoved) == (null)) - { - _AttributeRemovedEventRegistration = (_client.RegisterEventHandler("DOM.attributeRemoved", OnAttributeRemoved)); - } - - _AttributeRemoved += (value); + _client.AddEventHandler("DOM.attributeRemoved", value); } remove { - _AttributeRemoved -= (value); - if ((_AttributeRemoved) == (null)) - { - _AttributeRemovedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("DOM.attributeRemoved", value); } } - private void OnAttributeRemoved(object sender, AttributeRemovedEventArgs args) - { - _AttributeRemoved?.Invoke(this, args); - } - - private CefSharp.IRegistration _CharacterDataModifiedEventRegistration; - private System.EventHandler _CharacterDataModified; /// /// Mirrors `DOMCharacterDataModified` event. /// @@ -29124,31 +28818,15 @@ namespace CefSharp.DevTools.DOM { add { - if ((_CharacterDataModified) == (null)) - { - _CharacterDataModifiedEventRegistration = (_client.RegisterEventHandler("DOM.characterDataModified", OnCharacterDataModified)); - } - - _CharacterDataModified += (value); + _client.AddEventHandler("DOM.characterDataModified", value); } remove { - _CharacterDataModified -= (value); - if ((_CharacterDataModified) == (null)) - { - _CharacterDataModifiedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("DOM.characterDataModified", value); } } - private void OnCharacterDataModified(object sender, CharacterDataModifiedEventArgs args) - { - _CharacterDataModified?.Invoke(this, args); - } - - private CefSharp.IRegistration _ChildNodeCountUpdatedEventRegistration; - private System.EventHandler _ChildNodeCountUpdated; /// /// Fired when `Container`'s child node count has changed. /// @@ -29156,31 +28834,15 @@ namespace CefSharp.DevTools.DOM { add { - if ((_ChildNodeCountUpdated) == (null)) - { - _ChildNodeCountUpdatedEventRegistration = (_client.RegisterEventHandler("DOM.childNodeCountUpdated", OnChildNodeCountUpdated)); - } - - _ChildNodeCountUpdated += (value); + _client.AddEventHandler("DOM.childNodeCountUpdated", value); } remove { - _ChildNodeCountUpdated -= (value); - if ((_ChildNodeCountUpdated) == (null)) - { - _ChildNodeCountUpdatedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("DOM.childNodeCountUpdated", value); } } - private void OnChildNodeCountUpdated(object sender, ChildNodeCountUpdatedEventArgs args) - { - _ChildNodeCountUpdated?.Invoke(this, args); - } - - private CefSharp.IRegistration _ChildNodeInsertedEventRegistration; - private System.EventHandler _ChildNodeInserted; /// /// Mirrors `DOMNodeInserted` event. /// @@ -29188,31 +28850,15 @@ namespace CefSharp.DevTools.DOM { add { - if ((_ChildNodeInserted) == (null)) - { - _ChildNodeInsertedEventRegistration = (_client.RegisterEventHandler("DOM.childNodeInserted", OnChildNodeInserted)); - } - - _ChildNodeInserted += (value); + _client.AddEventHandler("DOM.childNodeInserted", value); } remove { - _ChildNodeInserted -= (value); - if ((_ChildNodeInserted) == (null)) - { - _ChildNodeInsertedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("DOM.childNodeInserted", value); } } - private void OnChildNodeInserted(object sender, ChildNodeInsertedEventArgs args) - { - _ChildNodeInserted?.Invoke(this, args); - } - - private CefSharp.IRegistration _ChildNodeRemovedEventRegistration; - private System.EventHandler _ChildNodeRemoved; /// /// Mirrors `DOMNodeRemoved` event. /// @@ -29220,31 +28866,15 @@ namespace CefSharp.DevTools.DOM { add { - if ((_ChildNodeRemoved) == (null)) - { - _ChildNodeRemovedEventRegistration = (_client.RegisterEventHandler("DOM.childNodeRemoved", OnChildNodeRemoved)); - } - - _ChildNodeRemoved += (value); + _client.AddEventHandler("DOM.childNodeRemoved", value); } remove { - _ChildNodeRemoved -= (value); - if ((_ChildNodeRemoved) == (null)) - { - _ChildNodeRemovedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("DOM.childNodeRemoved", value); } } - private void OnChildNodeRemoved(object sender, ChildNodeRemovedEventArgs args) - { - _ChildNodeRemoved?.Invoke(this, args); - } - - private CefSharp.IRegistration _DistributedNodesUpdatedEventRegistration; - private System.EventHandler _DistributedNodesUpdated; /// /// Called when distribution is changed. /// @@ -29252,63 +28882,31 @@ namespace CefSharp.DevTools.DOM { add { - if ((_DistributedNodesUpdated) == (null)) - { - _DistributedNodesUpdatedEventRegistration = (_client.RegisterEventHandler("DOM.distributedNodesUpdated", OnDistributedNodesUpdated)); - } - - _DistributedNodesUpdated += (value); + _client.AddEventHandler("DOM.distributedNodesUpdated", value); } remove { - _DistributedNodesUpdated -= (value); - if ((_DistributedNodesUpdated) == (null)) - { - _DistributedNodesUpdatedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("DOM.distributedNodesUpdated", value); } } - private void OnDistributedNodesUpdated(object sender, DistributedNodesUpdatedEventArgs args) - { - _DistributedNodesUpdated?.Invoke(this, args); - } - - private CefSharp.IRegistration _DocumentUpdatedEventRegistration; - private System.EventHandler _DocumentUpdated; /// /// Fired when `Document` has been totally updated. Node ids are no longer valid. /// - public event System.EventHandler DocumentUpdated + public event System.EventHandler DocumentUpdated { add { - if ((_DocumentUpdated) == (null)) - { - _DocumentUpdatedEventRegistration = (_client.RegisterEventHandler("DOM.documentUpdated", OnDocumentUpdated)); - } - - _DocumentUpdated += (value); + _client.AddEventHandler("DOM.documentUpdated", value); } remove { - _DocumentUpdated -= (value); - if ((_DocumentUpdated) == (null)) - { - _DocumentUpdatedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("DOM.documentUpdated", value); } } - private void OnDocumentUpdated(object sender, CefSharp.DevTools.DevToolsEventArgs args) - { - _DocumentUpdated?.Invoke(this, args); - } - - private CefSharp.IRegistration _InlineStyleInvalidatedEventRegistration; - private System.EventHandler _InlineStyleInvalidated; /// /// Fired when `Element`'s inline style is modified via a CSS property modification. /// @@ -29316,31 +28914,15 @@ namespace CefSharp.DevTools.DOM { add { - if ((_InlineStyleInvalidated) == (null)) - { - _InlineStyleInvalidatedEventRegistration = (_client.RegisterEventHandler("DOM.inlineStyleInvalidated", OnInlineStyleInvalidated)); - } - - _InlineStyleInvalidated += (value); + _client.AddEventHandler("DOM.inlineStyleInvalidated", value); } remove { - _InlineStyleInvalidated -= (value); - if ((_InlineStyleInvalidated) == (null)) - { - _InlineStyleInvalidatedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("DOM.inlineStyleInvalidated", value); } } - private void OnInlineStyleInvalidated(object sender, InlineStyleInvalidatedEventArgs args) - { - _InlineStyleInvalidated?.Invoke(this, args); - } - - private CefSharp.IRegistration _PseudoElementAddedEventRegistration; - private System.EventHandler _PseudoElementAdded; /// /// Called when a pseudo element is added to an element. /// @@ -29348,31 +28930,15 @@ namespace CefSharp.DevTools.DOM { add { - if ((_PseudoElementAdded) == (null)) - { - _PseudoElementAddedEventRegistration = (_client.RegisterEventHandler("DOM.pseudoElementAdded", OnPseudoElementAdded)); - } - - _PseudoElementAdded += (value); + _client.AddEventHandler("DOM.pseudoElementAdded", value); } remove { - _PseudoElementAdded -= (value); - if ((_PseudoElementAdded) == (null)) - { - _PseudoElementAddedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("DOM.pseudoElementAdded", value); } } - private void OnPseudoElementAdded(object sender, PseudoElementAddedEventArgs args) - { - _PseudoElementAdded?.Invoke(this, args); - } - - private CefSharp.IRegistration _PseudoElementRemovedEventRegistration; - private System.EventHandler _PseudoElementRemoved; /// /// Called when a pseudo element is removed from an element. /// @@ -29380,31 +28946,15 @@ namespace CefSharp.DevTools.DOM { add { - if ((_PseudoElementRemoved) == (null)) - { - _PseudoElementRemovedEventRegistration = (_client.RegisterEventHandler("DOM.pseudoElementRemoved", OnPseudoElementRemoved)); - } - - _PseudoElementRemoved += (value); + _client.AddEventHandler("DOM.pseudoElementRemoved", value); } remove { - _PseudoElementRemoved -= (value); - if ((_PseudoElementRemoved) == (null)) - { - _PseudoElementRemovedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("DOM.pseudoElementRemoved", value); } } - private void OnPseudoElementRemoved(object sender, PseudoElementRemovedEventArgs args) - { - _PseudoElementRemoved?.Invoke(this, args); - } - - private CefSharp.IRegistration _SetChildNodesEventRegistration; - private System.EventHandler _SetChildNodes; /// /// Fired when backend wants to provide client with the missing DOM structure. This happens upon /// most of the calls requesting node ids. @@ -29413,31 +28963,15 @@ namespace CefSharp.DevTools.DOM { add { - if ((_SetChildNodes) == (null)) - { - _SetChildNodesEventRegistration = (_client.RegisterEventHandler("DOM.setChildNodes", OnSetChildNodes)); - } - - _SetChildNodes += (value); + _client.AddEventHandler("DOM.setChildNodes", value); } remove { - _SetChildNodes -= (value); - if ((_SetChildNodes) == (null)) - { - _SetChildNodesEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("DOM.setChildNodes", value); } } - private void OnSetChildNodes(object sender, SetChildNodesEventArgs args) - { - _SetChildNodes?.Invoke(this, args); - } - - private CefSharp.IRegistration _ShadowRootPoppedEventRegistration; - private System.EventHandler _ShadowRootPopped; /// /// Called when shadow root is popped from the element. /// @@ -29445,31 +28979,15 @@ namespace CefSharp.DevTools.DOM { add { - if ((_ShadowRootPopped) == (null)) - { - _ShadowRootPoppedEventRegistration = (_client.RegisterEventHandler("DOM.shadowRootPopped", OnShadowRootPopped)); - } - - _ShadowRootPopped += (value); + _client.AddEventHandler("DOM.shadowRootPopped", value); } remove { - _ShadowRootPopped -= (value); - if ((_ShadowRootPopped) == (null)) - { - _ShadowRootPoppedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("DOM.shadowRootPopped", value); } } - private void OnShadowRootPopped(object sender, ShadowRootPoppedEventArgs args) - { - _ShadowRootPopped?.Invoke(this, args); - } - - private CefSharp.IRegistration _ShadowRootPushedEventRegistration; - private System.EventHandler _ShadowRootPushed; /// /// Called when shadow root is pushed into the element. /// @@ -29477,29 +28995,15 @@ namespace CefSharp.DevTools.DOM { add { - if ((_ShadowRootPushed) == (null)) - { - _ShadowRootPushedEventRegistration = (_client.RegisterEventHandler("DOM.shadowRootPushed", OnShadowRootPushed)); - } - - _ShadowRootPushed += (value); + _client.AddEventHandler("DOM.shadowRootPushed", value); } remove { - _ShadowRootPushed -= (value); - if ((_ShadowRootPushed) == (null)) - { - _ShadowRootPushedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("DOM.shadowRootPushed", value); } } - private void OnShadowRootPushed(object sender, ShadowRootPushedEventArgs args) - { - _ShadowRootPushed?.Invoke(this, args); - } - partial void ValidateCollectClassNamesFromSubtree(int nodeId); /// /// Collects class names for the node with given id and all of it's child nodes. @@ -30726,8 +30230,6 @@ namespace CefSharp.DevTools.DOMStorage _client = (client); } - private CefSharp.IRegistration _DomStorageItemAddedEventRegistration; - private System.EventHandler _DomStorageItemAdded; /// /// DomStorageItemAdded /// @@ -30735,31 +30237,15 @@ namespace CefSharp.DevTools.DOMStorage { add { - if ((_DomStorageItemAdded) == (null)) - { - _DomStorageItemAddedEventRegistration = (_client.RegisterEventHandler("DOMStorage.domStorageItemAdded", OnDomStorageItemAdded)); - } - - _DomStorageItemAdded += (value); + _client.AddEventHandler("DOMStorage.domStorageItemAdded", value); } remove { - _DomStorageItemAdded -= (value); - if ((_DomStorageItemAdded) == (null)) - { - _DomStorageItemAddedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("DOMStorage.domStorageItemAdded", value); } } - private void OnDomStorageItemAdded(object sender, DomStorageItemAddedEventArgs args) - { - _DomStorageItemAdded?.Invoke(this, args); - } - - private CefSharp.IRegistration _DomStorageItemRemovedEventRegistration; - private System.EventHandler _DomStorageItemRemoved; /// /// DomStorageItemRemoved /// @@ -30767,31 +30253,15 @@ namespace CefSharp.DevTools.DOMStorage { add { - if ((_DomStorageItemRemoved) == (null)) - { - _DomStorageItemRemovedEventRegistration = (_client.RegisterEventHandler("DOMStorage.domStorageItemRemoved", OnDomStorageItemRemoved)); - } - - _DomStorageItemRemoved += (value); + _client.AddEventHandler("DOMStorage.domStorageItemRemoved", value); } remove { - _DomStorageItemRemoved -= (value); - if ((_DomStorageItemRemoved) == (null)) - { - _DomStorageItemRemovedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("DOMStorage.domStorageItemRemoved", value); } } - private void OnDomStorageItemRemoved(object sender, DomStorageItemRemovedEventArgs args) - { - _DomStorageItemRemoved?.Invoke(this, args); - } - - private CefSharp.IRegistration _DomStorageItemUpdatedEventRegistration; - private System.EventHandler _DomStorageItemUpdated; /// /// DomStorageItemUpdated /// @@ -30799,31 +30269,15 @@ namespace CefSharp.DevTools.DOMStorage { add { - if ((_DomStorageItemUpdated) == (null)) - { - _DomStorageItemUpdatedEventRegistration = (_client.RegisterEventHandler("DOMStorage.domStorageItemUpdated", OnDomStorageItemUpdated)); - } - - _DomStorageItemUpdated += (value); + _client.AddEventHandler("DOMStorage.domStorageItemUpdated", value); } remove { - _DomStorageItemUpdated -= (value); - if ((_DomStorageItemUpdated) == (null)) - { - _DomStorageItemUpdatedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("DOMStorage.domStorageItemUpdated", value); } } - private void OnDomStorageItemUpdated(object sender, DomStorageItemUpdatedEventArgs args) - { - _DomStorageItemUpdated?.Invoke(this, args); - } - - private CefSharp.IRegistration _DomStorageItemsClearedEventRegistration; - private System.EventHandler _DomStorageItemsCleared; /// /// DomStorageItemsCleared /// @@ -30831,29 +30285,15 @@ namespace CefSharp.DevTools.DOMStorage { add { - if ((_DomStorageItemsCleared) == (null)) - { - _DomStorageItemsClearedEventRegistration = (_client.RegisterEventHandler("DOMStorage.domStorageItemsCleared", OnDomStorageItemsCleared)); - } - - _DomStorageItemsCleared += (value); + _client.AddEventHandler("DOMStorage.domStorageItemsCleared", value); } remove { - _DomStorageItemsCleared -= (value); - if ((_DomStorageItemsCleared) == (null)) - { - _DomStorageItemsClearedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("DOMStorage.domStorageItemsCleared", value); } } - private void OnDomStorageItemsCleared(object sender, DomStorageItemsClearedEventArgs args) - { - _DomStorageItemsCleared?.Invoke(this, args); - } - partial void ValidateClear(CefSharp.DevTools.DOMStorage.StorageId storageId); /// /// Clear @@ -31019,8 +30459,6 @@ namespace CefSharp.DevTools.Database _client = (client); } - private CefSharp.IRegistration _AddDatabaseEventRegistration; - private System.EventHandler _AddDatabase; /// /// AddDatabase /// @@ -31028,29 +30466,15 @@ namespace CefSharp.DevTools.Database { add { - if ((_AddDatabase) == (null)) - { - _AddDatabaseEventRegistration = (_client.RegisterEventHandler("Database.addDatabase", OnAddDatabase)); - } - - _AddDatabase += (value); + _client.AddEventHandler("Database.addDatabase", value); } remove { - _AddDatabase -= (value); - if ((_AddDatabase) == (null)) - { - _AddDatabaseEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Database.addDatabase", value); } } - private void OnAddDatabase(object sender, AddDatabaseEventArgs args) - { - _AddDatabase?.Invoke(this, args); - } - /// /// Disables database tracking, prevents database events from being sent to the client. /// @@ -31265,38 +30689,22 @@ namespace CefSharp.DevTools.Emulation _client = (client); } - private CefSharp.IRegistration _VirtualTimeBudgetExpiredEventRegistration; - private System.EventHandler _VirtualTimeBudgetExpired; /// /// Notification sent after the virtual time budget for the current VirtualTimePolicy has run out. /// - public event System.EventHandler VirtualTimeBudgetExpired + public event System.EventHandler VirtualTimeBudgetExpired { add { - if ((_VirtualTimeBudgetExpired) == (null)) - { - _VirtualTimeBudgetExpiredEventRegistration = (_client.RegisterEventHandler("Emulation.virtualTimeBudgetExpired", OnVirtualTimeBudgetExpired)); - } - - _VirtualTimeBudgetExpired += (value); + _client.AddEventHandler("Emulation.virtualTimeBudgetExpired", value); } remove { - _VirtualTimeBudgetExpired -= (value); - if ((_VirtualTimeBudgetExpired) == (null)) - { - _VirtualTimeBudgetExpiredEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Emulation.virtualTimeBudgetExpired", value); } } - private void OnVirtualTimeBudgetExpired(object sender, CefSharp.DevTools.DevToolsEventArgs args) - { - _VirtualTimeBudgetExpired?.Invoke(this, args); - } - /// /// Tells whether emulation is supported. /// @@ -32465,8 +31873,6 @@ namespace CefSharp.DevTools.Input _client = (client); } - private CefSharp.IRegistration _DragInterceptedEventRegistration; - private System.EventHandler _DragIntercepted; /// /// Emitted only when `Input.setInterceptDrags` is enabled. Use this data with `Input.dispatchDragEvent` to /// restore normal drag and drop behavior. @@ -32475,29 +31881,15 @@ namespace CefSharp.DevTools.Input { add { - if ((_DragIntercepted) == (null)) - { - _DragInterceptedEventRegistration = (_client.RegisterEventHandler("Input.dragIntercepted", OnDragIntercepted)); - } - - _DragIntercepted += (value); + _client.AddEventHandler("Input.dragIntercepted", value); } remove { - _DragIntercepted -= (value); - if ((_DragIntercepted) == (null)) - { - _DragInterceptedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Input.dragIntercepted", value); } } - private void OnDragIntercepted(object sender, DragInterceptedEventArgs args) - { - _DragIntercepted?.Invoke(this, args); - } - partial void ValidateDispatchDragEvent(CefSharp.DevTools.Input.DispatchDragEventType type, double x, double y, CefSharp.DevTools.Input.DragData data, int? modifiers = null); /// /// Dispatches a drag event into the page. @@ -33001,8 +32393,6 @@ namespace CefSharp.DevTools.Inspector _client = (client); } - private CefSharp.IRegistration _DetachedEventRegistration; - private System.EventHandler _Detached; /// /// Fired when remote debugging connection is about to be terminated. Contains detach reason. /// @@ -33010,93 +32400,47 @@ namespace CefSharp.DevTools.Inspector { add { - if ((_Detached) == (null)) - { - _DetachedEventRegistration = (_client.RegisterEventHandler("Inspector.detached", OnDetached)); - } - - _Detached += (value); + _client.AddEventHandler("Inspector.detached", value); } remove { - _Detached -= (value); - if ((_Detached) == (null)) - { - _DetachedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Inspector.detached", value); } } - private void OnDetached(object sender, DetachedEventArgs args) - { - _Detached?.Invoke(this, args); - } - - private CefSharp.IRegistration _TargetCrashedEventRegistration; - private System.EventHandler _TargetCrashed; /// /// Fired when debugging target has crashed /// - public event System.EventHandler TargetCrashed + public event System.EventHandler TargetCrashed { add { - if ((_TargetCrashed) == (null)) - { - _TargetCrashedEventRegistration = (_client.RegisterEventHandler("Inspector.targetCrashed", OnTargetCrashed)); - } - - _TargetCrashed += (value); + _client.AddEventHandler("Inspector.targetCrashed", value); } remove { - _TargetCrashed -= (value); - if ((_TargetCrashed) == (null)) - { - _TargetCrashedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Inspector.targetCrashed", value); } } - private void OnTargetCrashed(object sender, CefSharp.DevTools.DevToolsEventArgs args) - { - _TargetCrashed?.Invoke(this, args); - } - - private CefSharp.IRegistration _TargetReloadedAfterCrashEventRegistration; - private System.EventHandler _TargetReloadedAfterCrash; /// /// Fired when debugging target has reloaded after crash /// - public event System.EventHandler TargetReloadedAfterCrash + public event System.EventHandler TargetReloadedAfterCrash { add { - if ((_TargetReloadedAfterCrash) == (null)) - { - _TargetReloadedAfterCrashEventRegistration = (_client.RegisterEventHandler("Inspector.targetReloadedAfterCrash", OnTargetReloadedAfterCrash)); - } - - _TargetReloadedAfterCrash += (value); + _client.AddEventHandler("Inspector.targetReloadedAfterCrash", value); } remove { - _TargetReloadedAfterCrash -= (value); - if ((_TargetReloadedAfterCrash) == (null)) - { - _TargetReloadedAfterCrashEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Inspector.targetReloadedAfterCrash", value); } } - private void OnTargetReloadedAfterCrash(object sender, CefSharp.DevTools.DevToolsEventArgs args) - { - _TargetReloadedAfterCrash?.Invoke(this, args); - } - /// /// Disables inspector domain notifications. /// @@ -33269,8 +32613,6 @@ namespace CefSharp.DevTools.LayerTree _client = (client); } - private CefSharp.IRegistration _LayerPaintedEventRegistration; - private System.EventHandler _LayerPainted; /// /// LayerPainted /// @@ -33278,31 +32620,15 @@ namespace CefSharp.DevTools.LayerTree { add { - if ((_LayerPainted) == (null)) - { - _LayerPaintedEventRegistration = (_client.RegisterEventHandler("LayerTree.layerPainted", OnLayerPainted)); - } - - _LayerPainted += (value); + _client.AddEventHandler("LayerTree.layerPainted", value); } remove { - _LayerPainted -= (value); - if ((_LayerPainted) == (null)) - { - _LayerPaintedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("LayerTree.layerPainted", value); } } - private void OnLayerPainted(object sender, LayerPaintedEventArgs args) - { - _LayerPainted?.Invoke(this, args); - } - - private CefSharp.IRegistration _LayerTreeDidChangeEventRegistration; - private System.EventHandler _LayerTreeDidChange; /// /// LayerTreeDidChange /// @@ -33310,29 +32636,15 @@ namespace CefSharp.DevTools.LayerTree { add { - if ((_LayerTreeDidChange) == (null)) - { - _LayerTreeDidChangeEventRegistration = (_client.RegisterEventHandler("LayerTree.layerTreeDidChange", OnLayerTreeDidChange)); - } - - _LayerTreeDidChange += (value); + _client.AddEventHandler("LayerTree.layerTreeDidChange", value); } remove { - _LayerTreeDidChange -= (value); - if ((_LayerTreeDidChange) == (null)) - { - _LayerTreeDidChangeEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("LayerTree.layerTreeDidChange", value); } } - private void OnLayerTreeDidChange(object sender, LayerTreeDidChangeEventArgs args) - { - _LayerTreeDidChange?.Invoke(this, args); - } - partial void ValidateCompositingReasons(string layerId); /// /// Provides the reasons why the given layer was composited. @@ -33508,8 +32820,6 @@ namespace CefSharp.DevTools.Log _client = (client); } - private CefSharp.IRegistration _EntryAddedEventRegistration; - private System.EventHandler _EntryAdded; /// /// Issued when new message was logged. /// @@ -33517,29 +32827,15 @@ namespace CefSharp.DevTools.Log { add { - if ((_EntryAdded) == (null)) - { - _EntryAddedEventRegistration = (_client.RegisterEventHandler("Log.entryAdded", OnEntryAdded)); - } - - _EntryAdded += (value); + _client.AddEventHandler("Log.entryAdded", value); } remove { - _EntryAdded -= (value); - if ((_EntryAdded) == (null)) - { - _EntryAddedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Log.entryAdded", value); } } - private void OnEntryAdded(object sender, EntryAddedEventArgs args) - { - _EntryAdded?.Invoke(this, args); - } - /// /// Clears the log. /// @@ -34107,8 +33403,6 @@ namespace CefSharp.DevTools.Network _client = (client); } - private CefSharp.IRegistration _DataReceivedEventRegistration; - private System.EventHandler _DataReceived; /// /// Fired when data chunk was received over the network. /// @@ -34116,31 +33410,15 @@ namespace CefSharp.DevTools.Network { add { - if ((_DataReceived) == (null)) - { - _DataReceivedEventRegistration = (_client.RegisterEventHandler("Network.dataReceived", OnDataReceived)); - } - - _DataReceived += (value); + _client.AddEventHandler("Network.dataReceived", value); } remove { - _DataReceived -= (value); - if ((_DataReceived) == (null)) - { - _DataReceivedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Network.dataReceived", value); } } - private void OnDataReceived(object sender, DataReceivedEventArgs args) - { - _DataReceived?.Invoke(this, args); - } - - private CefSharp.IRegistration _EventSourceMessageReceivedEventRegistration; - private System.EventHandler _EventSourceMessageReceived; /// /// Fired when EventSource message is received. /// @@ -34148,31 +33426,15 @@ namespace CefSharp.DevTools.Network { add { - if ((_EventSourceMessageReceived) == (null)) - { - _EventSourceMessageReceivedEventRegistration = (_client.RegisterEventHandler("Network.eventSourceMessageReceived", OnEventSourceMessageReceived)); - } - - _EventSourceMessageReceived += (value); + _client.AddEventHandler("Network.eventSourceMessageReceived", value); } remove { - _EventSourceMessageReceived -= (value); - if ((_EventSourceMessageReceived) == (null)) - { - _EventSourceMessageReceivedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Network.eventSourceMessageReceived", value); } } - private void OnEventSourceMessageReceived(object sender, EventSourceMessageReceivedEventArgs args) - { - _EventSourceMessageReceived?.Invoke(this, args); - } - - private CefSharp.IRegistration _LoadingFailedEventRegistration; - private System.EventHandler _LoadingFailed; /// /// Fired when HTTP request has failed to load. /// @@ -34180,31 +33442,15 @@ namespace CefSharp.DevTools.Network { add { - if ((_LoadingFailed) == (null)) - { - _LoadingFailedEventRegistration = (_client.RegisterEventHandler("Network.loadingFailed", OnLoadingFailed)); - } - - _LoadingFailed += (value); + _client.AddEventHandler("Network.loadingFailed", value); } remove { - _LoadingFailed -= (value); - if ((_LoadingFailed) == (null)) - { - _LoadingFailedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Network.loadingFailed", value); } } - private void OnLoadingFailed(object sender, LoadingFailedEventArgs args) - { - _LoadingFailed?.Invoke(this, args); - } - - private CefSharp.IRegistration _LoadingFinishedEventRegistration; - private System.EventHandler _LoadingFinished; /// /// Fired when HTTP request has finished loading. /// @@ -34212,31 +33458,15 @@ namespace CefSharp.DevTools.Network { add { - if ((_LoadingFinished) == (null)) - { - _LoadingFinishedEventRegistration = (_client.RegisterEventHandler("Network.loadingFinished", OnLoadingFinished)); - } - - _LoadingFinished += (value); + _client.AddEventHandler("Network.loadingFinished", value); } remove { - _LoadingFinished -= (value); - if ((_LoadingFinished) == (null)) - { - _LoadingFinishedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Network.loadingFinished", value); } } - private void OnLoadingFinished(object sender, LoadingFinishedEventArgs args) - { - _LoadingFinished?.Invoke(this, args); - } - - private CefSharp.IRegistration _RequestServedFromCacheEventRegistration; - private System.EventHandler _RequestServedFromCache; /// /// Fired if request ended up loading from cache. /// @@ -34244,31 +33474,15 @@ namespace CefSharp.DevTools.Network { add { - if ((_RequestServedFromCache) == (null)) - { - _RequestServedFromCacheEventRegistration = (_client.RegisterEventHandler("Network.requestServedFromCache", OnRequestServedFromCache)); - } - - _RequestServedFromCache += (value); + _client.AddEventHandler("Network.requestServedFromCache", value); } remove { - _RequestServedFromCache -= (value); - if ((_RequestServedFromCache) == (null)) - { - _RequestServedFromCacheEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Network.requestServedFromCache", value); } } - private void OnRequestServedFromCache(object sender, RequestServedFromCacheEventArgs args) - { - _RequestServedFromCache?.Invoke(this, args); - } - - private CefSharp.IRegistration _RequestWillBeSentEventRegistration; - private System.EventHandler _RequestWillBeSent; /// /// Fired when page is about to send HTTP request. /// @@ -34276,31 +33490,15 @@ namespace CefSharp.DevTools.Network { add { - if ((_RequestWillBeSent) == (null)) - { - _RequestWillBeSentEventRegistration = (_client.RegisterEventHandler("Network.requestWillBeSent", OnRequestWillBeSent)); - } - - _RequestWillBeSent += (value); + _client.AddEventHandler("Network.requestWillBeSent", value); } remove { - _RequestWillBeSent -= (value); - if ((_RequestWillBeSent) == (null)) - { - _RequestWillBeSentEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Network.requestWillBeSent", value); } } - private void OnRequestWillBeSent(object sender, RequestWillBeSentEventArgs args) - { - _RequestWillBeSent?.Invoke(this, args); - } - - private CefSharp.IRegistration _ResourceChangedPriorityEventRegistration; - private System.EventHandler _ResourceChangedPriority; /// /// Fired when resource loading priority is changed /// @@ -34308,31 +33506,15 @@ namespace CefSharp.DevTools.Network { add { - if ((_ResourceChangedPriority) == (null)) - { - _ResourceChangedPriorityEventRegistration = (_client.RegisterEventHandler("Network.resourceChangedPriority", OnResourceChangedPriority)); - } - - _ResourceChangedPriority += (value); + _client.AddEventHandler("Network.resourceChangedPriority", value); } remove { - _ResourceChangedPriority -= (value); - if ((_ResourceChangedPriority) == (null)) - { - _ResourceChangedPriorityEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Network.resourceChangedPriority", value); } } - private void OnResourceChangedPriority(object sender, ResourceChangedPriorityEventArgs args) - { - _ResourceChangedPriority?.Invoke(this, args); - } - - private CefSharp.IRegistration _SignedExchangeReceivedEventRegistration; - private System.EventHandler _SignedExchangeReceived; /// /// Fired when a signed exchange was received over the network /// @@ -34340,31 +33522,15 @@ namespace CefSharp.DevTools.Network { add { - if ((_SignedExchangeReceived) == (null)) - { - _SignedExchangeReceivedEventRegistration = (_client.RegisterEventHandler("Network.signedExchangeReceived", OnSignedExchangeReceived)); - } - - _SignedExchangeReceived += (value); + _client.AddEventHandler("Network.signedExchangeReceived", value); } remove { - _SignedExchangeReceived -= (value); - if ((_SignedExchangeReceived) == (null)) - { - _SignedExchangeReceivedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Network.signedExchangeReceived", value); } } - private void OnSignedExchangeReceived(object sender, SignedExchangeReceivedEventArgs args) - { - _SignedExchangeReceived?.Invoke(this, args); - } - - private CefSharp.IRegistration _ResponseReceivedEventRegistration; - private System.EventHandler _ResponseReceived; /// /// Fired when HTTP response is available. /// @@ -34372,31 +33538,15 @@ namespace CefSharp.DevTools.Network { add { - if ((_ResponseReceived) == (null)) - { - _ResponseReceivedEventRegistration = (_client.RegisterEventHandler("Network.responseReceived", OnResponseReceived)); - } - - _ResponseReceived += (value); + _client.AddEventHandler("Network.responseReceived", value); } remove { - _ResponseReceived -= (value); - if ((_ResponseReceived) == (null)) - { - _ResponseReceivedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Network.responseReceived", value); } } - private void OnResponseReceived(object sender, ResponseReceivedEventArgs args) - { - _ResponseReceived?.Invoke(this, args); - } - - private CefSharp.IRegistration _WebSocketClosedEventRegistration; - private System.EventHandler _WebSocketClosed; /// /// Fired when WebSocket is closed. /// @@ -34404,31 +33554,15 @@ namespace CefSharp.DevTools.Network { add { - if ((_WebSocketClosed) == (null)) - { - _WebSocketClosedEventRegistration = (_client.RegisterEventHandler("Network.webSocketClosed", OnWebSocketClosed)); - } - - _WebSocketClosed += (value); + _client.AddEventHandler("Network.webSocketClosed", value); } remove { - _WebSocketClosed -= (value); - if ((_WebSocketClosed) == (null)) - { - _WebSocketClosedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Network.webSocketClosed", value); } } - private void OnWebSocketClosed(object sender, WebSocketClosedEventArgs args) - { - _WebSocketClosed?.Invoke(this, args); - } - - private CefSharp.IRegistration _WebSocketCreatedEventRegistration; - private System.EventHandler _WebSocketCreated; /// /// Fired upon WebSocket creation. /// @@ -34436,31 +33570,15 @@ namespace CefSharp.DevTools.Network { add { - if ((_WebSocketCreated) == (null)) - { - _WebSocketCreatedEventRegistration = (_client.RegisterEventHandler("Network.webSocketCreated", OnWebSocketCreated)); - } - - _WebSocketCreated += (value); + _client.AddEventHandler("Network.webSocketCreated", value); } remove { - _WebSocketCreated -= (value); - if ((_WebSocketCreated) == (null)) - { - _WebSocketCreatedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Network.webSocketCreated", value); } } - private void OnWebSocketCreated(object sender, WebSocketCreatedEventArgs args) - { - _WebSocketCreated?.Invoke(this, args); - } - - private CefSharp.IRegistration _WebSocketFrameErrorEventRegistration; - private System.EventHandler _WebSocketFrameError; /// /// Fired when WebSocket message error occurs. /// @@ -34468,31 +33586,15 @@ namespace CefSharp.DevTools.Network { add { - if ((_WebSocketFrameError) == (null)) - { - _WebSocketFrameErrorEventRegistration = (_client.RegisterEventHandler("Network.webSocketFrameError", OnWebSocketFrameError)); - } - - _WebSocketFrameError += (value); + _client.AddEventHandler("Network.webSocketFrameError", value); } remove { - _WebSocketFrameError -= (value); - if ((_WebSocketFrameError) == (null)) - { - _WebSocketFrameErrorEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Network.webSocketFrameError", value); } } - private void OnWebSocketFrameError(object sender, WebSocketFrameErrorEventArgs args) - { - _WebSocketFrameError?.Invoke(this, args); - } - - private CefSharp.IRegistration _WebSocketFrameReceivedEventRegistration; - private System.EventHandler _WebSocketFrameReceived; /// /// Fired when WebSocket message is received. /// @@ -34500,31 +33602,15 @@ namespace CefSharp.DevTools.Network { add { - if ((_WebSocketFrameReceived) == (null)) - { - _WebSocketFrameReceivedEventRegistration = (_client.RegisterEventHandler("Network.webSocketFrameReceived", OnWebSocketFrameReceived)); - } - - _WebSocketFrameReceived += (value); + _client.AddEventHandler("Network.webSocketFrameReceived", value); } remove { - _WebSocketFrameReceived -= (value); - if ((_WebSocketFrameReceived) == (null)) - { - _WebSocketFrameReceivedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Network.webSocketFrameReceived", value); } } - private void OnWebSocketFrameReceived(object sender, WebSocketFrameReceivedEventArgs args) - { - _WebSocketFrameReceived?.Invoke(this, args); - } - - private CefSharp.IRegistration _WebSocketFrameSentEventRegistration; - private System.EventHandler _WebSocketFrameSent; /// /// Fired when WebSocket message is sent. /// @@ -34532,31 +33618,15 @@ namespace CefSharp.DevTools.Network { add { - if ((_WebSocketFrameSent) == (null)) - { - _WebSocketFrameSentEventRegistration = (_client.RegisterEventHandler("Network.webSocketFrameSent", OnWebSocketFrameSent)); - } - - _WebSocketFrameSent += (value); + _client.AddEventHandler("Network.webSocketFrameSent", value); } remove { - _WebSocketFrameSent -= (value); - if ((_WebSocketFrameSent) == (null)) - { - _WebSocketFrameSentEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Network.webSocketFrameSent", value); } } - private void OnWebSocketFrameSent(object sender, WebSocketFrameSentEventArgs args) - { - _WebSocketFrameSent?.Invoke(this, args); - } - - private CefSharp.IRegistration _WebSocketHandshakeResponseReceivedEventRegistration; - private System.EventHandler _WebSocketHandshakeResponseReceived; /// /// Fired when WebSocket handshake response becomes available. /// @@ -34564,31 +33634,15 @@ namespace CefSharp.DevTools.Network { add { - if ((_WebSocketHandshakeResponseReceived) == (null)) - { - _WebSocketHandshakeResponseReceivedEventRegistration = (_client.RegisterEventHandler("Network.webSocketHandshakeResponseReceived", OnWebSocketHandshakeResponseReceived)); - } - - _WebSocketHandshakeResponseReceived += (value); + _client.AddEventHandler("Network.webSocketHandshakeResponseReceived", value); } remove { - _WebSocketHandshakeResponseReceived -= (value); - if ((_WebSocketHandshakeResponseReceived) == (null)) - { - _WebSocketHandshakeResponseReceivedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Network.webSocketHandshakeResponseReceived", value); } } - private void OnWebSocketHandshakeResponseReceived(object sender, WebSocketHandshakeResponseReceivedEventArgs args) - { - _WebSocketHandshakeResponseReceived?.Invoke(this, args); - } - - private CefSharp.IRegistration _WebSocketWillSendHandshakeRequestEventRegistration; - private System.EventHandler _WebSocketWillSendHandshakeRequest; /// /// Fired when WebSocket is about to initiate handshake. /// @@ -34596,31 +33650,15 @@ namespace CefSharp.DevTools.Network { add { - if ((_WebSocketWillSendHandshakeRequest) == (null)) - { - _WebSocketWillSendHandshakeRequestEventRegistration = (_client.RegisterEventHandler("Network.webSocketWillSendHandshakeRequest", OnWebSocketWillSendHandshakeRequest)); - } - - _WebSocketWillSendHandshakeRequest += (value); + _client.AddEventHandler("Network.webSocketWillSendHandshakeRequest", value); } remove { - _WebSocketWillSendHandshakeRequest -= (value); - if ((_WebSocketWillSendHandshakeRequest) == (null)) - { - _WebSocketWillSendHandshakeRequestEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Network.webSocketWillSendHandshakeRequest", value); } } - private void OnWebSocketWillSendHandshakeRequest(object sender, WebSocketWillSendHandshakeRequestEventArgs args) - { - _WebSocketWillSendHandshakeRequest?.Invoke(this, args); - } - - private CefSharp.IRegistration _WebTransportCreatedEventRegistration; - private System.EventHandler _WebTransportCreated; /// /// Fired upon WebTransport creation. /// @@ -34628,31 +33666,15 @@ namespace CefSharp.DevTools.Network { add { - if ((_WebTransportCreated) == (null)) - { - _WebTransportCreatedEventRegistration = (_client.RegisterEventHandler("Network.webTransportCreated", OnWebTransportCreated)); - } - - _WebTransportCreated += (value); + _client.AddEventHandler("Network.webTransportCreated", value); } remove { - _WebTransportCreated -= (value); - if ((_WebTransportCreated) == (null)) - { - _WebTransportCreatedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Network.webTransportCreated", value); } } - private void OnWebTransportCreated(object sender, WebTransportCreatedEventArgs args) - { - _WebTransportCreated?.Invoke(this, args); - } - - private CefSharp.IRegistration _WebTransportConnectionEstablishedEventRegistration; - private System.EventHandler _WebTransportConnectionEstablished; /// /// Fired when WebTransport handshake is finished. /// @@ -34660,31 +33682,15 @@ namespace CefSharp.DevTools.Network { add { - if ((_WebTransportConnectionEstablished) == (null)) - { - _WebTransportConnectionEstablishedEventRegistration = (_client.RegisterEventHandler("Network.webTransportConnectionEstablished", OnWebTransportConnectionEstablished)); - } - - _WebTransportConnectionEstablished += (value); + _client.AddEventHandler("Network.webTransportConnectionEstablished", value); } remove { - _WebTransportConnectionEstablished -= (value); - if ((_WebTransportConnectionEstablished) == (null)) - { - _WebTransportConnectionEstablishedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Network.webTransportConnectionEstablished", value); } } - private void OnWebTransportConnectionEstablished(object sender, WebTransportConnectionEstablishedEventArgs args) - { - _WebTransportConnectionEstablished?.Invoke(this, args); - } - - private CefSharp.IRegistration _WebTransportClosedEventRegistration; - private System.EventHandler _WebTransportClosed; /// /// Fired when WebTransport is disposed. /// @@ -34692,31 +33698,15 @@ namespace CefSharp.DevTools.Network { add { - if ((_WebTransportClosed) == (null)) - { - _WebTransportClosedEventRegistration = (_client.RegisterEventHandler("Network.webTransportClosed", OnWebTransportClosed)); - } - - _WebTransportClosed += (value); + _client.AddEventHandler("Network.webTransportClosed", value); } remove { - _WebTransportClosed -= (value); - if ((_WebTransportClosed) == (null)) - { - _WebTransportClosedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Network.webTransportClosed", value); } } - private void OnWebTransportClosed(object sender, WebTransportClosedEventArgs args) - { - _WebTransportClosed?.Invoke(this, args); - } - - private CefSharp.IRegistration _RequestWillBeSentExtraInfoEventRegistration; - private System.EventHandler _RequestWillBeSentExtraInfo; /// /// Fired when additional information about a requestWillBeSent event is available from the /// network stack. Not every requestWillBeSent event will have an additional @@ -34727,31 +33717,15 @@ namespace CefSharp.DevTools.Network { add { - if ((_RequestWillBeSentExtraInfo) == (null)) - { - _RequestWillBeSentExtraInfoEventRegistration = (_client.RegisterEventHandler("Network.requestWillBeSentExtraInfo", OnRequestWillBeSentExtraInfo)); - } - - _RequestWillBeSentExtraInfo += (value); + _client.AddEventHandler("Network.requestWillBeSentExtraInfo", value); } remove { - _RequestWillBeSentExtraInfo -= (value); - if ((_RequestWillBeSentExtraInfo) == (null)) - { - _RequestWillBeSentExtraInfoEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Network.requestWillBeSentExtraInfo", value); } } - private void OnRequestWillBeSentExtraInfo(object sender, RequestWillBeSentExtraInfoEventArgs args) - { - _RequestWillBeSentExtraInfo?.Invoke(this, args); - } - - private CefSharp.IRegistration _ResponseReceivedExtraInfoEventRegistration; - private System.EventHandler _ResponseReceivedExtraInfo; /// /// Fired when additional information about a responseReceived event is available from the network /// stack. Not every responseReceived event will have an additional responseReceivedExtraInfo for @@ -34761,31 +33735,15 @@ namespace CefSharp.DevTools.Network { add { - if ((_ResponseReceivedExtraInfo) == (null)) - { - _ResponseReceivedExtraInfoEventRegistration = (_client.RegisterEventHandler("Network.responseReceivedExtraInfo", OnResponseReceivedExtraInfo)); - } - - _ResponseReceivedExtraInfo += (value); + _client.AddEventHandler("Network.responseReceivedExtraInfo", value); } remove { - _ResponseReceivedExtraInfo -= (value); - if ((_ResponseReceivedExtraInfo) == (null)) - { - _ResponseReceivedExtraInfoEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Network.responseReceivedExtraInfo", value); } } - private void OnResponseReceivedExtraInfo(object sender, ResponseReceivedExtraInfoEventArgs args) - { - _ResponseReceivedExtraInfo?.Invoke(this, args); - } - - private CefSharp.IRegistration _TrustTokenOperationDoneEventRegistration; - private System.EventHandler _TrustTokenOperationDone; /// /// Fired exactly once for each Trust Token operation. Depending on /// the type of the operation and whether the operation succeeded or @@ -34796,29 +33754,15 @@ namespace CefSharp.DevTools.Network { add { - if ((_TrustTokenOperationDone) == (null)) - { - _TrustTokenOperationDoneEventRegistration = (_client.RegisterEventHandler("Network.trustTokenOperationDone", OnTrustTokenOperationDone)); - } - - _TrustTokenOperationDone += (value); + _client.AddEventHandler("Network.trustTokenOperationDone", value); } remove { - _TrustTokenOperationDone -= (value); - if ((_TrustTokenOperationDone) == (null)) - { - _TrustTokenOperationDoneEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Network.trustTokenOperationDone", value); } } - private void OnTrustTokenOperationDone(object sender, TrustTokenOperationDoneEventArgs args) - { - _TrustTokenOperationDone?.Invoke(this, args); - } - partial void ValidateSetAcceptedEncodings(CefSharp.DevTools.Network.ContentEncoding[] encodings); /// /// Sets a list of content encodings that will be accepted. Empty list means no encoding is accepted. @@ -35439,8 +34383,6 @@ namespace CefSharp.DevTools.Overlay _client = (client); } - private CefSharp.IRegistration _InspectNodeRequestedEventRegistration; - private System.EventHandler _InspectNodeRequested; /// /// Fired when the node should be inspected. This happens after call to `setInspectMode` or when /// user manually inspects an element. @@ -35449,31 +34391,15 @@ namespace CefSharp.DevTools.Overlay { add { - if ((_InspectNodeRequested) == (null)) - { - _InspectNodeRequestedEventRegistration = (_client.RegisterEventHandler("Overlay.inspectNodeRequested", OnInspectNodeRequested)); - } - - _InspectNodeRequested += (value); + _client.AddEventHandler("Overlay.inspectNodeRequested", value); } remove { - _InspectNodeRequested -= (value); - if ((_InspectNodeRequested) == (null)) - { - _InspectNodeRequestedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Overlay.inspectNodeRequested", value); } } - private void OnInspectNodeRequested(object sender, InspectNodeRequestedEventArgs args) - { - _InspectNodeRequested?.Invoke(this, args); - } - - private CefSharp.IRegistration _NodeHighlightRequestedEventRegistration; - private System.EventHandler _NodeHighlightRequested; /// /// Fired when the node should be highlighted. This happens after call to `setInspectMode`. /// @@ -35481,31 +34407,15 @@ namespace CefSharp.DevTools.Overlay { add { - if ((_NodeHighlightRequested) == (null)) - { - _NodeHighlightRequestedEventRegistration = (_client.RegisterEventHandler("Overlay.nodeHighlightRequested", OnNodeHighlightRequested)); - } - - _NodeHighlightRequested += (value); + _client.AddEventHandler("Overlay.nodeHighlightRequested", value); } remove { - _NodeHighlightRequested -= (value); - if ((_NodeHighlightRequested) == (null)) - { - _NodeHighlightRequestedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Overlay.nodeHighlightRequested", value); } } - private void OnNodeHighlightRequested(object sender, NodeHighlightRequestedEventArgs args) - { - _NodeHighlightRequested?.Invoke(this, args); - } - - private CefSharp.IRegistration _ScreenshotRequestedEventRegistration; - private System.EventHandler _ScreenshotRequested; /// /// Fired when user asks to capture screenshot of some area on the page. /// @@ -35513,61 +34423,31 @@ namespace CefSharp.DevTools.Overlay { add { - if ((_ScreenshotRequested) == (null)) - { - _ScreenshotRequestedEventRegistration = (_client.RegisterEventHandler("Overlay.screenshotRequested", OnScreenshotRequested)); - } - - _ScreenshotRequested += (value); + _client.AddEventHandler("Overlay.screenshotRequested", value); } remove { - _ScreenshotRequested -= (value); - if ((_ScreenshotRequested) == (null)) - { - _ScreenshotRequestedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Overlay.screenshotRequested", value); } } - private void OnScreenshotRequested(object sender, ScreenshotRequestedEventArgs args) - { - _ScreenshotRequested?.Invoke(this, args); - } - - private CefSharp.IRegistration _InspectModeCanceledEventRegistration; - private System.EventHandler _InspectModeCanceled; /// /// Fired when user cancels the inspect mode. /// - public event System.EventHandler InspectModeCanceled + public event System.EventHandler InspectModeCanceled { add { - if ((_InspectModeCanceled) == (null)) - { - _InspectModeCanceledEventRegistration = (_client.RegisterEventHandler("Overlay.inspectModeCanceled", OnInspectModeCanceled)); - } - - _InspectModeCanceled += (value); + _client.AddEventHandler("Overlay.inspectModeCanceled", value); } remove { - _InspectModeCanceled -= (value); - if ((_InspectModeCanceled) == (null)) - { - _InspectModeCanceledEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Overlay.inspectModeCanceled", value); } } - private void OnInspectModeCanceled(object sender, CefSharp.DevTools.DevToolsEventArgs args) - { - _InspectModeCanceled?.Invoke(this, args); - } - /// /// Disables domain notifications. /// @@ -36609,8 +35489,6 @@ namespace CefSharp.DevTools.Page _client = (client); } - private CefSharp.IRegistration _DomContentEventFiredEventRegistration; - private System.EventHandler _DomContentEventFired; /// /// DomContentEventFired /// @@ -36618,31 +35496,15 @@ namespace CefSharp.DevTools.Page { add { - if ((_DomContentEventFired) == (null)) - { - _DomContentEventFiredEventRegistration = (_client.RegisterEventHandler("Page.domContentEventFired", OnDomContentEventFired)); - } - - _DomContentEventFired += (value); + _client.AddEventHandler("Page.domContentEventFired", value); } remove { - _DomContentEventFired -= (value); - if ((_DomContentEventFired) == (null)) - { - _DomContentEventFiredEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Page.domContentEventFired", value); } } - private void OnDomContentEventFired(object sender, DomContentEventFiredEventArgs args) - { - _DomContentEventFired?.Invoke(this, args); - } - - private CefSharp.IRegistration _FileChooserOpenedEventRegistration; - private System.EventHandler _FileChooserOpened; /// /// Emitted only when `page.interceptFileChooser` is enabled. /// @@ -36650,31 +35512,15 @@ namespace CefSharp.DevTools.Page { add { - if ((_FileChooserOpened) == (null)) - { - _FileChooserOpenedEventRegistration = (_client.RegisterEventHandler("Page.fileChooserOpened", OnFileChooserOpened)); - } - - _FileChooserOpened += (value); + _client.AddEventHandler("Page.fileChooserOpened", value); } remove { - _FileChooserOpened -= (value); - if ((_FileChooserOpened) == (null)) - { - _FileChooserOpenedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Page.fileChooserOpened", value); } } - private void OnFileChooserOpened(object sender, FileChooserOpenedEventArgs args) - { - _FileChooserOpened?.Invoke(this, args); - } - - private CefSharp.IRegistration _FrameAttachedEventRegistration; - private System.EventHandler _FrameAttached; /// /// Fired when frame has been attached to its parent. /// @@ -36682,31 +35528,15 @@ namespace CefSharp.DevTools.Page { add { - if ((_FrameAttached) == (null)) - { - _FrameAttachedEventRegistration = (_client.RegisterEventHandler("Page.frameAttached", OnFrameAttached)); - } - - _FrameAttached += (value); + _client.AddEventHandler("Page.frameAttached", value); } remove { - _FrameAttached -= (value); - if ((_FrameAttached) == (null)) - { - _FrameAttachedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Page.frameAttached", value); } } - private void OnFrameAttached(object sender, FrameAttachedEventArgs args) - { - _FrameAttached?.Invoke(this, args); - } - - private CefSharp.IRegistration _FrameDetachedEventRegistration; - private System.EventHandler _FrameDetached; /// /// Fired when frame has been detached from its parent. /// @@ -36714,31 +35544,15 @@ namespace CefSharp.DevTools.Page { add { - if ((_FrameDetached) == (null)) - { - _FrameDetachedEventRegistration = (_client.RegisterEventHandler("Page.frameDetached", OnFrameDetached)); - } - - _FrameDetached += (value); + _client.AddEventHandler("Page.frameDetached", value); } remove { - _FrameDetached -= (value); - if ((_FrameDetached) == (null)) - { - _FrameDetachedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Page.frameDetached", value); } } - private void OnFrameDetached(object sender, FrameDetachedEventArgs args) - { - _FrameDetached?.Invoke(this, args); - } - - private CefSharp.IRegistration _FrameNavigatedEventRegistration; - private System.EventHandler _FrameNavigated; /// /// Fired once navigation of the frame has completed. Frame is now associated with the new loader. /// @@ -36746,31 +35560,15 @@ namespace CefSharp.DevTools.Page { add { - if ((_FrameNavigated) == (null)) - { - _FrameNavigatedEventRegistration = (_client.RegisterEventHandler("Page.frameNavigated", OnFrameNavigated)); - } - - _FrameNavigated += (value); + _client.AddEventHandler("Page.frameNavigated", value); } remove { - _FrameNavigated -= (value); - if ((_FrameNavigated) == (null)) - { - _FrameNavigatedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Page.frameNavigated", value); } } - private void OnFrameNavigated(object sender, FrameNavigatedEventArgs args) - { - _FrameNavigated?.Invoke(this, args); - } - - private CefSharp.IRegistration _DocumentOpenedEventRegistration; - private System.EventHandler _DocumentOpened; /// /// Fired when opening document to write to. /// @@ -36778,63 +35576,31 @@ namespace CefSharp.DevTools.Page { add { - if ((_DocumentOpened) == (null)) - { - _DocumentOpenedEventRegistration = (_client.RegisterEventHandler("Page.documentOpened", OnDocumentOpened)); - } - - _DocumentOpened += (value); + _client.AddEventHandler("Page.documentOpened", value); } remove { - _DocumentOpened -= (value); - if ((_DocumentOpened) == (null)) - { - _DocumentOpenedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Page.documentOpened", value); } } - private void OnDocumentOpened(object sender, DocumentOpenedEventArgs args) - { - _DocumentOpened?.Invoke(this, args); - } - - private CefSharp.IRegistration _FrameResizedEventRegistration; - private System.EventHandler _FrameResized; /// /// FrameResized /// - public event System.EventHandler FrameResized + public event System.EventHandler FrameResized { add { - if ((_FrameResized) == (null)) - { - _FrameResizedEventRegistration = (_client.RegisterEventHandler("Page.frameResized", OnFrameResized)); - } - - _FrameResized += (value); + _client.AddEventHandler("Page.frameResized", value); } remove { - _FrameResized -= (value); - if ((_FrameResized) == (null)) - { - _FrameResizedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Page.frameResized", value); } } - private void OnFrameResized(object sender, CefSharp.DevTools.DevToolsEventArgs args) - { - _FrameResized?.Invoke(this, args); - } - - private CefSharp.IRegistration _FrameRequestedNavigationEventRegistration; - private System.EventHandler _FrameRequestedNavigation; /// /// Fired when a renderer-initiated navigation is requested. /// Navigation may still be cancelled after the event is issued. @@ -36843,31 +35609,15 @@ namespace CefSharp.DevTools.Page { add { - if ((_FrameRequestedNavigation) == (null)) - { - _FrameRequestedNavigationEventRegistration = (_client.RegisterEventHandler("Page.frameRequestedNavigation", OnFrameRequestedNavigation)); - } - - _FrameRequestedNavigation += (value); + _client.AddEventHandler("Page.frameRequestedNavigation", value); } remove { - _FrameRequestedNavigation -= (value); - if ((_FrameRequestedNavigation) == (null)) - { - _FrameRequestedNavigationEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Page.frameRequestedNavigation", value); } } - private void OnFrameRequestedNavigation(object sender, FrameRequestedNavigationEventArgs args) - { - _FrameRequestedNavigation?.Invoke(this, args); - } - - private CefSharp.IRegistration _FrameStartedLoadingEventRegistration; - private System.EventHandler _FrameStartedLoading; /// /// Fired when frame has started loading. /// @@ -36875,31 +35625,15 @@ namespace CefSharp.DevTools.Page { add { - if ((_FrameStartedLoading) == (null)) - { - _FrameStartedLoadingEventRegistration = (_client.RegisterEventHandler("Page.frameStartedLoading", OnFrameStartedLoading)); - } - - _FrameStartedLoading += (value); + _client.AddEventHandler("Page.frameStartedLoading", value); } remove { - _FrameStartedLoading -= (value); - if ((_FrameStartedLoading) == (null)) - { - _FrameStartedLoadingEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Page.frameStartedLoading", value); } } - private void OnFrameStartedLoading(object sender, FrameStartedLoadingEventArgs args) - { - _FrameStartedLoading?.Invoke(this, args); - } - - private CefSharp.IRegistration _FrameStoppedLoadingEventRegistration; - private System.EventHandler _FrameStoppedLoading; /// /// Fired when frame has stopped loading. /// @@ -36907,95 +35641,47 @@ namespace CefSharp.DevTools.Page { add { - if ((_FrameStoppedLoading) == (null)) - { - _FrameStoppedLoadingEventRegistration = (_client.RegisterEventHandler("Page.frameStoppedLoading", OnFrameStoppedLoading)); - } - - _FrameStoppedLoading += (value); + _client.AddEventHandler("Page.frameStoppedLoading", value); } remove { - _FrameStoppedLoading -= (value); - if ((_FrameStoppedLoading) == (null)) - { - _FrameStoppedLoadingEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Page.frameStoppedLoading", value); } } - private void OnFrameStoppedLoading(object sender, FrameStoppedLoadingEventArgs args) - { - _FrameStoppedLoading?.Invoke(this, args); - } - - private CefSharp.IRegistration _InterstitialHiddenEventRegistration; - private System.EventHandler _InterstitialHidden; /// /// Fired when interstitial page was hidden /// - public event System.EventHandler InterstitialHidden + public event System.EventHandler InterstitialHidden { add { - if ((_InterstitialHidden) == (null)) - { - _InterstitialHiddenEventRegistration = (_client.RegisterEventHandler("Page.interstitialHidden", OnInterstitialHidden)); - } - - _InterstitialHidden += (value); + _client.AddEventHandler("Page.interstitialHidden", value); } remove { - _InterstitialHidden -= (value); - if ((_InterstitialHidden) == (null)) - { - _InterstitialHiddenEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Page.interstitialHidden", value); } } - private void OnInterstitialHidden(object sender, CefSharp.DevTools.DevToolsEventArgs args) - { - _InterstitialHidden?.Invoke(this, args); - } - - private CefSharp.IRegistration _InterstitialShownEventRegistration; - private System.EventHandler _InterstitialShown; /// /// Fired when interstitial page was shown /// - public event System.EventHandler InterstitialShown + public event System.EventHandler InterstitialShown { add { - if ((_InterstitialShown) == (null)) - { - _InterstitialShownEventRegistration = (_client.RegisterEventHandler("Page.interstitialShown", OnInterstitialShown)); - } - - _InterstitialShown += (value); + _client.AddEventHandler("Page.interstitialShown", value); } remove { - _InterstitialShown -= (value); - if ((_InterstitialShown) == (null)) - { - _InterstitialShownEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Page.interstitialShown", value); } } - private void OnInterstitialShown(object sender, CefSharp.DevTools.DevToolsEventArgs args) - { - _InterstitialShown?.Invoke(this, args); - } - - private CefSharp.IRegistration _JavascriptDialogClosedEventRegistration; - private System.EventHandler _JavascriptDialogClosed; /// /// Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) has been /// closed. @@ -37004,31 +35690,15 @@ namespace CefSharp.DevTools.Page { add { - if ((_JavascriptDialogClosed) == (null)) - { - _JavascriptDialogClosedEventRegistration = (_client.RegisterEventHandler("Page.javascriptDialogClosed", OnJavascriptDialogClosed)); - } - - _JavascriptDialogClosed += (value); + _client.AddEventHandler("Page.javascriptDialogClosed", value); } remove { - _JavascriptDialogClosed -= (value); - if ((_JavascriptDialogClosed) == (null)) - { - _JavascriptDialogClosedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Page.javascriptDialogClosed", value); } } - private void OnJavascriptDialogClosed(object sender, JavascriptDialogClosedEventArgs args) - { - _JavascriptDialogClosed?.Invoke(this, args); - } - - private CefSharp.IRegistration _JavascriptDialogOpeningEventRegistration; - private System.EventHandler _JavascriptDialogOpening; /// /// Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) is about to /// open. @@ -37037,31 +35707,15 @@ namespace CefSharp.DevTools.Page { add { - if ((_JavascriptDialogOpening) == (null)) - { - _JavascriptDialogOpeningEventRegistration = (_client.RegisterEventHandler("Page.javascriptDialogOpening", OnJavascriptDialogOpening)); - } - - _JavascriptDialogOpening += (value); + _client.AddEventHandler("Page.javascriptDialogOpening", value); } remove { - _JavascriptDialogOpening -= (value); - if ((_JavascriptDialogOpening) == (null)) - { - _JavascriptDialogOpeningEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Page.javascriptDialogOpening", value); } } - private void OnJavascriptDialogOpening(object sender, JavascriptDialogOpeningEventArgs args) - { - _JavascriptDialogOpening?.Invoke(this, args); - } - - private CefSharp.IRegistration _LifecycleEventEventRegistration; - private System.EventHandler _LifecycleEvent; /// /// Fired for top level page lifecycle events such as navigation, load, paint, etc. /// @@ -37069,31 +35723,15 @@ namespace CefSharp.DevTools.Page { add { - if ((_LifecycleEvent) == (null)) - { - _LifecycleEventEventRegistration = (_client.RegisterEventHandler("Page.lifecycleEvent", OnLifecycleEvent)); - } - - _LifecycleEvent += (value); + _client.AddEventHandler("Page.lifecycleEvent", value); } remove { - _LifecycleEvent -= (value); - if ((_LifecycleEvent) == (null)) - { - _LifecycleEventEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Page.lifecycleEvent", value); } } - private void OnLifecycleEvent(object sender, LifecycleEventEventArgs args) - { - _LifecycleEvent?.Invoke(this, args); - } - - private CefSharp.IRegistration _BackForwardCacheNotUsedEventRegistration; - private System.EventHandler _BackForwardCacheNotUsed; /// /// Fired for failed bfcache history navigations if BackForwardCache feature is enabled. Do /// not assume any ordering with the Page.frameNavigated event. This event is fired only for @@ -37104,31 +35742,15 @@ namespace CefSharp.DevTools.Page { add { - if ((_BackForwardCacheNotUsed) == (null)) - { - _BackForwardCacheNotUsedEventRegistration = (_client.RegisterEventHandler("Page.backForwardCacheNotUsed", OnBackForwardCacheNotUsed)); - } - - _BackForwardCacheNotUsed += (value); + _client.AddEventHandler("Page.backForwardCacheNotUsed", value); } remove { - _BackForwardCacheNotUsed -= (value); - if ((_BackForwardCacheNotUsed) == (null)) - { - _BackForwardCacheNotUsedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Page.backForwardCacheNotUsed", value); } } - private void OnBackForwardCacheNotUsed(object sender, BackForwardCacheNotUsedEventArgs args) - { - _BackForwardCacheNotUsed?.Invoke(this, args); - } - - private CefSharp.IRegistration _LoadEventFiredEventRegistration; - private System.EventHandler _LoadEventFired; /// /// LoadEventFired /// @@ -37136,31 +35758,15 @@ namespace CefSharp.DevTools.Page { add { - if ((_LoadEventFired) == (null)) - { - _LoadEventFiredEventRegistration = (_client.RegisterEventHandler("Page.loadEventFired", OnLoadEventFired)); - } - - _LoadEventFired += (value); + _client.AddEventHandler("Page.loadEventFired", value); } remove { - _LoadEventFired -= (value); - if ((_LoadEventFired) == (null)) - { - _LoadEventFiredEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Page.loadEventFired", value); } } - private void OnLoadEventFired(object sender, LoadEventFiredEventArgs args) - { - _LoadEventFired?.Invoke(this, args); - } - - private CefSharp.IRegistration _NavigatedWithinDocumentEventRegistration; - private System.EventHandler _NavigatedWithinDocument; /// /// Fired when same-document navigation happens, e.g. due to history API usage or anchor navigation. /// @@ -37168,31 +35774,15 @@ namespace CefSharp.DevTools.Page { add { - if ((_NavigatedWithinDocument) == (null)) - { - _NavigatedWithinDocumentEventRegistration = (_client.RegisterEventHandler("Page.navigatedWithinDocument", OnNavigatedWithinDocument)); - } - - _NavigatedWithinDocument += (value); + _client.AddEventHandler("Page.navigatedWithinDocument", value); } remove { - _NavigatedWithinDocument -= (value); - if ((_NavigatedWithinDocument) == (null)) - { - _NavigatedWithinDocumentEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Page.navigatedWithinDocument", value); } } - private void OnNavigatedWithinDocument(object sender, NavigatedWithinDocumentEventArgs args) - { - _NavigatedWithinDocument?.Invoke(this, args); - } - - private CefSharp.IRegistration _ScreencastFrameEventRegistration; - private System.EventHandler _ScreencastFrame; /// /// Compressed image data requested by the `startScreencast`. /// @@ -37200,31 +35790,15 @@ namespace CefSharp.DevTools.Page { add { - if ((_ScreencastFrame) == (null)) - { - _ScreencastFrameEventRegistration = (_client.RegisterEventHandler("Page.screencastFrame", OnScreencastFrame)); - } - - _ScreencastFrame += (value); + _client.AddEventHandler("Page.screencastFrame", value); } remove { - _ScreencastFrame -= (value); - if ((_ScreencastFrame) == (null)) - { - _ScreencastFrameEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Page.screencastFrame", value); } } - private void OnScreencastFrame(object sender, ScreencastFrameEventArgs args) - { - _ScreencastFrame?.Invoke(this, args); - } - - private CefSharp.IRegistration _ScreencastVisibilityChangedEventRegistration; - private System.EventHandler _ScreencastVisibilityChanged; /// /// Fired when the page with currently enabled screencast was shown or hidden `. /// @@ -37232,31 +35806,15 @@ namespace CefSharp.DevTools.Page { add { - if ((_ScreencastVisibilityChanged) == (null)) - { - _ScreencastVisibilityChangedEventRegistration = (_client.RegisterEventHandler("Page.screencastVisibilityChanged", OnScreencastVisibilityChanged)); - } - - _ScreencastVisibilityChanged += (value); + _client.AddEventHandler("Page.screencastVisibilityChanged", value); } remove { - _ScreencastVisibilityChanged -= (value); - if ((_ScreencastVisibilityChanged) == (null)) - { - _ScreencastVisibilityChangedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Page.screencastVisibilityChanged", value); } } - private void OnScreencastVisibilityChanged(object sender, ScreencastVisibilityChangedEventArgs args) - { - _ScreencastVisibilityChanged?.Invoke(this, args); - } - - private CefSharp.IRegistration _WindowOpenEventRegistration; - private System.EventHandler _WindowOpen; /// /// Fired when a new window is going to be opened, via window.open(), link click, form submission, /// etc. @@ -37265,31 +35823,15 @@ namespace CefSharp.DevTools.Page { add { - if ((_WindowOpen) == (null)) - { - _WindowOpenEventRegistration = (_client.RegisterEventHandler("Page.windowOpen", OnWindowOpen)); - } - - _WindowOpen += (value); + _client.AddEventHandler("Page.windowOpen", value); } remove { - _WindowOpen -= (value); - if ((_WindowOpen) == (null)) - { - _WindowOpenEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Page.windowOpen", value); } } - private void OnWindowOpen(object sender, WindowOpenEventArgs args) - { - _WindowOpen?.Invoke(this, args); - } - - private CefSharp.IRegistration _CompilationCacheProducedEventRegistration; - private System.EventHandler _CompilationCacheProduced; /// /// Issued for every compilation cache generated. Is only available /// if Page.setGenerateCompilationCache is enabled. @@ -37298,29 +35840,15 @@ namespace CefSharp.DevTools.Page { add { - if ((_CompilationCacheProduced) == (null)) - { - _CompilationCacheProducedEventRegistration = (_client.RegisterEventHandler("Page.compilationCacheProduced", OnCompilationCacheProduced)); - } - - _CompilationCacheProduced += (value); + _client.AddEventHandler("Page.compilationCacheProduced", value); } remove { - _CompilationCacheProduced -= (value); - if ((_CompilationCacheProduced) == (null)) - { - _CompilationCacheProducedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Page.compilationCacheProduced", value); } } - private void OnCompilationCacheProduced(object sender, CompilationCacheProducedEventArgs args) - { - _CompilationCacheProduced?.Invoke(this, args); - } - partial void ValidateAddScriptToEvaluateOnNewDocument(string source, string worldName = null, bool? includeCommandLineAPI = null); /// /// Evaluates given script in every frame upon creation (before loading frame's scripts). @@ -38188,8 +36716,6 @@ namespace CefSharp.DevTools.Performance _client = (client); } - private CefSharp.IRegistration _MetricsEventRegistration; - private System.EventHandler _Metrics; /// /// Current values of the metrics. /// @@ -38197,29 +36723,15 @@ namespace CefSharp.DevTools.Performance { add { - if ((_Metrics) == (null)) - { - _MetricsEventRegistration = (_client.RegisterEventHandler("Performance.metrics", OnMetrics)); - } - - _Metrics += (value); + _client.AddEventHandler("Performance.metrics", value); } remove { - _Metrics -= (value); - if ((_Metrics) == (null)) - { - _MetricsEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Performance.metrics", value); } } - private void OnMetrics(object sender, MetricsEventArgs args) - { - _Metrics?.Invoke(this, args); - } - /// /// Disable collecting and reporting metrics. /// @@ -38280,8 +36792,6 @@ namespace CefSharp.DevTools.PerformanceTimeline _client = (client); } - private CefSharp.IRegistration _TimelineEventAddedEventRegistration; - private System.EventHandler _TimelineEventAdded; /// /// Sent when a performance timeline event is added. See reportPerformanceTimeline method. /// @@ -38289,29 +36799,15 @@ namespace CefSharp.DevTools.PerformanceTimeline { add { - if ((_TimelineEventAdded) == (null)) - { - _TimelineEventAddedEventRegistration = (_client.RegisterEventHandler("PerformanceTimeline.timelineEventAdded", OnTimelineEventAdded)); - } - - _TimelineEventAdded += (value); + _client.AddEventHandler("PerformanceTimeline.timelineEventAdded", value); } remove { - _TimelineEventAdded -= (value); - if ((_TimelineEventAdded) == (null)) - { - _TimelineEventAddedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("PerformanceTimeline.timelineEventAdded", value); } } - private void OnTimelineEventAdded(object sender, TimelineEventAddedEventArgs args) - { - _TimelineEventAdded?.Invoke(this, args); - } - partial void ValidateEnable(string[] eventTypes); /// /// Previously buffered events would be reported before method returns. @@ -38348,8 +36844,6 @@ namespace CefSharp.DevTools.Security _client = (client); } - private CefSharp.IRegistration _VisibleSecurityStateChangedEventRegistration; - private System.EventHandler _VisibleSecurityStateChanged; /// /// The security state of the page changed. /// @@ -38357,31 +36851,15 @@ namespace CefSharp.DevTools.Security { add { - if ((_VisibleSecurityStateChanged) == (null)) - { - _VisibleSecurityStateChangedEventRegistration = (_client.RegisterEventHandler("Security.visibleSecurityStateChanged", OnVisibleSecurityStateChanged)); - } - - _VisibleSecurityStateChanged += (value); + _client.AddEventHandler("Security.visibleSecurityStateChanged", value); } remove { - _VisibleSecurityStateChanged -= (value); - if ((_VisibleSecurityStateChanged) == (null)) - { - _VisibleSecurityStateChangedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Security.visibleSecurityStateChanged", value); } } - private void OnVisibleSecurityStateChanged(object sender, VisibleSecurityStateChangedEventArgs args) - { - _VisibleSecurityStateChanged?.Invoke(this, args); - } - - private CefSharp.IRegistration _SecurityStateChangedEventRegistration; - private System.EventHandler _SecurityStateChanged; /// /// The security state of the page changed. /// @@ -38389,29 +36867,15 @@ namespace CefSharp.DevTools.Security { add { - if ((_SecurityStateChanged) == (null)) - { - _SecurityStateChangedEventRegistration = (_client.RegisterEventHandler("Security.securityStateChanged", OnSecurityStateChanged)); - } - - _SecurityStateChanged += (value); + _client.AddEventHandler("Security.securityStateChanged", value); } remove { - _SecurityStateChanged -= (value); - if ((_SecurityStateChanged) == (null)) - { - _SecurityStateChangedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Security.securityStateChanged", value); } } - private void OnSecurityStateChanged(object sender, SecurityStateChangedEventArgs args) - { - _SecurityStateChanged?.Invoke(this, args); - } - /// /// Disables tracking security state changes. /// @@ -38467,8 +36931,6 @@ namespace CefSharp.DevTools.ServiceWorker _client = (client); } - private CefSharp.IRegistration _WorkerErrorReportedEventRegistration; - private System.EventHandler _WorkerErrorReported; /// /// WorkerErrorReported /// @@ -38476,31 +36938,15 @@ namespace CefSharp.DevTools.ServiceWorker { add { - if ((_WorkerErrorReported) == (null)) - { - _WorkerErrorReportedEventRegistration = (_client.RegisterEventHandler("ServiceWorker.workerErrorReported", OnWorkerErrorReported)); - } - - _WorkerErrorReported += (value); + _client.AddEventHandler("ServiceWorker.workerErrorReported", value); } remove { - _WorkerErrorReported -= (value); - if ((_WorkerErrorReported) == (null)) - { - _WorkerErrorReportedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("ServiceWorker.workerErrorReported", value); } } - private void OnWorkerErrorReported(object sender, WorkerErrorReportedEventArgs args) - { - _WorkerErrorReported?.Invoke(this, args); - } - - private CefSharp.IRegistration _WorkerRegistrationUpdatedEventRegistration; - private System.EventHandler _WorkerRegistrationUpdated; /// /// WorkerRegistrationUpdated /// @@ -38508,31 +36954,15 @@ namespace CefSharp.DevTools.ServiceWorker { add { - if ((_WorkerRegistrationUpdated) == (null)) - { - _WorkerRegistrationUpdatedEventRegistration = (_client.RegisterEventHandler("ServiceWorker.workerRegistrationUpdated", OnWorkerRegistrationUpdated)); - } - - _WorkerRegistrationUpdated += (value); + _client.AddEventHandler("ServiceWorker.workerRegistrationUpdated", value); } remove { - _WorkerRegistrationUpdated -= (value); - if ((_WorkerRegistrationUpdated) == (null)) - { - _WorkerRegistrationUpdatedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("ServiceWorker.workerRegistrationUpdated", value); } } - private void OnWorkerRegistrationUpdated(object sender, WorkerRegistrationUpdatedEventArgs args) - { - _WorkerRegistrationUpdated?.Invoke(this, args); - } - - private CefSharp.IRegistration _WorkerVersionUpdatedEventRegistration; - private System.EventHandler _WorkerVersionUpdated; /// /// WorkerVersionUpdated /// @@ -38540,29 +36970,15 @@ namespace CefSharp.DevTools.ServiceWorker { add { - if ((_WorkerVersionUpdated) == (null)) - { - _WorkerVersionUpdatedEventRegistration = (_client.RegisterEventHandler("ServiceWorker.workerVersionUpdated", OnWorkerVersionUpdated)); - } - - _WorkerVersionUpdated += (value); + _client.AddEventHandler("ServiceWorker.workerVersionUpdated", value); } remove { - _WorkerVersionUpdated -= (value); - if ((_WorkerVersionUpdated) == (null)) - { - _WorkerVersionUpdatedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("ServiceWorker.workerVersionUpdated", value); } } - private void OnWorkerVersionUpdated(object sender, WorkerVersionUpdatedEventArgs args) - { - _WorkerVersionUpdated?.Invoke(this, args); - } - partial void ValidateDeliverPushMessage(string origin, string registrationId, string data); /// /// DeliverPushMessage @@ -38881,8 +37297,6 @@ namespace CefSharp.DevTools.Storage _client = (client); } - private CefSharp.IRegistration _CacheStorageContentUpdatedEventRegistration; - private System.EventHandler _CacheStorageContentUpdated; /// /// A cache's contents have been modified. /// @@ -38890,31 +37304,15 @@ namespace CefSharp.DevTools.Storage { add { - if ((_CacheStorageContentUpdated) == (null)) - { - _CacheStorageContentUpdatedEventRegistration = (_client.RegisterEventHandler("Storage.cacheStorageContentUpdated", OnCacheStorageContentUpdated)); - } - - _CacheStorageContentUpdated += (value); + _client.AddEventHandler("Storage.cacheStorageContentUpdated", value); } remove { - _CacheStorageContentUpdated -= (value); - if ((_CacheStorageContentUpdated) == (null)) - { - _CacheStorageContentUpdatedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Storage.cacheStorageContentUpdated", value); } } - private void OnCacheStorageContentUpdated(object sender, CacheStorageContentUpdatedEventArgs args) - { - _CacheStorageContentUpdated?.Invoke(this, args); - } - - private CefSharp.IRegistration _CacheStorageListUpdatedEventRegistration; - private System.EventHandler _CacheStorageListUpdated; /// /// A cache has been added/deleted. /// @@ -38922,31 +37320,15 @@ namespace CefSharp.DevTools.Storage { add { - if ((_CacheStorageListUpdated) == (null)) - { - _CacheStorageListUpdatedEventRegistration = (_client.RegisterEventHandler("Storage.cacheStorageListUpdated", OnCacheStorageListUpdated)); - } - - _CacheStorageListUpdated += (value); + _client.AddEventHandler("Storage.cacheStorageListUpdated", value); } remove { - _CacheStorageListUpdated -= (value); - if ((_CacheStorageListUpdated) == (null)) - { - _CacheStorageListUpdatedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Storage.cacheStorageListUpdated", value); } } - private void OnCacheStorageListUpdated(object sender, CacheStorageListUpdatedEventArgs args) - { - _CacheStorageListUpdated?.Invoke(this, args); - } - - private CefSharp.IRegistration _IndexedDBContentUpdatedEventRegistration; - private System.EventHandler _IndexedDBContentUpdated; /// /// The origin's IndexedDB object store has been modified. /// @@ -38954,31 +37336,15 @@ namespace CefSharp.DevTools.Storage { add { - if ((_IndexedDBContentUpdated) == (null)) - { - _IndexedDBContentUpdatedEventRegistration = (_client.RegisterEventHandler("Storage.indexedDBContentUpdated", OnIndexedDBContentUpdated)); - } - - _IndexedDBContentUpdated += (value); + _client.AddEventHandler("Storage.indexedDBContentUpdated", value); } remove { - _IndexedDBContentUpdated -= (value); - if ((_IndexedDBContentUpdated) == (null)) - { - _IndexedDBContentUpdatedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Storage.indexedDBContentUpdated", value); } } - private void OnIndexedDBContentUpdated(object sender, IndexedDBContentUpdatedEventArgs args) - { - _IndexedDBContentUpdated?.Invoke(this, args); - } - - private CefSharp.IRegistration _IndexedDBListUpdatedEventRegistration; - private System.EventHandler _IndexedDBListUpdated; /// /// The origin's IndexedDB database list has been modified. /// @@ -38986,29 +37352,15 @@ namespace CefSharp.DevTools.Storage { add { - if ((_IndexedDBListUpdated) == (null)) - { - _IndexedDBListUpdatedEventRegistration = (_client.RegisterEventHandler("Storage.indexedDBListUpdated", OnIndexedDBListUpdated)); - } - - _IndexedDBListUpdated += (value); + _client.AddEventHandler("Storage.indexedDBListUpdated", value); } remove { - _IndexedDBListUpdated -= (value); - if ((_IndexedDBListUpdated) == (null)) - { - _IndexedDBListUpdatedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Storage.indexedDBListUpdated", value); } } - private void OnIndexedDBListUpdated(object sender, IndexedDBListUpdatedEventArgs args) - { - _IndexedDBListUpdated?.Invoke(this, args); - } - partial void ValidateClearDataForOrigin(string origin, string storageTypes); /// /// Clears storage for origin. @@ -39492,8 +37844,6 @@ namespace CefSharp.DevTools.Target _client = (client); } - private CefSharp.IRegistration _AttachedToTargetEventRegistration; - private System.EventHandler _AttachedToTarget; /// /// Issued when attached to target because of auto-attach or `attachToTarget` command. /// @@ -39501,31 +37851,15 @@ namespace CefSharp.DevTools.Target { add { - if ((_AttachedToTarget) == (null)) - { - _AttachedToTargetEventRegistration = (_client.RegisterEventHandler("Target.attachedToTarget", OnAttachedToTarget)); - } - - _AttachedToTarget += (value); + _client.AddEventHandler("Target.attachedToTarget", value); } remove { - _AttachedToTarget -= (value); - if ((_AttachedToTarget) == (null)) - { - _AttachedToTargetEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Target.attachedToTarget", value); } } - private void OnAttachedToTarget(object sender, AttachedToTargetEventArgs args) - { - _AttachedToTarget?.Invoke(this, args); - } - - private CefSharp.IRegistration _DetachedFromTargetEventRegistration; - private System.EventHandler _DetachedFromTarget; /// /// Issued when detached from target for any reason (including `detachFromTarget` command). Can be /// issued multiple times per target if multiple sessions have been attached to it. @@ -39534,31 +37868,15 @@ namespace CefSharp.DevTools.Target { add { - if ((_DetachedFromTarget) == (null)) - { - _DetachedFromTargetEventRegistration = (_client.RegisterEventHandler("Target.detachedFromTarget", OnDetachedFromTarget)); - } - - _DetachedFromTarget += (value); + _client.AddEventHandler("Target.detachedFromTarget", value); } remove { - _DetachedFromTarget -= (value); - if ((_DetachedFromTarget) == (null)) - { - _DetachedFromTargetEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Target.detachedFromTarget", value); } } - private void OnDetachedFromTarget(object sender, DetachedFromTargetEventArgs args) - { - _DetachedFromTarget?.Invoke(this, args); - } - - private CefSharp.IRegistration _ReceivedMessageFromTargetEventRegistration; - private System.EventHandler _ReceivedMessageFromTarget; /// /// Notifies about a new protocol message received from the session (as reported in /// `attachedToTarget` event). @@ -39567,31 +37885,15 @@ namespace CefSharp.DevTools.Target { add { - if ((_ReceivedMessageFromTarget) == (null)) - { - _ReceivedMessageFromTargetEventRegistration = (_client.RegisterEventHandler("Target.receivedMessageFromTarget", OnReceivedMessageFromTarget)); - } - - _ReceivedMessageFromTarget += (value); + _client.AddEventHandler("Target.receivedMessageFromTarget", value); } remove { - _ReceivedMessageFromTarget -= (value); - if ((_ReceivedMessageFromTarget) == (null)) - { - _ReceivedMessageFromTargetEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Target.receivedMessageFromTarget", value); } } - private void OnReceivedMessageFromTarget(object sender, ReceivedMessageFromTargetEventArgs args) - { - _ReceivedMessageFromTarget?.Invoke(this, args); - } - - private CefSharp.IRegistration _TargetCreatedEventRegistration; - private System.EventHandler _TargetCreated; /// /// Issued when a possible inspection target is created. /// @@ -39599,31 +37901,15 @@ namespace CefSharp.DevTools.Target { add { - if ((_TargetCreated) == (null)) - { - _TargetCreatedEventRegistration = (_client.RegisterEventHandler("Target.targetCreated", OnTargetCreated)); - } - - _TargetCreated += (value); + _client.AddEventHandler("Target.targetCreated", value); } remove { - _TargetCreated -= (value); - if ((_TargetCreated) == (null)) - { - _TargetCreatedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Target.targetCreated", value); } } - private void OnTargetCreated(object sender, TargetCreatedEventArgs args) - { - _TargetCreated?.Invoke(this, args); - } - - private CefSharp.IRegistration _TargetDestroyedEventRegistration; - private System.EventHandler _TargetDestroyed; /// /// Issued when a target is destroyed. /// @@ -39631,31 +37917,15 @@ namespace CefSharp.DevTools.Target { add { - if ((_TargetDestroyed) == (null)) - { - _TargetDestroyedEventRegistration = (_client.RegisterEventHandler("Target.targetDestroyed", OnTargetDestroyed)); - } - - _TargetDestroyed += (value); + _client.AddEventHandler("Target.targetDestroyed", value); } remove { - _TargetDestroyed -= (value); - if ((_TargetDestroyed) == (null)) - { - _TargetDestroyedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Target.targetDestroyed", value); } } - private void OnTargetDestroyed(object sender, TargetDestroyedEventArgs args) - { - _TargetDestroyed?.Invoke(this, args); - } - - private CefSharp.IRegistration _TargetCrashedEventRegistration; - private System.EventHandler _TargetCrashed; /// /// Issued when a target has crashed. /// @@ -39663,31 +37933,15 @@ namespace CefSharp.DevTools.Target { add { - if ((_TargetCrashed) == (null)) - { - _TargetCrashedEventRegistration = (_client.RegisterEventHandler("Target.targetCrashed", OnTargetCrashed)); - } - - _TargetCrashed += (value); + _client.AddEventHandler("Target.targetCrashed", value); } remove { - _TargetCrashed -= (value); - if ((_TargetCrashed) == (null)) - { - _TargetCrashedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Target.targetCrashed", value); } } - private void OnTargetCrashed(object sender, TargetCrashedEventArgs args) - { - _TargetCrashed?.Invoke(this, args); - } - - private CefSharp.IRegistration _TargetInfoChangedEventRegistration; - private System.EventHandler _TargetInfoChanged; /// /// Issued when some information about a target has changed. This only happens between /// `targetCreated` and `targetDestroyed`. @@ -39696,29 +37950,15 @@ namespace CefSharp.DevTools.Target { add { - if ((_TargetInfoChanged) == (null)) - { - _TargetInfoChangedEventRegistration = (_client.RegisterEventHandler("Target.targetInfoChanged", OnTargetInfoChanged)); - } - - _TargetInfoChanged += (value); + _client.AddEventHandler("Target.targetInfoChanged", value); } remove { - _TargetInfoChanged -= (value); - if ((_TargetInfoChanged) == (null)) - { - _TargetInfoChangedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Target.targetInfoChanged", value); } } - private void OnTargetInfoChanged(object sender, TargetInfoChangedEventArgs args) - { - _TargetInfoChanged?.Invoke(this, args); - } - partial void ValidateActivateTarget(string targetId); /// /// Activates (focuses) the target. @@ -40037,8 +38277,6 @@ namespace CefSharp.DevTools.Tethering _client = (client); } - private CefSharp.IRegistration _AcceptedEventRegistration; - private System.EventHandler _Accepted; /// /// Informs that port was successfully bound and got a specified connection id. /// @@ -40046,29 +38284,15 @@ namespace CefSharp.DevTools.Tethering { add { - if ((_Accepted) == (null)) - { - _AcceptedEventRegistration = (_client.RegisterEventHandler("Tethering.accepted", OnAccepted)); - } - - _Accepted += (value); + _client.AddEventHandler("Tethering.accepted", value); } remove { - _Accepted -= (value); - if ((_Accepted) == (null)) - { - _AcceptedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Tethering.accepted", value); } } - private void OnAccepted(object sender, AcceptedEventArgs args) - { - _Accepted?.Invoke(this, args); - } - partial void ValidateBind(int port); /// /// Request browser port binding. @@ -40187,8 +38411,6 @@ namespace CefSharp.DevTools.Tracing _client = (client); } - private CefSharp.IRegistration _BufferUsageEventRegistration; - private System.EventHandler _BufferUsage; /// /// BufferUsage /// @@ -40196,31 +38418,15 @@ namespace CefSharp.DevTools.Tracing { add { - if ((_BufferUsage) == (null)) - { - _BufferUsageEventRegistration = (_client.RegisterEventHandler("Tracing.bufferUsage", OnBufferUsage)); - } - - _BufferUsage += (value); + _client.AddEventHandler("Tracing.bufferUsage", value); } remove { - _BufferUsage -= (value); - if ((_BufferUsage) == (null)) - { - _BufferUsageEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Tracing.bufferUsage", value); } } - private void OnBufferUsage(object sender, BufferUsageEventArgs args) - { - _BufferUsage?.Invoke(this, args); - } - - private CefSharp.IRegistration _DataCollectedEventRegistration; - private System.EventHandler _DataCollected; /// /// Contains an bucket of collected trace events. When tracing is stopped collected events will be /// send as a sequence of dataCollected events followed by tracingComplete event. @@ -40229,31 +38435,15 @@ namespace CefSharp.DevTools.Tracing { add { - if ((_DataCollected) == (null)) - { - _DataCollectedEventRegistration = (_client.RegisterEventHandler("Tracing.dataCollected", OnDataCollected)); - } - - _DataCollected += (value); + _client.AddEventHandler("Tracing.dataCollected", value); } remove { - _DataCollected -= (value); - if ((_DataCollected) == (null)) - { - _DataCollectedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Tracing.dataCollected", value); } } - private void OnDataCollected(object sender, DataCollectedEventArgs args) - { - _DataCollected?.Invoke(this, args); - } - - private CefSharp.IRegistration _TracingCompleteEventRegistration; - private System.EventHandler _TracingComplete; /// /// Signals that tracing is stopped and there is no trace buffers pending flush, all data were /// delivered via dataCollected events. @@ -40262,29 +38452,15 @@ namespace CefSharp.DevTools.Tracing { add { - if ((_TracingComplete) == (null)) - { - _TracingCompleteEventRegistration = (_client.RegisterEventHandler("Tracing.tracingComplete", OnTracingComplete)); - } - - _TracingComplete += (value); + _client.AddEventHandler("Tracing.tracingComplete", value); } remove { - _TracingComplete -= (value); - if ((_TracingComplete) == (null)) - { - _TracingCompleteEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Tracing.tracingComplete", value); } } - private void OnTracingComplete(object sender, TracingCompleteEventArgs args) - { - _TracingComplete?.Invoke(this, args); - } - /// /// Stop trace events collection. /// @@ -40481,8 +38657,6 @@ namespace CefSharp.DevTools.Fetch _client = (client); } - private CefSharp.IRegistration _RequestPausedEventRegistration; - private System.EventHandler _RequestPaused; /// /// Issued when the domain is enabled and the request URL matches the /// specified filter. The request is paused until the client responds @@ -40495,31 +38669,15 @@ namespace CefSharp.DevTools.Fetch { add { - if ((_RequestPaused) == (null)) - { - _RequestPausedEventRegistration = (_client.RegisterEventHandler("Fetch.requestPaused", OnRequestPaused)); - } - - _RequestPaused += (value); + _client.AddEventHandler("Fetch.requestPaused", value); } remove { - _RequestPaused -= (value); - if ((_RequestPaused) == (null)) - { - _RequestPausedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Fetch.requestPaused", value); } } - private void OnRequestPaused(object sender, RequestPausedEventArgs args) - { - _RequestPaused?.Invoke(this, args); - } - - private CefSharp.IRegistration _AuthRequiredEventRegistration; - private System.EventHandler _AuthRequired; /// /// Issued when the domain is enabled with handleAuthRequests set to true. /// The request is paused until client responds with continueWithAuth. @@ -40528,29 +38686,15 @@ namespace CefSharp.DevTools.Fetch { add { - if ((_AuthRequired) == (null)) - { - _AuthRequiredEventRegistration = (_client.RegisterEventHandler("Fetch.authRequired", OnAuthRequired)); - } - - _AuthRequired += (value); + _client.AddEventHandler("Fetch.authRequired", value); } remove { - _AuthRequired -= (value); - if ((_AuthRequired) == (null)) - { - _AuthRequiredEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Fetch.authRequired", value); } } - private void OnAuthRequired(object sender, AuthRequiredEventArgs args) - { - _AuthRequired?.Invoke(this, args); - } - /// /// Disables the fetch domain. /// @@ -40780,8 +38924,6 @@ namespace CefSharp.DevTools.WebAudio _client = (client); } - private CefSharp.IRegistration _ContextCreatedEventRegistration; - private System.EventHandler _ContextCreated; /// /// Notifies that a new BaseAudioContext has been created. /// @@ -40789,31 +38931,15 @@ namespace CefSharp.DevTools.WebAudio { add { - if ((_ContextCreated) == (null)) - { - _ContextCreatedEventRegistration = (_client.RegisterEventHandler("WebAudio.contextCreated", OnContextCreated)); - } - - _ContextCreated += (value); + _client.AddEventHandler("WebAudio.contextCreated", value); } remove { - _ContextCreated -= (value); - if ((_ContextCreated) == (null)) - { - _ContextCreatedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("WebAudio.contextCreated", value); } } - private void OnContextCreated(object sender, ContextCreatedEventArgs args) - { - _ContextCreated?.Invoke(this, args); - } - - private CefSharp.IRegistration _ContextWillBeDestroyedEventRegistration; - private System.EventHandler _ContextWillBeDestroyed; /// /// Notifies that an existing BaseAudioContext will be destroyed. /// @@ -40821,31 +38947,15 @@ namespace CefSharp.DevTools.WebAudio { add { - if ((_ContextWillBeDestroyed) == (null)) - { - _ContextWillBeDestroyedEventRegistration = (_client.RegisterEventHandler("WebAudio.contextWillBeDestroyed", OnContextWillBeDestroyed)); - } - - _ContextWillBeDestroyed += (value); + _client.AddEventHandler("WebAudio.contextWillBeDestroyed", value); } remove { - _ContextWillBeDestroyed -= (value); - if ((_ContextWillBeDestroyed) == (null)) - { - _ContextWillBeDestroyedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("WebAudio.contextWillBeDestroyed", value); } } - private void OnContextWillBeDestroyed(object sender, ContextWillBeDestroyedEventArgs args) - { - _ContextWillBeDestroyed?.Invoke(this, args); - } - - private CefSharp.IRegistration _ContextChangedEventRegistration; - private System.EventHandler _ContextChanged; /// /// Notifies that existing BaseAudioContext has changed some properties (id stays the same).. /// @@ -40853,31 +38963,15 @@ namespace CefSharp.DevTools.WebAudio { add { - if ((_ContextChanged) == (null)) - { - _ContextChangedEventRegistration = (_client.RegisterEventHandler("WebAudio.contextChanged", OnContextChanged)); - } - - _ContextChanged += (value); + _client.AddEventHandler("WebAudio.contextChanged", value); } remove { - _ContextChanged -= (value); - if ((_ContextChanged) == (null)) - { - _ContextChangedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("WebAudio.contextChanged", value); } } - private void OnContextChanged(object sender, ContextChangedEventArgs args) - { - _ContextChanged?.Invoke(this, args); - } - - private CefSharp.IRegistration _AudioListenerCreatedEventRegistration; - private System.EventHandler _AudioListenerCreated; /// /// Notifies that the construction of an AudioListener has finished. /// @@ -40885,31 +38979,15 @@ namespace CefSharp.DevTools.WebAudio { add { - if ((_AudioListenerCreated) == (null)) - { - _AudioListenerCreatedEventRegistration = (_client.RegisterEventHandler("WebAudio.audioListenerCreated", OnAudioListenerCreated)); - } - - _AudioListenerCreated += (value); + _client.AddEventHandler("WebAudio.audioListenerCreated", value); } remove { - _AudioListenerCreated -= (value); - if ((_AudioListenerCreated) == (null)) - { - _AudioListenerCreatedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("WebAudio.audioListenerCreated", value); } } - private void OnAudioListenerCreated(object sender, AudioListenerCreatedEventArgs args) - { - _AudioListenerCreated?.Invoke(this, args); - } - - private CefSharp.IRegistration _AudioListenerWillBeDestroyedEventRegistration; - private System.EventHandler _AudioListenerWillBeDestroyed; /// /// Notifies that a new AudioListener has been created. /// @@ -40917,31 +38995,15 @@ namespace CefSharp.DevTools.WebAudio { add { - if ((_AudioListenerWillBeDestroyed) == (null)) - { - _AudioListenerWillBeDestroyedEventRegistration = (_client.RegisterEventHandler("WebAudio.audioListenerWillBeDestroyed", OnAudioListenerWillBeDestroyed)); - } - - _AudioListenerWillBeDestroyed += (value); + _client.AddEventHandler("WebAudio.audioListenerWillBeDestroyed", value); } remove { - _AudioListenerWillBeDestroyed -= (value); - if ((_AudioListenerWillBeDestroyed) == (null)) - { - _AudioListenerWillBeDestroyedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("WebAudio.audioListenerWillBeDestroyed", value); } } - private void OnAudioListenerWillBeDestroyed(object sender, AudioListenerWillBeDestroyedEventArgs args) - { - _AudioListenerWillBeDestroyed?.Invoke(this, args); - } - - private CefSharp.IRegistration _AudioNodeCreatedEventRegistration; - private System.EventHandler _AudioNodeCreated; /// /// Notifies that a new AudioNode has been created. /// @@ -40949,31 +39011,15 @@ namespace CefSharp.DevTools.WebAudio { add { - if ((_AudioNodeCreated) == (null)) - { - _AudioNodeCreatedEventRegistration = (_client.RegisterEventHandler("WebAudio.audioNodeCreated", OnAudioNodeCreated)); - } - - _AudioNodeCreated += (value); + _client.AddEventHandler("WebAudio.audioNodeCreated", value); } remove { - _AudioNodeCreated -= (value); - if ((_AudioNodeCreated) == (null)) - { - _AudioNodeCreatedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("WebAudio.audioNodeCreated", value); } } - private void OnAudioNodeCreated(object sender, AudioNodeCreatedEventArgs args) - { - _AudioNodeCreated?.Invoke(this, args); - } - - private CefSharp.IRegistration _AudioNodeWillBeDestroyedEventRegistration; - private System.EventHandler _AudioNodeWillBeDestroyed; /// /// Notifies that an existing AudioNode has been destroyed. /// @@ -40981,31 +39027,15 @@ namespace CefSharp.DevTools.WebAudio { add { - if ((_AudioNodeWillBeDestroyed) == (null)) - { - _AudioNodeWillBeDestroyedEventRegistration = (_client.RegisterEventHandler("WebAudio.audioNodeWillBeDestroyed", OnAudioNodeWillBeDestroyed)); - } - - _AudioNodeWillBeDestroyed += (value); + _client.AddEventHandler("WebAudio.audioNodeWillBeDestroyed", value); } remove { - _AudioNodeWillBeDestroyed -= (value); - if ((_AudioNodeWillBeDestroyed) == (null)) - { - _AudioNodeWillBeDestroyedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("WebAudio.audioNodeWillBeDestroyed", value); } } - private void OnAudioNodeWillBeDestroyed(object sender, AudioNodeWillBeDestroyedEventArgs args) - { - _AudioNodeWillBeDestroyed?.Invoke(this, args); - } - - private CefSharp.IRegistration _AudioParamCreatedEventRegistration; - private System.EventHandler _AudioParamCreated; /// /// Notifies that a new AudioParam has been created. /// @@ -41013,31 +39043,15 @@ namespace CefSharp.DevTools.WebAudio { add { - if ((_AudioParamCreated) == (null)) - { - _AudioParamCreatedEventRegistration = (_client.RegisterEventHandler("WebAudio.audioParamCreated", OnAudioParamCreated)); - } - - _AudioParamCreated += (value); + _client.AddEventHandler("WebAudio.audioParamCreated", value); } remove { - _AudioParamCreated -= (value); - if ((_AudioParamCreated) == (null)) - { - _AudioParamCreatedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("WebAudio.audioParamCreated", value); } } - private void OnAudioParamCreated(object sender, AudioParamCreatedEventArgs args) - { - _AudioParamCreated?.Invoke(this, args); - } - - private CefSharp.IRegistration _AudioParamWillBeDestroyedEventRegistration; - private System.EventHandler _AudioParamWillBeDestroyed; /// /// Notifies that an existing AudioParam has been destroyed. /// @@ -41045,31 +39059,15 @@ namespace CefSharp.DevTools.WebAudio { add { - if ((_AudioParamWillBeDestroyed) == (null)) - { - _AudioParamWillBeDestroyedEventRegistration = (_client.RegisterEventHandler("WebAudio.audioParamWillBeDestroyed", OnAudioParamWillBeDestroyed)); - } - - _AudioParamWillBeDestroyed += (value); + _client.AddEventHandler("WebAudio.audioParamWillBeDestroyed", value); } remove { - _AudioParamWillBeDestroyed -= (value); - if ((_AudioParamWillBeDestroyed) == (null)) - { - _AudioParamWillBeDestroyedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("WebAudio.audioParamWillBeDestroyed", value); } } - private void OnAudioParamWillBeDestroyed(object sender, AudioParamWillBeDestroyedEventArgs args) - { - _AudioParamWillBeDestroyed?.Invoke(this, args); - } - - private CefSharp.IRegistration _NodesConnectedEventRegistration; - private System.EventHandler _NodesConnected; /// /// Notifies that two AudioNodes are connected. /// @@ -41077,31 +39075,15 @@ namespace CefSharp.DevTools.WebAudio { add { - if ((_NodesConnected) == (null)) - { - _NodesConnectedEventRegistration = (_client.RegisterEventHandler("WebAudio.nodesConnected", OnNodesConnected)); - } - - _NodesConnected += (value); + _client.AddEventHandler("WebAudio.nodesConnected", value); } remove { - _NodesConnected -= (value); - if ((_NodesConnected) == (null)) - { - _NodesConnectedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("WebAudio.nodesConnected", value); } } - private void OnNodesConnected(object sender, NodesConnectedEventArgs args) - { - _NodesConnected?.Invoke(this, args); - } - - private CefSharp.IRegistration _NodesDisconnectedEventRegistration; - private System.EventHandler _NodesDisconnected; /// /// Notifies that AudioNodes are disconnected. The destination can be null, and it means all the outgoing connections from the source are disconnected. /// @@ -41109,31 +39091,15 @@ namespace CefSharp.DevTools.WebAudio { add { - if ((_NodesDisconnected) == (null)) - { - _NodesDisconnectedEventRegistration = (_client.RegisterEventHandler("WebAudio.nodesDisconnected", OnNodesDisconnected)); - } - - _NodesDisconnected += (value); + _client.AddEventHandler("WebAudio.nodesDisconnected", value); } remove { - _NodesDisconnected -= (value); - if ((_NodesDisconnected) == (null)) - { - _NodesDisconnectedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("WebAudio.nodesDisconnected", value); } } - private void OnNodesDisconnected(object sender, NodesDisconnectedEventArgs args) - { - _NodesDisconnected?.Invoke(this, args); - } - - private CefSharp.IRegistration _NodeParamConnectedEventRegistration; - private System.EventHandler _NodeParamConnected; /// /// Notifies that an AudioNode is connected to an AudioParam. /// @@ -41141,31 +39107,15 @@ namespace CefSharp.DevTools.WebAudio { add { - if ((_NodeParamConnected) == (null)) - { - _NodeParamConnectedEventRegistration = (_client.RegisterEventHandler("WebAudio.nodeParamConnected", OnNodeParamConnected)); - } - - _NodeParamConnected += (value); + _client.AddEventHandler("WebAudio.nodeParamConnected", value); } remove { - _NodeParamConnected -= (value); - if ((_NodeParamConnected) == (null)) - { - _NodeParamConnectedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("WebAudio.nodeParamConnected", value); } } - private void OnNodeParamConnected(object sender, NodeParamConnectedEventArgs args) - { - _NodeParamConnected?.Invoke(this, args); - } - - private CefSharp.IRegistration _NodeParamDisconnectedEventRegistration; - private System.EventHandler _NodeParamDisconnected; /// /// Notifies that an AudioNode is disconnected to an AudioParam. /// @@ -41173,29 +39123,15 @@ namespace CefSharp.DevTools.WebAudio { add { - if ((_NodeParamDisconnected) == (null)) - { - _NodeParamDisconnectedEventRegistration = (_client.RegisterEventHandler("WebAudio.nodeParamDisconnected", OnNodeParamDisconnected)); - } - - _NodeParamDisconnected += (value); + _client.AddEventHandler("WebAudio.nodeParamDisconnected", value); } remove { - _NodeParamDisconnected -= (value); - if ((_NodeParamDisconnected) == (null)) - { - _NodeParamDisconnectedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("WebAudio.nodeParamDisconnected", value); } } - private void OnNodeParamDisconnected(object sender, NodeParamDisconnectedEventArgs args) - { - _NodeParamDisconnected?.Invoke(this, args); - } - /// /// Enables the WebAudio domain and starts sending context lifetime events. /// @@ -41493,8 +39429,6 @@ namespace CefSharp.DevTools.Media _client = (client); } - private CefSharp.IRegistration _PlayerPropertiesChangedEventRegistration; - private System.EventHandler _PlayerPropertiesChanged; /// /// This can be called multiple times, and can be used to set / override / /// remove player properties. A null propValue indicates removal. @@ -41503,31 +39437,15 @@ namespace CefSharp.DevTools.Media { add { - if ((_PlayerPropertiesChanged) == (null)) - { - _PlayerPropertiesChangedEventRegistration = (_client.RegisterEventHandler("Media.playerPropertiesChanged", OnPlayerPropertiesChanged)); - } - - _PlayerPropertiesChanged += (value); + _client.AddEventHandler("Media.playerPropertiesChanged", value); } remove { - _PlayerPropertiesChanged -= (value); - if ((_PlayerPropertiesChanged) == (null)) - { - _PlayerPropertiesChangedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Media.playerPropertiesChanged", value); } } - private void OnPlayerPropertiesChanged(object sender, PlayerPropertiesChangedEventArgs args) - { - _PlayerPropertiesChanged?.Invoke(this, args); - } - - private CefSharp.IRegistration _PlayerEventsAddedEventRegistration; - private System.EventHandler _PlayerEventsAdded; /// /// Send events as a list, allowing them to be batched on the browser for less /// congestion. If batched, events must ALWAYS be in chronological order. @@ -41536,31 +39454,15 @@ namespace CefSharp.DevTools.Media { add { - if ((_PlayerEventsAdded) == (null)) - { - _PlayerEventsAddedEventRegistration = (_client.RegisterEventHandler("Media.playerEventsAdded", OnPlayerEventsAdded)); - } - - _PlayerEventsAdded += (value); + _client.AddEventHandler("Media.playerEventsAdded", value); } remove { - _PlayerEventsAdded -= (value); - if ((_PlayerEventsAdded) == (null)) - { - _PlayerEventsAddedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Media.playerEventsAdded", value); } } - private void OnPlayerEventsAdded(object sender, PlayerEventsAddedEventArgs args) - { - _PlayerEventsAdded?.Invoke(this, args); - } - - private CefSharp.IRegistration _PlayerMessagesLoggedEventRegistration; - private System.EventHandler _PlayerMessagesLogged; /// /// Send a list of any messages that need to be delivered. /// @@ -41568,31 +39470,15 @@ namespace CefSharp.DevTools.Media { add { - if ((_PlayerMessagesLogged) == (null)) - { - _PlayerMessagesLoggedEventRegistration = (_client.RegisterEventHandler("Media.playerMessagesLogged", OnPlayerMessagesLogged)); - } - - _PlayerMessagesLogged += (value); + _client.AddEventHandler("Media.playerMessagesLogged", value); } remove { - _PlayerMessagesLogged -= (value); - if ((_PlayerMessagesLogged) == (null)) - { - _PlayerMessagesLoggedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Media.playerMessagesLogged", value); } } - private void OnPlayerMessagesLogged(object sender, PlayerMessagesLoggedEventArgs args) - { - _PlayerMessagesLogged?.Invoke(this, args); - } - - private CefSharp.IRegistration _PlayerErrorsRaisedEventRegistration; - private System.EventHandler _PlayerErrorsRaised; /// /// Send a list of any errors that need to be delivered. /// @@ -41600,31 +39486,15 @@ namespace CefSharp.DevTools.Media { add { - if ((_PlayerErrorsRaised) == (null)) - { - _PlayerErrorsRaisedEventRegistration = (_client.RegisterEventHandler("Media.playerErrorsRaised", OnPlayerErrorsRaised)); - } - - _PlayerErrorsRaised += (value); + _client.AddEventHandler("Media.playerErrorsRaised", value); } remove { - _PlayerErrorsRaised -= (value); - if ((_PlayerErrorsRaised) == (null)) - { - _PlayerErrorsRaisedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Media.playerErrorsRaised", value); } } - private void OnPlayerErrorsRaised(object sender, PlayerErrorsRaisedEventArgs args) - { - _PlayerErrorsRaised?.Invoke(this, args); - } - - private CefSharp.IRegistration _PlayersCreatedEventRegistration; - private System.EventHandler _PlayersCreated; /// /// Called whenever a player is created, or when a new agent joins and receives /// a list of active players. If an agent is restored, it will receive the full @@ -41634,29 +39504,15 @@ namespace CefSharp.DevTools.Media { add { - if ((_PlayersCreated) == (null)) - { - _PlayersCreatedEventRegistration = (_client.RegisterEventHandler("Media.playersCreated", OnPlayersCreated)); - } - - _PlayersCreated += (value); + _client.AddEventHandler("Media.playersCreated", value); } remove { - _PlayersCreated -= (value); - if ((_PlayersCreated) == (null)) - { - _PlayersCreatedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Media.playersCreated", value); } } - private void OnPlayersCreated(object sender, PlayersCreatedEventArgs args) - { - _PlayersCreated?.Invoke(this, args); - } - /// /// Enables the Media domain /// @@ -42063,8 +39919,6 @@ namespace CefSharp.DevTools.Debugger _client = (client); } - private CefSharp.IRegistration _BreakpointResolvedEventRegistration; - private System.EventHandler _BreakpointResolved; /// /// Fired when breakpoint is resolved to an actual script and location. /// @@ -42072,31 +39926,15 @@ namespace CefSharp.DevTools.Debugger { add { - if ((_BreakpointResolved) == (null)) - { - _BreakpointResolvedEventRegistration = (_client.RegisterEventHandler("Debugger.breakpointResolved", OnBreakpointResolved)); - } - - _BreakpointResolved += (value); + _client.AddEventHandler("Debugger.breakpointResolved", value); } remove { - _BreakpointResolved -= (value); - if ((_BreakpointResolved) == (null)) - { - _BreakpointResolvedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Debugger.breakpointResolved", value); } } - private void OnBreakpointResolved(object sender, BreakpointResolvedEventArgs args) - { - _BreakpointResolved?.Invoke(this, args); - } - - private CefSharp.IRegistration _PausedEventRegistration; - private System.EventHandler _Paused; /// /// Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. /// @@ -42104,63 +39942,31 @@ namespace CefSharp.DevTools.Debugger { add { - if ((_Paused) == (null)) - { - _PausedEventRegistration = (_client.RegisterEventHandler("Debugger.paused", OnPaused)); - } - - _Paused += (value); + _client.AddEventHandler("Debugger.paused", value); } remove { - _Paused -= (value); - if ((_Paused) == (null)) - { - _PausedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Debugger.paused", value); } } - private void OnPaused(object sender, PausedEventArgs args) - { - _Paused?.Invoke(this, args); - } - - private CefSharp.IRegistration _ResumedEventRegistration; - private System.EventHandler _Resumed; /// /// Fired when the virtual machine resumed execution. /// - public event System.EventHandler Resumed + public event System.EventHandler Resumed { add { - if ((_Resumed) == (null)) - { - _ResumedEventRegistration = (_client.RegisterEventHandler("Debugger.resumed", OnResumed)); - } - - _Resumed += (value); + _client.AddEventHandler("Debugger.resumed", value); } remove { - _Resumed -= (value); - if ((_Resumed) == (null)) - { - _ResumedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Debugger.resumed", value); } } - private void OnResumed(object sender, CefSharp.DevTools.DevToolsEventArgs args) - { - _Resumed?.Invoke(this, args); - } - - private CefSharp.IRegistration _ScriptFailedToParseEventRegistration; - private System.EventHandler _ScriptFailedToParse; /// /// Fired when virtual machine fails to parse the script. /// @@ -42168,31 +39974,15 @@ namespace CefSharp.DevTools.Debugger { add { - if ((_ScriptFailedToParse) == (null)) - { - _ScriptFailedToParseEventRegistration = (_client.RegisterEventHandler("Debugger.scriptFailedToParse", OnScriptFailedToParse)); - } - - _ScriptFailedToParse += (value); + _client.AddEventHandler("Debugger.scriptFailedToParse", value); } remove { - _ScriptFailedToParse -= (value); - if ((_ScriptFailedToParse) == (null)) - { - _ScriptFailedToParseEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Debugger.scriptFailedToParse", value); } } - private void OnScriptFailedToParse(object sender, ScriptFailedToParseEventArgs args) - { - _ScriptFailedToParse?.Invoke(this, args); - } - - private CefSharp.IRegistration _ScriptParsedEventRegistration; - private System.EventHandler _ScriptParsed; /// /// Fired when virtual machine parses script. This event is also fired for all known and uncollected /// scripts upon enabling debugger. @@ -42201,29 +39991,15 @@ namespace CefSharp.DevTools.Debugger { add { - if ((_ScriptParsed) == (null)) - { - _ScriptParsedEventRegistration = (_client.RegisterEventHandler("Debugger.scriptParsed", OnScriptParsed)); - } - - _ScriptParsed += (value); + _client.AddEventHandler("Debugger.scriptParsed", value); } remove { - _ScriptParsed -= (value); - if ((_ScriptParsed) == (null)) - { - _ScriptParsedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Debugger.scriptParsed", value); } } - private void OnScriptParsed(object sender, ScriptParsedEventArgs args) - { - _ScriptParsed?.Invoke(this, args); - } - partial void ValidateContinueToLocation(CefSharp.DevTools.Debugger.Location location, CefSharp.DevTools.Debugger.ContinueToLocationTargetCallFrames? targetCallFrames = null); /// /// Continues execution until specific location is reached. @@ -42861,8 +40637,6 @@ namespace CefSharp.DevTools.HeapProfiler _client = (client); } - private CefSharp.IRegistration _AddHeapSnapshotChunkEventRegistration; - private System.EventHandler _AddHeapSnapshotChunk; /// /// AddHeapSnapshotChunk /// @@ -42870,31 +40644,15 @@ namespace CefSharp.DevTools.HeapProfiler { add { - if ((_AddHeapSnapshotChunk) == (null)) - { - _AddHeapSnapshotChunkEventRegistration = (_client.RegisterEventHandler("HeapProfiler.addHeapSnapshotChunk", OnAddHeapSnapshotChunk)); - } - - _AddHeapSnapshotChunk += (value); + _client.AddEventHandler("HeapProfiler.addHeapSnapshotChunk", value); } remove { - _AddHeapSnapshotChunk -= (value); - if ((_AddHeapSnapshotChunk) == (null)) - { - _AddHeapSnapshotChunkEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("HeapProfiler.addHeapSnapshotChunk", value); } } - private void OnAddHeapSnapshotChunk(object sender, AddHeapSnapshotChunkEventArgs args) - { - _AddHeapSnapshotChunk?.Invoke(this, args); - } - - private CefSharp.IRegistration _HeapStatsUpdateEventRegistration; - private System.EventHandler _HeapStatsUpdate; /// /// If heap objects tracking has been started then backend may send update for one or more fragments /// @@ -42902,31 +40660,15 @@ namespace CefSharp.DevTools.HeapProfiler { add { - if ((_HeapStatsUpdate) == (null)) - { - _HeapStatsUpdateEventRegistration = (_client.RegisterEventHandler("HeapProfiler.heapStatsUpdate", OnHeapStatsUpdate)); - } - - _HeapStatsUpdate += (value); + _client.AddEventHandler("HeapProfiler.heapStatsUpdate", value); } remove { - _HeapStatsUpdate -= (value); - if ((_HeapStatsUpdate) == (null)) - { - _HeapStatsUpdateEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("HeapProfiler.heapStatsUpdate", value); } } - private void OnHeapStatsUpdate(object sender, HeapStatsUpdateEventArgs args) - { - _HeapStatsUpdate?.Invoke(this, args); - } - - private CefSharp.IRegistration _LastSeenObjectIdEventRegistration; - private System.EventHandler _LastSeenObjectId; /// /// If heap objects tracking has been started then backend regularly sends a current value for last /// seen object id and corresponding timestamp. If the were changes in the heap since last event @@ -42936,31 +40678,15 @@ namespace CefSharp.DevTools.HeapProfiler { add { - if ((_LastSeenObjectId) == (null)) - { - _LastSeenObjectIdEventRegistration = (_client.RegisterEventHandler("HeapProfiler.lastSeenObjectId", OnLastSeenObjectId)); - } - - _LastSeenObjectId += (value); + _client.AddEventHandler("HeapProfiler.lastSeenObjectId", value); } remove { - _LastSeenObjectId -= (value); - if ((_LastSeenObjectId) == (null)) - { - _LastSeenObjectIdEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("HeapProfiler.lastSeenObjectId", value); } } - private void OnLastSeenObjectId(object sender, LastSeenObjectIdEventArgs args) - { - _LastSeenObjectId?.Invoke(this, args); - } - - private CefSharp.IRegistration _ReportHeapSnapshotProgressEventRegistration; - private System.EventHandler _ReportHeapSnapshotProgress; /// /// ReportHeapSnapshotProgress /// @@ -42968,61 +40694,31 @@ namespace CefSharp.DevTools.HeapProfiler { add { - if ((_ReportHeapSnapshotProgress) == (null)) - { - _ReportHeapSnapshotProgressEventRegistration = (_client.RegisterEventHandler("HeapProfiler.reportHeapSnapshotProgress", OnReportHeapSnapshotProgress)); - } - - _ReportHeapSnapshotProgress += (value); + _client.AddEventHandler("HeapProfiler.reportHeapSnapshotProgress", value); } remove { - _ReportHeapSnapshotProgress -= (value); - if ((_ReportHeapSnapshotProgress) == (null)) - { - _ReportHeapSnapshotProgressEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("HeapProfiler.reportHeapSnapshotProgress", value); } } - private void OnReportHeapSnapshotProgress(object sender, ReportHeapSnapshotProgressEventArgs args) - { - _ReportHeapSnapshotProgress?.Invoke(this, args); - } - - private CefSharp.IRegistration _ResetProfilesEventRegistration; - private System.EventHandler _ResetProfiles; /// /// ResetProfiles /// - public event System.EventHandler ResetProfiles + public event System.EventHandler ResetProfiles { add { - if ((_ResetProfiles) == (null)) - { - _ResetProfilesEventRegistration = (_client.RegisterEventHandler("HeapProfiler.resetProfiles", OnResetProfiles)); - } - - _ResetProfiles += (value); + _client.AddEventHandler("HeapProfiler.resetProfiles", value); } remove { - _ResetProfiles -= (value); - if ((_ResetProfiles) == (null)) - { - _ResetProfilesEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("HeapProfiler.resetProfiles", value); } } - private void OnResetProfiles(object sender, CefSharp.DevTools.DevToolsEventArgs args) - { - _ResetProfiles?.Invoke(this, args); - } - partial void ValidateAddInspectedHeapObject(string heapObjectId); /// /// Enables console to refer to the node with given id via $x (see Command Line API for more details @@ -43390,8 +41086,6 @@ namespace CefSharp.DevTools.Profiler _client = (client); } - private CefSharp.IRegistration _ConsoleProfileFinishedEventRegistration; - private System.EventHandler _ConsoleProfileFinished; /// /// ConsoleProfileFinished /// @@ -43399,31 +41093,15 @@ namespace CefSharp.DevTools.Profiler { add { - if ((_ConsoleProfileFinished) == (null)) - { - _ConsoleProfileFinishedEventRegistration = (_client.RegisterEventHandler("Profiler.consoleProfileFinished", OnConsoleProfileFinished)); - } - - _ConsoleProfileFinished += (value); + _client.AddEventHandler("Profiler.consoleProfileFinished", value); } remove { - _ConsoleProfileFinished -= (value); - if ((_ConsoleProfileFinished) == (null)) - { - _ConsoleProfileFinishedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Profiler.consoleProfileFinished", value); } } - private void OnConsoleProfileFinished(object sender, ConsoleProfileFinishedEventArgs args) - { - _ConsoleProfileFinished?.Invoke(this, args); - } - - private CefSharp.IRegistration _ConsoleProfileStartedEventRegistration; - private System.EventHandler _ConsoleProfileStarted; /// /// Sent when new profile recording is started using console.profile() call. /// @@ -43431,31 +41109,15 @@ namespace CefSharp.DevTools.Profiler { add { - if ((_ConsoleProfileStarted) == (null)) - { - _ConsoleProfileStartedEventRegistration = (_client.RegisterEventHandler("Profiler.consoleProfileStarted", OnConsoleProfileStarted)); - } - - _ConsoleProfileStarted += (value); + _client.AddEventHandler("Profiler.consoleProfileStarted", value); } remove { - _ConsoleProfileStarted -= (value); - if ((_ConsoleProfileStarted) == (null)) - { - _ConsoleProfileStartedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Profiler.consoleProfileStarted", value); } } - private void OnConsoleProfileStarted(object sender, ConsoleProfileStartedEventArgs args) - { - _ConsoleProfileStarted?.Invoke(this, args); - } - - private CefSharp.IRegistration _PreciseCoverageDeltaUpdateEventRegistration; - private System.EventHandler _PreciseCoverageDeltaUpdate; /// /// Reports coverage delta since the last poll (either from an event like this, or from /// `takePreciseCoverage` for the current isolate. May only be sent if precise code @@ -43466,29 +41128,15 @@ namespace CefSharp.DevTools.Profiler { add { - if ((_PreciseCoverageDeltaUpdate) == (null)) - { - _PreciseCoverageDeltaUpdateEventRegistration = (_client.RegisterEventHandler("Profiler.preciseCoverageDeltaUpdate", OnPreciseCoverageDeltaUpdate)); - } - - _PreciseCoverageDeltaUpdate += (value); + _client.AddEventHandler("Profiler.preciseCoverageDeltaUpdate", value); } remove { - _PreciseCoverageDeltaUpdate -= (value); - if ((_PreciseCoverageDeltaUpdate) == (null)) - { - _PreciseCoverageDeltaUpdateEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Profiler.preciseCoverageDeltaUpdate", value); } } - private void OnPreciseCoverageDeltaUpdate(object sender, PreciseCoverageDeltaUpdateEventArgs args) - { - _PreciseCoverageDeltaUpdate?.Invoke(this, args); - } - /// /// Disable /// @@ -44022,8 +41670,6 @@ namespace CefSharp.DevTools.Runtime _client = (client); } - private CefSharp.IRegistration _BindingCalledEventRegistration; - private System.EventHandler _BindingCalled; /// /// Notification is issued every time when binding is called. /// @@ -44031,31 +41677,15 @@ namespace CefSharp.DevTools.Runtime { add { - if ((_BindingCalled) == (null)) - { - _BindingCalledEventRegistration = (_client.RegisterEventHandler("Runtime.bindingCalled", OnBindingCalled)); - } - - _BindingCalled += (value); + _client.AddEventHandler("Runtime.bindingCalled", value); } remove { - _BindingCalled -= (value); - if ((_BindingCalled) == (null)) - { - _BindingCalledEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Runtime.bindingCalled", value); } } - private void OnBindingCalled(object sender, BindingCalledEventArgs args) - { - _BindingCalled?.Invoke(this, args); - } - - private CefSharp.IRegistration _ConsoleAPICalledEventRegistration; - private System.EventHandler _ConsoleAPICalled; /// /// Issued when console API was called. /// @@ -44063,31 +41693,15 @@ namespace CefSharp.DevTools.Runtime { add { - if ((_ConsoleAPICalled) == (null)) - { - _ConsoleAPICalledEventRegistration = (_client.RegisterEventHandler("Runtime.consoleAPICalled", OnConsoleAPICalled)); - } - - _ConsoleAPICalled += (value); + _client.AddEventHandler("Runtime.consoleAPICalled", value); } remove { - _ConsoleAPICalled -= (value); - if ((_ConsoleAPICalled) == (null)) - { - _ConsoleAPICalledEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Runtime.consoleAPICalled", value); } } - private void OnConsoleAPICalled(object sender, ConsoleAPICalledEventArgs args) - { - _ConsoleAPICalled?.Invoke(this, args); - } - - private CefSharp.IRegistration _ExceptionRevokedEventRegistration; - private System.EventHandler _ExceptionRevoked; /// /// Issued when unhandled exception was revoked. /// @@ -44095,31 +41709,15 @@ namespace CefSharp.DevTools.Runtime { add { - if ((_ExceptionRevoked) == (null)) - { - _ExceptionRevokedEventRegistration = (_client.RegisterEventHandler("Runtime.exceptionRevoked", OnExceptionRevoked)); - } - - _ExceptionRevoked += (value); + _client.AddEventHandler("Runtime.exceptionRevoked", value); } remove { - _ExceptionRevoked -= (value); - if ((_ExceptionRevoked) == (null)) - { - _ExceptionRevokedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Runtime.exceptionRevoked", value); } } - private void OnExceptionRevoked(object sender, ExceptionRevokedEventArgs args) - { - _ExceptionRevoked?.Invoke(this, args); - } - - private CefSharp.IRegistration _ExceptionThrownEventRegistration; - private System.EventHandler _ExceptionThrown; /// /// Issued when exception was thrown and unhandled. /// @@ -44127,31 +41725,15 @@ namespace CefSharp.DevTools.Runtime { add { - if ((_ExceptionThrown) == (null)) - { - _ExceptionThrownEventRegistration = (_client.RegisterEventHandler("Runtime.exceptionThrown", OnExceptionThrown)); - } - - _ExceptionThrown += (value); + _client.AddEventHandler("Runtime.exceptionThrown", value); } remove { - _ExceptionThrown -= (value); - if ((_ExceptionThrown) == (null)) - { - _ExceptionThrownEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Runtime.exceptionThrown", value); } } - private void OnExceptionThrown(object sender, ExceptionThrownEventArgs args) - { - _ExceptionThrown?.Invoke(this, args); - } - - private CefSharp.IRegistration _ExecutionContextCreatedEventRegistration; - private System.EventHandler _ExecutionContextCreated; /// /// Issued when new execution context is created. /// @@ -44159,31 +41741,15 @@ namespace CefSharp.DevTools.Runtime { add { - if ((_ExecutionContextCreated) == (null)) - { - _ExecutionContextCreatedEventRegistration = (_client.RegisterEventHandler("Runtime.executionContextCreated", OnExecutionContextCreated)); - } - - _ExecutionContextCreated += (value); + _client.AddEventHandler("Runtime.executionContextCreated", value); } remove { - _ExecutionContextCreated -= (value); - if ((_ExecutionContextCreated) == (null)) - { - _ExecutionContextCreatedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Runtime.executionContextCreated", value); } } - private void OnExecutionContextCreated(object sender, ExecutionContextCreatedEventArgs args) - { - _ExecutionContextCreated?.Invoke(this, args); - } - - private CefSharp.IRegistration _ExecutionContextDestroyedEventRegistration; - private System.EventHandler _ExecutionContextDestroyed; /// /// Issued when execution context is destroyed. /// @@ -44191,63 +41757,31 @@ namespace CefSharp.DevTools.Runtime { add { - if ((_ExecutionContextDestroyed) == (null)) - { - _ExecutionContextDestroyedEventRegistration = (_client.RegisterEventHandler("Runtime.executionContextDestroyed", OnExecutionContextDestroyed)); - } - - _ExecutionContextDestroyed += (value); + _client.AddEventHandler("Runtime.executionContextDestroyed", value); } remove { - _ExecutionContextDestroyed -= (value); - if ((_ExecutionContextDestroyed) == (null)) - { - _ExecutionContextDestroyedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Runtime.executionContextDestroyed", value); } } - private void OnExecutionContextDestroyed(object sender, ExecutionContextDestroyedEventArgs args) - { - _ExecutionContextDestroyed?.Invoke(this, args); - } - - private CefSharp.IRegistration _ExecutionContextsClearedEventRegistration; - private System.EventHandler _ExecutionContextsCleared; /// /// Issued when all executionContexts were cleared in browser /// - public event System.EventHandler ExecutionContextsCleared + public event System.EventHandler ExecutionContextsCleared { add { - if ((_ExecutionContextsCleared) == (null)) - { - _ExecutionContextsClearedEventRegistration = (_client.RegisterEventHandler("Runtime.executionContextsCleared", OnExecutionContextsCleared)); - } - - _ExecutionContextsCleared += (value); + _client.AddEventHandler("Runtime.executionContextsCleared", value); } remove { - _ExecutionContextsCleared -= (value); - if ((_ExecutionContextsCleared) == (null)) - { - _ExecutionContextsClearedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Runtime.executionContextsCleared", value); } } - private void OnExecutionContextsCleared(object sender, CefSharp.DevTools.DevToolsEventArgs args) - { - _ExecutionContextsCleared?.Invoke(this, args); - } - - private CefSharp.IRegistration _InspectRequestedEventRegistration; - private System.EventHandler _InspectRequested; /// /// Issued when object should be inspected (for example, as a result of inspect() command line API /// call). @@ -44256,29 +41790,15 @@ namespace CefSharp.DevTools.Runtime { add { - if ((_InspectRequested) == (null)) - { - _InspectRequestedEventRegistration = (_client.RegisterEventHandler("Runtime.inspectRequested", OnInspectRequested)); - } - - _InspectRequested += (value); + _client.AddEventHandler("Runtime.inspectRequested", value); } remove { - _InspectRequested -= (value); - if ((_InspectRequested) == (null)) - { - _InspectRequestedEventRegistration?.Dispose(); - } + _client.RemoveEventHandler("Runtime.inspectRequested", value); } } - private void OnInspectRequested(object sender, InspectRequestedEventArgs args) - { - _InspectRequested?.Invoke(this, args); - } - partial void ValidateAwaitPromise(string promiseObjectId, bool? returnByValue = null, bool? generatePreview = null); /// /// Add handler to promise with given promise object id. @@ -44823,6 +42343,9 @@ namespace CefSharp.DevTools public partial class DevToolsClient { private CefSharp.DevTools.Accessibility.AccessibilityClient _Accessibility; + /// + /// Accessibility + /// public CefSharp.DevTools.Accessibility.AccessibilityClient Accessibility { get @@ -44837,6 +42360,9 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.Animation.AnimationClient _Animation; + /// + /// Animation + /// public CefSharp.DevTools.Animation.AnimationClient Animation { get @@ -44851,6 +42377,9 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.ApplicationCache.ApplicationCacheClient _ApplicationCache; + /// + /// ApplicationCache + /// public CefSharp.DevTools.ApplicationCache.ApplicationCacheClient ApplicationCache { get @@ -44865,6 +42394,9 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.Audits.AuditsClient _Audits; + /// + /// Audits domain allows investigation of page violations and possible improvements. + /// public CefSharp.DevTools.Audits.AuditsClient Audits { get @@ -44879,6 +42411,9 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.BackgroundService.BackgroundServiceClient _BackgroundService; + /// + /// Defines events for background web platform features. + /// public CefSharp.DevTools.BackgroundService.BackgroundServiceClient BackgroundService { get @@ -44893,6 +42428,9 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.Browser.BrowserClient _Browser; + /// + /// The Browser domain defines methods and events for browser managing. + /// public CefSharp.DevTools.Browser.BrowserClient Browser { get @@ -44907,6 +42445,14 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.CSS.CSSClient _CSS; + /// + /// This domain exposes CSS read/write operations. All CSS objects (stylesheets, rules, and styles) + /// have an associated `id` used in subsequent operations on the related object. Each object type has + /// a specific `id` structure, and those are not interchangeable between objects of different kinds. + /// CSS objects can be loaded using the `get*ForNode()` calls (which accept a DOM node id). A client + /// can also keep track of stylesheets via the `styleSheetAdded`/`styleSheetRemoved` events and + /// subsequently load the required stylesheet contents using the `getStyleSheet[Text]()` methods. + /// public CefSharp.DevTools.CSS.CSSClient CSS { get @@ -44921,6 +42467,9 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.CacheStorage.CacheStorageClient _CacheStorage; + /// + /// CacheStorage + /// public CefSharp.DevTools.CacheStorage.CacheStorageClient CacheStorage { get @@ -44935,6 +42484,10 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.Cast.CastClient _Cast; + /// + /// A domain for interacting with Cast, Presentation API, and Remote Playback API + /// functionalities. + /// public CefSharp.DevTools.Cast.CastClient Cast { get @@ -44949,6 +42502,15 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.DOM.DOMClient _DOM; + /// + /// This domain exposes DOM read/write operations. Each DOM Node is represented with its mirror object + /// that has an `id`. This `id` can be used to get additional information on the Node, resolve it into + /// the JavaScript object wrapper, etc. It is important that client receives DOM events only for the + /// nodes that are known to the client. Backend keeps track of the nodes that were sent to the client + /// and never sends the same node twice. It is client's responsibility to collect information about + /// the nodes that were sent to the client.<p>Note that `iframe` owner elements will return + /// corresponding document elements as their child nodes.</p> + /// public CefSharp.DevTools.DOM.DOMClient DOM { get @@ -44963,6 +42525,10 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.DOMDebugger.DOMDebuggerClient _DOMDebugger; + /// + /// DOM debugging allows setting breakpoints on particular DOM operations and events. JavaScript + /// execution will stop on these operations as if there was a regular breakpoint set. + /// public CefSharp.DevTools.DOMDebugger.DOMDebuggerClient DOMDebugger { get @@ -44977,6 +42543,9 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.DOMSnapshot.DOMSnapshotClient _DOMSnapshot; + /// + /// This domain facilitates obtaining document snapshots with DOM, layout, and style information. + /// public CefSharp.DevTools.DOMSnapshot.DOMSnapshotClient DOMSnapshot { get @@ -44991,6 +42560,9 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.DOMStorage.DOMStorageClient _DOMStorage; + /// + /// Query and modify DOM storage. + /// public CefSharp.DevTools.DOMStorage.DOMStorageClient DOMStorage { get @@ -45005,6 +42577,9 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.Database.DatabaseClient _Database; + /// + /// Database + /// public CefSharp.DevTools.Database.DatabaseClient Database { get @@ -45019,6 +42594,9 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.DeviceOrientation.DeviceOrientationClient _DeviceOrientation; + /// + /// DeviceOrientation + /// public CefSharp.DevTools.DeviceOrientation.DeviceOrientationClient DeviceOrientation { get @@ -45033,6 +42611,9 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.Emulation.EmulationClient _Emulation; + /// + /// This domain emulates different environments for the page. + /// public CefSharp.DevTools.Emulation.EmulationClient Emulation { get @@ -45047,6 +42628,9 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.HeadlessExperimental.HeadlessExperimentalClient _HeadlessExperimental; + /// + /// This domain provides experimental commands only supported in headless mode. + /// public CefSharp.DevTools.HeadlessExperimental.HeadlessExperimentalClient HeadlessExperimental { get @@ -45061,6 +42645,9 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.IO.IOClient _IO; + /// + /// Input/Output operations for streams produced by DevTools. + /// public CefSharp.DevTools.IO.IOClient IO { get @@ -45075,6 +42662,9 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.IndexedDB.IndexedDBClient _IndexedDB; + /// + /// IndexedDB + /// public CefSharp.DevTools.IndexedDB.IndexedDBClient IndexedDB { get @@ -45089,6 +42679,9 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.Input.InputClient _Input; + /// + /// Input + /// public CefSharp.DevTools.Input.InputClient Input { get @@ -45103,6 +42696,9 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.Inspector.InspectorClient _Inspector; + /// + /// Inspector + /// public CefSharp.DevTools.Inspector.InspectorClient Inspector { get @@ -45117,6 +42713,9 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.LayerTree.LayerTreeClient _LayerTree; + /// + /// LayerTree + /// public CefSharp.DevTools.LayerTree.LayerTreeClient LayerTree { get @@ -45131,6 +42730,9 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.Log.LogClient _Log; + /// + /// Provides access to log entries. + /// public CefSharp.DevTools.Log.LogClient Log { get @@ -45145,6 +42747,9 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.Memory.MemoryClient _Memory; + /// + /// Memory + /// public CefSharp.DevTools.Memory.MemoryClient Memory { get @@ -45159,6 +42764,10 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.Network.NetworkClient _Network; + /// + /// Network domain allows tracking network activities of the page. It exposes information about http, + /// file, data and other requests and responses, their headers, bodies, timing, etc. + /// public CefSharp.DevTools.Network.NetworkClient Network { get @@ -45173,6 +42782,9 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.Overlay.OverlayClient _Overlay; + /// + /// This domain provides various functionality related to drawing atop the inspected page. + /// public CefSharp.DevTools.Overlay.OverlayClient Overlay { get @@ -45187,6 +42799,9 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.Page.PageClient _Page; + /// + /// Actions and events related to the inspected page belong to the page domain. + /// public CefSharp.DevTools.Page.PageClient Page { get @@ -45201,6 +42816,9 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.Performance.PerformanceClient _Performance; + /// + /// Performance + /// public CefSharp.DevTools.Performance.PerformanceClient Performance { get @@ -45215,6 +42833,10 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.PerformanceTimeline.PerformanceTimelineClient _PerformanceTimeline; + /// + /// Reporting of performance timeline events, as specified in + /// https://w3c.github.io/performance-timeline/#dom-performanceobserver. + /// public CefSharp.DevTools.PerformanceTimeline.PerformanceTimelineClient PerformanceTimeline { get @@ -45229,6 +42851,9 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.Security.SecurityClient _Security; + /// + /// Security + /// public CefSharp.DevTools.Security.SecurityClient Security { get @@ -45243,6 +42868,9 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.ServiceWorker.ServiceWorkerClient _ServiceWorker; + /// + /// ServiceWorker + /// public CefSharp.DevTools.ServiceWorker.ServiceWorkerClient ServiceWorker { get @@ -45257,6 +42885,9 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.Storage.StorageClient _Storage; + /// + /// Storage + /// public CefSharp.DevTools.Storage.StorageClient Storage { get @@ -45271,6 +42902,9 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.SystemInfo.SystemInfoClient _SystemInfo; + /// + /// The SystemInfo domain defines methods and events for querying low-level system information. + /// public CefSharp.DevTools.SystemInfo.SystemInfoClient SystemInfo { get @@ -45285,6 +42919,9 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.Target.TargetClient _Target; + /// + /// Supports additional targets discovery and allows to attach to them. + /// public CefSharp.DevTools.Target.TargetClient Target { get @@ -45299,6 +42936,9 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.Tethering.TetheringClient _Tethering; + /// + /// The Tethering domain defines methods and events for browser port binding. + /// public CefSharp.DevTools.Tethering.TetheringClient Tethering { get @@ -45313,6 +42953,9 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.Tracing.TracingClient _Tracing; + /// + /// Tracing + /// public CefSharp.DevTools.Tracing.TracingClient Tracing { get @@ -45327,6 +42970,9 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.Fetch.FetchClient _Fetch; + /// + /// A domain for letting clients substitute browser's network layer with client code. + /// public CefSharp.DevTools.Fetch.FetchClient Fetch { get @@ -45341,6 +42987,10 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.WebAudio.WebAudioClient _WebAudio; + /// + /// This domain allows inspection of Web Audio API. + /// https://webaudio.github.io/web-audio-api/ + /// public CefSharp.DevTools.WebAudio.WebAudioClient WebAudio { get @@ -45355,6 +43005,10 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.WebAuthn.WebAuthnClient _WebAuthn; + /// + /// This domain allows configuring virtual authenticators to test the WebAuthn + /// API. + /// public CefSharp.DevTools.WebAuthn.WebAuthnClient WebAuthn { get @@ -45369,6 +43023,9 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.Media.MediaClient _Media; + /// + /// This domain allows detailed inspection of media elements + /// public CefSharp.DevTools.Media.MediaClient Media { get @@ -45383,6 +43040,10 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.Debugger.DebuggerClient _Debugger; + /// + /// Debugger domain exposes JavaScript debugging capabilities. It allows setting and removing + /// breakpoints, stepping through execution, exploring stack traces, etc. + /// public CefSharp.DevTools.Debugger.DebuggerClient Debugger { get @@ -45397,6 +43058,9 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.HeapProfiler.HeapProfilerClient _HeapProfiler; + /// + /// HeapProfiler + /// public CefSharp.DevTools.HeapProfiler.HeapProfilerClient HeapProfiler { get @@ -45411,6 +43075,9 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.Profiler.ProfilerClient _Profiler; + /// + /// Profiler + /// public CefSharp.DevTools.Profiler.ProfilerClient Profiler { get @@ -45425,6 +43092,13 @@ namespace CefSharp.DevTools } private CefSharp.DevTools.Runtime.RuntimeClient _Runtime; + /// + /// Runtime domain exposes JavaScript runtime by means of remote evaluation and mirror objects. + /// Evaluation results are returned as mirror object that expose object type, string representation + /// and unique identifier that can be used for further object reference. Original objects are + /// maintained in memory unless they are either explicitly released or are released along with the + /// other objects in their object group. + /// public CefSharp.DevTools.Runtime.RuntimeClient Runtime { get diff --git a/CefSharp/DevTools/DevToolsClient.cs b/CefSharp/DevTools/DevToolsClient.cs index db020c4e3..ed7b3894b 100644 --- a/CefSharp/DevTools/DevToolsClient.cs +++ b/CefSharp/DevTools/DevToolsClient.cs @@ -20,7 +20,7 @@ namespace CefSharp.DevTools public partial class DevToolsClient : IDevToolsMessageObserver, IDevToolsClient { private readonly ConcurrentDictionary queuedCommandResults = new ConcurrentDictionary(); - private readonly ConcurrentDictionary> eventHandlers = new ConcurrentDictionary>(); + private readonly ConcurrentDictionary eventHandlers = new ConcurrentDictionary(); private IBrowser browser; private IRegistration devToolsRegistration; private bool devToolsAttached; @@ -78,27 +78,26 @@ namespace CefSharp.DevTools } /// - public IRegistration RegisterEventHandler(string eventName, EventHandler eventHandler) where T : DevToolsDomainEventArgsBase + public void AddEventHandler(string eventName, EventHandler eventHandler) where T : EventArgs { - EventHandler handler = (sender, stream) => + var eventProxy = eventHandlers.GetOrAdd(eventName, _ => new EventProxy(DeserializeJsonEvent)); + + var p = (EventProxy)eventProxy; + p.AddHandler(eventHandler); + } + + /// + public void RemoveEventHandler(string eventName, EventHandler eventHandler) where T : EventArgs + { + if (eventHandlers.TryGetValue(eventName, out IEventProxy eventProxy)) { - stream.Position = 0; - if (typeof(T) == typeof(DevToolsEventArgs) || typeof(T) == typeof(DevToolsDomainEventArgsBase)) + var p = ((EventProxy)eventProxy); + if(p.RemoveHandler(eventHandler)) { - var paramsAsJsonString = StreamToString(stream, leaveOpen: true); - var args = new DevToolsEventArgs(eventName, paramsAsJsonString); - - eventHandler(sender, (T)(object)args); + //TODO: Replace with out _ once we upgrade to VS2019 + eventHandlers.TryRemove(eventName, out IEventProxy e); } - else - { - eventHandler(sender, DeserializeJson(stream)); - } - }; - - eventHandlers.AddOrUpdate(eventName, _ => handler, (_, existingHandler) => existingHandler += handler); - - return new DevToolsEventHandlerRegistration(eventName, handler, eventHandlers); + } } /// @@ -210,6 +209,14 @@ namespace CefSharp.DevTools devToolsRegistration?.Dispose(); devToolsRegistration = null; browser = null; + + var events = eventHandlers.Values; + eventHandlers.Clear(); + + foreach(var evt in events) + { + evt.Dispose(); + } } } @@ -238,10 +245,9 @@ namespace CefSharp.DevTools evt(this, new DevToolsEventArgs(method, paramsAsJsonString)); } - EventHandler eventHandler; - if (eventHandlers.TryGetValue(method, out eventHandler)) + if (eventHandlers.TryGetValue(method, out IEventProxy eventProxy)) { - eventHandler(this, parameters); + eventProxy.Raise(this, method, parameters); } } @@ -291,6 +297,33 @@ namespace CefSharp.DevTools } + /// + /// Deserialize the JSON stream into a .Net object. + /// For .Net Core/.Net 5.0 uses System.Text.Json + /// for .Net 4.5.2 uses System.Runtime.Serialization.Json + /// + /// Object type + /// event Name + /// JSON stream + /// object of type + private static T DeserializeJsonEvent(string eventName, Stream stream) where T : EventArgs + { + if (typeof(T) == typeof(EventArgs)) + { + return (T)EventArgs.Empty; + } + + if (typeof(T) == typeof(DevToolsEventArgs)) + { + var paramsAsJsonString = StreamToString(stream, leaveOpen: true); + var args = new DevToolsEventArgs(eventName, paramsAsJsonString); + + return (T)(object)args; + } + + return (T)DeserializeJson(typeof(T), stream); + } + /// /// Deserialize the JSON stream into a .Net object. /// For .Net Core/.Net 5.0 uses System.Text.Json diff --git a/CefSharp/DevTools/DevToolsEventHandlerRegistration.cs b/CefSharp/DevTools/DevToolsEventHandlerRegistration.cs deleted file mode 100644 index e22ecfdff..000000000 --- a/CefSharp/DevTools/DevToolsEventHandlerRegistration.cs +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright © 2020 The CefSharp Authors. All rights reserved. -// -// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. - -using System; -using System.Collections.Concurrent; -using System.IO; - -namespace CefSharp.DevTools -{ - // Helper class for disposing event handler registrations - internal sealed class DevToolsEventHandlerRegistration : IRegistration - { - private readonly string _eventName; - private ConcurrentDictionary> _eventHandlers; - private EventHandler _eventHandler; - - public DevToolsEventHandlerRegistration(string eventName, EventHandler eventHandler, ConcurrentDictionary> eventHandlers) - { - _eventName = eventName; - _eventHandler = eventHandler; - _eventHandlers = eventHandlers; - } - - public void Dispose() - { - var eventHandler = _eventHandler; - var eventHandlers = _eventHandlers; - - _eventHandler = null; - _eventHandlers = null; - - if (eventHandler != null && eventHandlers != null) - { - EventHandler eventRegistration; - if (eventHandlers.TryGetValue(_eventName, out eventRegistration)) - { - eventRegistration -= eventHandler; - if (eventRegistration == null) - { - eventHandlers.TryRemove(_eventName, out _); - } - } - } - } - } -} diff --git a/CefSharp/DevTools/EventProxy.cs b/CefSharp/DevTools/EventProxy.cs new file mode 100644 index 000000000..befd07cc8 --- /dev/null +++ b/CefSharp/DevTools/EventProxy.cs @@ -0,0 +1,57 @@ +// Copyright © 2021 The CefSharp Authors. All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. + +//Originally based on https://github.com/CefNet/CefNet.DevTools.Protocol/blob/0a124720474a469b5cef03839418f5e1debaf2f0/CefNet.DevTools.Protocol/Internal/EventProxy.T.cs + +using System; +using System.IO; + +namespace CefSharp.DevTools +{ + /// + /// Generic Typed Event Proxy + /// + /// Event Args Type + internal class EventProxy : IEventProxy + { + private event EventHandler handlers; + private Func convert; + + public EventProxy(Func convert) + { + this.convert = convert; + } + + public void AddHandler(EventHandler handler) + { + handlers += handler; + } + + /// + /// Remove the event handler + /// + /// event handler to remove + /// returns true if the last event handler for this proxy was removed. + public bool RemoveHandler(EventHandler handler) + { + handlers -= handler; + + return handlers == null; + } + + public void Raise(object sender, string eventName, Stream stream) + { + stream.Position = 0; + + var args = convert(eventName, stream); + + handlers?.Invoke(sender, args); + } + + public void Dispose() + { + handlers = null; + } + } +} diff --git a/CefSharp/DevTools/IDevToolsClient.cs b/CefSharp/DevTools/IDevToolsClient.cs index 48615bbbf..fbffada03 100644 --- a/CefSharp/DevTools/IDevToolsClient.cs +++ b/CefSharp/DevTools/IDevToolsClient.cs @@ -21,22 +21,29 @@ namespace CefSharp.DevTools event EventHandler DevToolsEvent; /// - /// Registers an event handler for a DevTools protocol event. Events by default are disabled and need to be + /// Add event handler for a DevTools protocol event. Events by default are disabled and need to be /// enabled on a per domain basis, e.g. Sending Network.enable (or calling ) /// to enable network related events. /// /// The event args type to which the event will be deserialized to. /// is the event name to listen to /// event handler to call when the event occurs - /// return an IRegistration that can be used to unregister the event handler. - IRegistration RegisterEventHandler(string eventName, EventHandler eventHandler) where T : DevToolsDomainEventArgsBase; + void AddEventHandler(string eventName, EventHandler eventHandler) where T : EventArgs; + + /// + /// Remove event handler for a DevTools protocol event. + /// + /// The event args type to which the event will be deserialized to. + /// is the event name to listen to + /// event handler to call when the event occurs + void RemoveEventHandler(string eventName, EventHandler eventHandler) where T : EventArgs; /// /// Execute a method call over the DevTools protocol. This method can be called on any thread. /// See the DevTools protocol documentation at https://chromedevtools.github.io/devtools-protocol/ for details /// of supported methods and the expected dictionary contents. /// - /// The type into which the result will be deserialzed. + /// The type to which the method result will be deserialzed to. /// is the method name /// are the method parameters represented as a dictionary, /// which may be empty. diff --git a/CefSharp/DevTools/IEventProxy.cs b/CefSharp/DevTools/IEventProxy.cs new file mode 100644 index 000000000..98710c956 --- /dev/null +++ b/CefSharp/DevTools/IEventProxy.cs @@ -0,0 +1,25 @@ +// Copyright © 2021 The CefSharp Authors. All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. + +// Originally Based on https://github.com/CefNet/CefNet.DevTools.Protocol/blob/0a124720474a469b5cef03839418f5e1debaf2f0/CefNet.DevTools.Protocol/IEventProxy.cs + +using System; +using System.IO; + +namespace CefSharp.DevTools +{ + /// + /// Event Proxy + /// + internal interface IEventProxy : IDisposable + { + /// + /// Raise Event + /// + /// sender + /// event name + /// json Stream + void Raise(object sender, string eventName, Stream stream); + } +}