/// <summary> /// Determines if the <paramref name="jsonLightMetadataProperty"/> was already written for this entry scope. /// </summary> /// <param name="jsonLightMetadataProperty">The metadata property to test for.</param> /// <returns>true if the <paramref name="jsonLightMetadataProperty"/> was already written for this entry scope; false otherwise.</returns> private bool IsMetadataPropertyWritten(JsonLightEntryMetadataProperty jsonLightMetadataProperty) { return (this.alreadyWrittenMetadataProperties & (int)jsonLightMetadataProperty) == (int)jsonLightMetadataProperty; }
/// <summary> /// Marks the <paramref name="jsonLightMetadataProperty"/> as written in this entry scope. /// </summary> /// <param name="jsonLightMetadataProperty">The metadta property which was written.</param> private void SetWrittenMetadataProperty(JsonLightEntryMetadataProperty jsonLightMetadataProperty) { Debug.Assert(!this.IsMetadataPropertyWritten(jsonLightMetadataProperty), "Can't write the same metadata property twice."); this.alreadyWrittenMetadataProperties |= (int)jsonLightMetadataProperty; }
/// <summary> /// Marks the <paramref name="jsonLightMetadataProperty"/> as written in this entry scope. /// </summary> /// <param name="jsonLightMetadataProperty">The metadta property which was written.</param> private void SetWrittenMetadataProperty(JsonLightEntryMetadataProperty jsonLightMetadataProperty) { Debug.Assert(!this.IsMetadataPropertyWritten(jsonLightMetadataProperty), "Can't write the same metadata property twice."); this.alreadyWrittenMetadataProperties |= (int)jsonLightMetadataProperty; }
/// <summary> /// Determines if the <paramref name="jsonLightMetadataProperty"/> was already written for this entry scope. /// </summary> /// <param name="jsonLightMetadataProperty">The metadata property to test for.</param> /// <returns>true if the <paramref name="jsonLightMetadataProperty"/> was already written for this entry scope; false otherwise.</returns> private bool IsMetadataPropertyWritten(JsonLightEntryMetadataProperty jsonLightMetadataProperty) { return((this.alreadyWrittenMetadataProperties & (int)jsonLightMetadataProperty) == (int)jsonLightMetadataProperty); }
/// <summary> /// Determines if the <paramref name="jsonLightMetadataProperty"/> was already written for this entry scope. /// </summary> /// <param name="jsonLightMetadataProperty">The metadata property to test for.</param> /// <returns>true if the <paramref name="jsonLightMetadataProperty"/> was already written for this entry scope; false otherwise.</returns> private bool IsMetadataPropertyWritten(JsonLightEntryMetadataProperty jsonLightMetadataProperty) { DebugUtils.CheckNoExternalCallers(); return((this.alreadyWrittenMetadataProperties & (int)jsonLightMetadataProperty) == (int)jsonLightMetadataProperty); }