Beispiel #1
0
        /// <summary>
        /// Gets the Serialization Information for serializing a Graph.
        /// </summary>
        /// <param name="info">Serialization Information.</param>
        /// <param name="context">Streaming Context.</param>
        public void GetObjectData(SerializationInfo info, StreamingContext context)
        {
            info.AddValue("base", BaseUri.ToSafeString());
            info.AddValue("triples", Triples.ToList(), typeof(List <Triple>));
            IEnumerable <KeyValuePair <String, String> > ns = from p in NamespaceMap.Prefixes
                                                              select new KeyValuePair <String, String>(p, NamespaceMap.GetNamespaceUri(p).AbsoluteUri);

            info.AddValue("namespaces", ns.ToList(), typeof(List <KeyValuePair <String, String> >));
        }