private ObjectReader(Writer writer, ObjectParsingOptions options) { if (writer == null) throw new ArgumentNullException("writer"); if (options == null) throw new ArgumentNullException("options"); Options = options; this.writer = writer; }
public override bool MatchesPropertyFilter(ObjectParsingOptions options) { if (serializeForAll) return true; string currentScenario = SerializationScenario.Current; for (int i = 0; i < scenarios.Length; i++) if (scenarios[i] == currentScenario) return true; return base.MatchesPropertyFilter(options); }
public static void Read(object obj, Writer writer, ObjectParsingOptions options = null) { ObjectReader reader = new ObjectReader(writer, options ?? new ObjectParsingOptions()); try { reader.Read(obj); } catch (Exception e) { throw new ObjectReadException(reader, e); } }
public virtual bool MatchesPropertyFilter(ObjectParsingOptions options) { return InnerDefinition.MatchesPropertyFilter(options); }
public bool MatchesPropertyFilter(ObjectParsingOptions options) { return (options.MemberAccessibility & memberAccessibility) == options.MemberAccessibility && (options.MemberType & memberType) > 0; }
public override bool MatchesPropertyFilter(ObjectParsingOptions options) { if (!ignoreAll) { string currentScenario = SerializationScenario.Current; for (int i = 0; i < ignoreScenarios.Length; i++) if (ignoreScenarios[i] == currentScenario) return false; return base.MatchesPropertyFilter(options); } return false; }