Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public encode(stream: OutputBinaryStream) {
// tslint:disable:no-bitwise
const encodingMask = getLocalizeText_EncodingByte(this);
encodeByte(encodingMask, stream);
if ((encodingMask & 0x01) === 0x01) {
encodeString(this.locale, stream);
}
if ((encodingMask & 0x02) === 0x02) {
encodeString(this.text, stream);
}
}
}
// write namespace uri
if (encodingMask & DiagnosticInfo_EncodingByte.NamespaceURI) {
encodeInt32(diagnosticInfo.namespaceURI, stream);
}
// write locale
if (encodingMask & DiagnosticInfo_EncodingByte.Locale) {
encodeInt32(diagnosticInfo.locale, stream);
}
// write localized text
if (encodingMask & DiagnosticInfo_EncodingByte.LocalizedText) {
encodeInt32(diagnosticInfo.localizedText, stream);
}
// write additional info
if (encodingMask & DiagnosticInfo_EncodingByte.AdditionalInfo) {
encodeString(diagnosticInfo.additionalInfo, stream);
}
// write inner status code
if (encodingMask & DiagnosticInfo_EncodingByte.InnerStatusCode) {
encodeStatusCode(diagnosticInfo.innerStatusCode, stream);
}
// write innerDiagnosticInfo
if (encodingMask & DiagnosticInfo_EncodingByte.InnerDiagnosticInfo) {
assert(diagnosticInfo.innerDiagnosticInfo !== null, "missing innerDiagnosticInfo");
if (diagnosticInfo.innerDiagnosticInfo) {
encode_DiagnosticInfo(diagnosticInfo.innerDiagnosticInfo, stream);
}
}
}
public encode(stream: OutputBinaryStream) {
// tslint:disable:no-bitwise
const encodingMask = getLocalizeText_EncodingByte(this);
encodeByte(encodingMask, stream);
if ((encodingMask & 0x01) === 0x01) {
encodeString(this.locale, stream);
}
if ((encodingMask & 0x02) === 0x02) {
encodeString(this.text, stream);
}
}
public encode(stream: OutputBinaryStream): void {
// call base class implementation first
super.encode(stream);
encodeStatusCode(this.statusCode, stream);
encodeString(this.reason, stream);
}
encode: function (localizedText, stream) {
const encoding_mask = getLocalizeText_EncodingByte(localizedText);
ec.encodeByte(encoding_mask, stream);
if ((encoding_mask & 0x01) === 0x01) {
ec.encodeString(localizedText.locale, stream);
}
if ((encoding_mask & 0x02) === 0x02) {
ec.encodeString(localizedText.text, stream);
}
},
decode_debug: function (self, stream , options) {
public encode(stream: OutputBinaryStream) {
encodeString(this.toEncodeableString(), stream);
}
encode: (value: NumericRange | null, stream: OutputBinaryStream) => {
assert(value === null || value instanceof NumericRange);
const strValue = (value === null) ? null : value.toEncodeableString();
encodeString(strValue, stream);
},
public encode(stream: OutputBinaryStream): void {
super.encode(stream);
encodeString(this.securityPolicyUri, stream);
encodeByteString(this.senderCertificate, stream);
encodeByteString(this.receiverCertificateThumbprint, stream);
}
encode: function (localizedText, stream) {
const encoding_mask = getLocalizeText_EncodingByte(localizedText);
ec.encodeByte(encoding_mask, stream);
if ((encoding_mask & 0x01) === 0x01) {
ec.encodeString(localizedText.locale, stream);
}
if ((encoding_mask & 0x02) === 0x02) {
ec.encodeString(localizedText.text, stream);
}
},
decode_debug: function (self, stream , options) {