Ejemplo n.º 1
0
 internal ODataAtomWriter(ODataAtomOutputContext atomOutputContext, bool writingFeed) : base(atomOutputContext, writingFeed)
 {
     this.updatedTime = ODataAtomConvert.ToAtomString(DateTimeOffset.UtcNow);
     this.atomOutputContext = atomOutputContext;
     if (this.atomOutputContext.MessageWriterSettings.WriterBehavior.StartEntryXmlCustomizationCallback != null)
     {
         this.atomOutputContext.InitializeWriterCustomization();
     }
     this.atomEntryAndFeedSerializer = new ODataAtomEntryAndFeedSerializer(this.atomOutputContext);
 }
Ejemplo n.º 2
0
 internal ODataAtomWriter(ODataAtomOutputContext atomOutputContext, bool writingFeed) : base(atomOutputContext, writingFeed)
 {
     this.updatedTime       = ODataAtomConvert.ToAtomString(DateTimeOffset.UtcNow);
     this.atomOutputContext = atomOutputContext;
     if (this.atomOutputContext.MessageWriterSettings.WriterBehavior.StartEntryXmlCustomizationCallback != null)
     {
         this.atomOutputContext.InitializeWriterCustomization();
     }
     this.atomEntryAndFeedSerializer = new ODataAtomEntryAndFeedSerializer(this.atomOutputContext);
 }
Ejemplo n.º 3
0
        /// <summary>
        /// Constructor creating an OData writer using the ATOM format.
        /// </summary>
        /// <param name="atomOutputContext">The output context to write to.</param>
        /// <param name="writingFeed">True if the writer is created for writing a feed; false when it is created for writing an entry.</param>
        internal ODataAtomWriter(ODataAtomOutputContext atomOutputContext, bool writingFeed)
            : base(atomOutputContext, writingFeed)
        {
            DebugUtils.CheckNoExternalCallers();
            Debug.Assert(atomOutputContext != null, "atomOutputContext != null");

            this.atomOutputContext = atomOutputContext;

            if (this.atomOutputContext.MessageWriterSettings.AtomStartEntryXmlCustomizationCallback != null)
            {
                Debug.Assert(
                    this.atomOutputContext.MessageWriterSettings.AtomEndEntryXmlCustomizationCallback != null,
                    "We should have verified that both start end end XML customization callbacks are specified.");
                this.atomOutputContext.InitializeWriterCustomization();
            }

            this.atomEntryAndFeedSerializer = new ODataAtomEntryAndFeedSerializer(this.atomOutputContext);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Constructor creating an OData writer using the ATOM format.
        /// </summary>
        /// <param name="atomOutputContext">The output context to write to.</param>
        /// <param name="writingFeed">True if the writer is created for writing a feed; false when it is created for writing an entry.</param>
        internal ODataAtomWriter(ODataAtomOutputContext atomOutputContext, bool writingFeed)
            : base(atomOutputContext, writingFeed)
        {
            DebugUtils.CheckNoExternalCallers();
            Debug.Assert(atomOutputContext != null, "atomOutputContext != null");

            this.atomOutputContext = atomOutputContext;

            if (this.atomOutputContext.MessageWriterSettings.AtomStartEntryXmlCustomizationCallback != null)
            {
                Debug.Assert(
                    this.atomOutputContext.MessageWriterSettings.AtomEndEntryXmlCustomizationCallback != null,
                    "We should have verified that both start end end XML customization callbacks are specified.");
                this.atomOutputContext.InitializeWriterCustomization();
            }

            this.atomEntryAndFeedSerializer = new ODataAtomEntryAndFeedSerializer(this.atomOutputContext);
        }