public void Serialize() { System.Xml.Linq.XDocument document = serializer.Serialize(instance); IAspectDectector result = serializer.Deserialize(document); Assert.AreEqual(100, result.AllAttributes.Count()); Assert.AreEqual(100, result.AllFeatures.Count()); }
public XDocument Serialize(IAspectDectector dectector) { if (dectector is null) { throw new ArgumentNullException(nameof(dectector)); } return(Serialize(dectector.AllAttributes.ToArray(), dectector.AllFeatures.ToArray())); }