protected override void OnValidate()

in src/Microsoft.Azure.NotificationHubs/BrowserCredential.cs [77:98]


        protected override void OnValidate(bool allowLocalMockPns)
        {
            if (Properties == null || Properties.Count > 3)
            {
                throw new InvalidDataContractException(SRClient.BrowserRequiredProperties);
            }

            if (string.IsNullOrWhiteSpace(Subject))
            {
                throw new InvalidDataContractException(SRClient.BrowserSubjectNotSpecified);
            }

            if (string.IsNullOrWhiteSpace(VapidPublicKey))
            {
                throw new InvalidDataContractException(SRClient.BrowserVapidPublicKeyNotSpecified);
            }

            if (string.IsNullOrWhiteSpace(VapidPrivateKey))
            {
                throw new InvalidDataContractException(SRClient.BrowserVapidPrivateKeyNotSpecified);
            }
        }