private bool TryGetXmlMetadata(Type clrType, out XmlMetadata metadata) { var kind = XmlTypeSerializer.For(clrType).Kind; return(kind == XmlTypeKind.Complex && clrType.GetTypeInfo().IsInterface ? Try.Success(out metadata, GetXmlMetadata(clrType)) : Try.Failure(out metadata)); }
public XmlContext(XmlMetadata metadata) { if (metadata == null) { throw Error.ArgumentNull("metadata"); } this.metadata = metadata; }
private void InitializePrimary(DictionaryAdapterMeta meta, IDictionaryAdapter dictionaryAdapter) { RequireXmlMeta(meta); primaryXmlMeta = meta.GetXmlMeta(); if (node == null) { node = GetBaseNode(); } if (!node.IsReal) { node.Realized += HandleNodeRealized; } if (references == null) { references = new XmlReferenceManager(node, DefaultXmlReferenceFormat.Instance); } InitializeReference(this); }
public static void SetXmlMeta(this DictionaryAdapterMeta meta, XmlMetadata xmlMeta) { meta.ExtendedProperties[XmlMetaKey] = xmlMeta; }
protected XmlContext(XmlContext parent) : base(parent) { this.metadata = parent.metadata; }