示例#1
0
        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());
        }
示例#2
0
        public XDocument Serialize(IAspectDectector dectector)
        {
            if (dectector is null)
            {
                throw new ArgumentNullException(nameof(dectector));
            }

            return(Serialize(dectector.AllAttributes.ToArray(), dectector.AllFeatures.ToArray()));
        }