/// <summary> /// Sets the ignore if default convention. /// </summary> /// <param name="convention">An ignore if default convention.</param> /// <returns>The convention profile.</returns> public ConventionProfile SetIgnoreIfDefaultConvention(IIgnoreIfDefaultConvention convention) { #pragma warning disable 618 // SerializeDefaultValueConvention is obsolete if (convention != null && SerializeDefaultValueConvention != null) { throw new InvalidOperationException("IgnoreIfDefaultConvention cannot be set because SerializeDefaultValueConvention is set."); } #pragma warning restore 618 IgnoreIfDefaultConvention = convention; return(this); }
public IgnoreIfDefaultConventionAdapter(IIgnoreIfDefaultConvention convention) { _convention = convention; }
public IgnoreIfDefaultConventionAdapter(IIgnoreIfDefaultConvention convention) { _convention = convention; }
/// <summary> /// Sets the ignore if default convention. /// </summary> /// <param name="convention">An ignore if default convention.</param> /// <returns>The convention profile.</returns> public ConventionProfile SetIgnoreIfDefaultConvention(IIgnoreIfDefaultConvention convention) { #pragma warning disable 618 // SerializeDefaultValueConvention is obsolete if (convention != null && SerializeDefaultValueConvention != null) { throw new InvalidOperationException("IgnoreIfDefaultConvention cannot be set because SerializeDefaultValueConvention is set."); } #pragma warning restore 618 IgnoreIfDefaultConvention = convention; return this; }