コード例 #1
0
        /// <summary>Initializes a new <see cref="SyndicationDeserializer"/> for the specified stream.</summary>
        /// <param name="stream">Input stream reader from which ATOM content must be read.</param>
        /// <param name="encoding">Encoding to use for the stream (null to auto-discover).</param>
        /// <param name="dataService">Data service for which the deserializer will act.</param>
        /// <param name="update">indicates whether this is a update operation or not</param>
        /// <param name="factory">Factory for formatter objects.</param>
        /// <param name="tracker">Tracker to use for modifications.</param>
        internal SyndicationDeserializer(Stream stream, Encoding encoding, IDataService dataService, bool update, SyndicationFormatterFactory factory, UpdateTracker tracker)
            : base(update, dataService, tracker)
        {
            Debug.Assert(stream != null, "stream != null");
            Debug.Assert(factory != null, "factory != null");

            this.factory = factory;
            this.xmlReader = factory.CreateReader(stream, encoding);
        }
コード例 #2
0
        /// <summary>Initializes a new <see cref="SyndicationDeserializer"/> for the specified stream.</summary>
        /// <param name="stream">Input stream reader from which ATOM content must be read.</param>
        /// <param name="encoding">Encoding to use for the stream (null to auto-discover).</param>
        /// <param name="dataService">Data service for which the deserializer will act.</param>
        /// <param name="update">indicates whether this is a update operation or not</param>
        /// <param name="factory">Factory for formatter objects.</param>
        /// <param name="tracker">Tracker to use for modifications.</param>
        internal SyndicationDeserializer(Stream stream, Encoding encoding, IDataService dataService, bool update, SyndicationFormatterFactory factory, UpdateTracker tracker)
            : base(update, dataService, tracker)
        {
            Debug.Assert(stream != null, "stream != null");
            Debug.Assert(factory != null, "factory != null");

            this.factory   = factory;
            this.xmlReader = factory.CreateReader(stream, encoding);
        }
コード例 #3
0
        /// <summary>Initializes a new SyndicationSerializer instance.</summary>
        /// <param name="requestDescription">Request description.</param>
        /// <param name="absoluteServiceUri">Absolute URI to the service entry point.</param>
        /// <param name="service">Service with configuration and provider from which metadata should be gathered.</param>
        /// <param name="output">Stream to write to.</param>
        /// <param name="encoding">Encoding for text in output stream.</param>
        /// <param name="etag">HTTP ETag header value.</param>
        /// <param name="factory">Factory for formatter objects.</param>
        internal SyndicationSerializer(
            RequestDescription requestDescription,
            Uri absoluteServiceUri,
            IDataService service,
            Stream output,
            Encoding encoding,
            string etag,
            SyndicationFormatterFactory factory)
            : base(requestDescription, absoluteServiceUri, service, etag)
        {
            Debug.Assert(service != null, "service != null");
            Debug.Assert(output != null, "output != null");
            Debug.Assert(encoding != null, "encoding != null");
            Debug.Assert(factory != null, "factory != null");

            this.factory = factory;
            this.writer = factory.CreateWriter(output, encoding);
        }
コード例 #4
0
 /// <summary>Initializing constructor.</summary>
 /// <param name="feed">Feed being serialized.</param>
 /// <param name="factory">Factory for item formatter.</param>
 internal InlineAtomFeed(SyndicationFeed feed, SyndicationFormatterFactory factory)
 {
     this.feed = feed;
     this.factory = factory;
 }
コード例 #5
0
 /// <summary>Initializing constructor.</summary>
 /// <param name="item">Item being serialized.</param>
 /// <param name="factory">Factory for item formatter.</param>
 internal InlineAtomItem(SyndicationItem item, SyndicationFormatterFactory factory)
 {
     this.item = item;
     this.factory = factory;
 }