Exemple #1
0
 protected static void WriteElementExtensions(XmlWriter writer, CategoriesDocument categories, string version)
 {
     if (categories == null)
     {
         throw new ArgumentNullException(nameof(categories));
     }
     categories.WriteElementExtensions(writer, version);
 }
 protected virtual void SetDocument(CategoriesDocument document)
 {
     if (document == null)
     {
         throw new ArgumentNullException("document");
     }
     Document = document;
 }
Exemple #3
0
 protected static void LoadElementExtensions(XmlReader reader, CategoriesDocument categories, int maxExtensionSize)
 {
     if (categories == null)
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull(nameof(categories));
     }
     categories.LoadElementExtensions(reader, maxExtensionSize);
 }
Exemple #4
0
 protected CategoriesDocumentFormatter(CategoriesDocument documentToWrite)
 {
     if (documentToWrite == null)
     {
         throw new ArgumentNullException(nameof(documentToWrite));
     }
     _document = documentToWrite;
 }
Exemple #5
0
 protected static void WriteElementExtensions(XmlWriter writer, CategoriesDocument categories, string version)
 {
     if (categories == null)
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull(nameof(categories));
     }
     categories.WriteElementExtensions(writer, version);
 }
 protected static bool TryParseElement(XmlReader reader, CategoriesDocument categories, string version)
 {
     if (categories == null)
     {
         throw System.ServiceModel.DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("categories");
     }
     return(categories.TryParseElement(reader, version));
 }
 protected static void LoadElementExtensions(XmlReader reader, CategoriesDocument categories, int maxExtensionSize)
 {
     if (categories == null)
     {
         throw System.ServiceModel.DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("categories");
     }
     categories.LoadElementExtensions(reader, maxExtensionSize);
 }
 protected static void WriteElementExtensions(XmlWriter writer, CategoriesDocument categories, string version)
 {
     if (categories == null)
     {
         throw System.ServiceModel.DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("categories");
     }
     categories.WriteElementExtensions(writer, version);
 }
 protected CategoriesDocumentFormatter(CategoriesDocument documentToWrite)
 {
     if (documentToWrite == null)
     {
         throw System.ServiceModel.DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("documentToWrite");
     }
     this.document = documentToWrite;
 }
        private static async Task WriteCategoriesAsync(XmlWriter writer, CategoriesDocument categories, Uri baseUri, string version)
        {
            await writer.WriteStartElementAsync(App10Constants.Prefix, App10Constants.Categories, App10Constants.Namespace);

            await WriteCategoriesInnerXml(writer, categories, baseUri, version);

            await writer.WriteEndElementAsync();
        }
 protected CategoriesDocumentFormatter(CategoriesDocument documentToWrite)
 {
     if (documentToWrite == null)
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("documentToWrite");
     }
     this.document = documentToWrite;
 }
Exemple #12
0
 protected CategoriesDocumentFormatter(CategoriesDocument documentToWrite)
 {
     if (documentToWrite == null)
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("documentToWrite");
     }
     _document = documentToWrite;
 }
 internal static void LoadElementExtensions(XmlBuffer buffer, XmlDictionaryWriter writer, CategoriesDocument categories)
 {
     if (categories == null)
     {
         throw System.ServiceModel.DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("categories");
     }
     SyndicationFeedFormatter.CloseBuffer(buffer, writer);
     categories.LoadElementExtensions(buffer);
 }
Exemple #14
0
        protected static void LoadElementExtensions(XmlReader reader, CategoriesDocument categories, int maxExtensionSize)
        {
            if (categories == null)
            {
                throw new ArgumentNullException(nameof(categories));
            }

            categories.LoadElementExtensions(XmlReaderWrapper.CreateFromReader(reader), maxExtensionSize);
        }
Exemple #15
0
        protected static bool TryParseElement(XmlReader reader, CategoriesDocument categories, string version)
        {
            if (categories == null)
            {
                throw new ArgumentNullException(nameof(categories));
            }

            return(categories.TryParseElement(XmlReaderWrapper.CreateFromReader(reader), version));
        }
Exemple #16
0
        protected static Task WriteElementExtensionsAsync(XmlWriter writer, CategoriesDocument categories, string version)
        {
            if (categories == null)
            {
                throw new ArgumentNullException(nameof(categories));
            }

            return(categories.WriteElementExtensionsAsync(writer, version));
        }
Exemple #17
0
 public AtomPub10CategoriesDocumentFormatter(CategoriesDocument documentToWrite) : base(documentToWrite)
 {
     _maxExtensionSize = int.MaxValue;
     if (documentToWrite.IsInline)
     {
         _inlineDocumentType     = documentToWrite.GetType();
         _referencedDocumentType = typeof(ReferencedCategoriesDocument);
     }
     else
     {
         _referencedDocumentType = documentToWrite.GetType();
         _inlineDocumentType     = typeof(InlineCategoriesDocument);
     }
 }
 public AtomPub10CategoriesDocumentFormatter(CategoriesDocument documentToWrite) : base(documentToWrite)
 {
     this.maxExtensionSize = 0x7fffffff;
     this.preserveAttributeExtensions = true;
     this.preserveElementExtensions = true;
     if (documentToWrite.IsInline)
     {
         this.inlineDocumentType = documentToWrite.GetType();
         this.referencedDocumentType = typeof(ReferencedCategoriesDocument);
     }
     else
     {
         this.referencedDocumentType = documentToWrite.GetType();
         this.inlineDocumentType = typeof(InlineCategoriesDocument);
     }
 }
 public AtomPub10CategoriesDocumentFormatter(CategoriesDocument documentToWrite) : base(documentToWrite)
 {
     this.maxExtensionSize            = 0x7fffffff;
     this.preserveAttributeExtensions = true;
     this.preserveElementExtensions   = true;
     if (documentToWrite.IsInline)
     {
         this.inlineDocumentType     = documentToWrite.GetType();
         this.referencedDocumentType = typeof(ReferencedCategoriesDocument);
     }
     else
     {
         this.referencedDocumentType = documentToWrite.GetType();
         this.inlineDocumentType     = typeof(InlineCategoriesDocument);
     }
 }
Exemple #20
0
 public AtomPub10CategoriesDocumentFormatter(CategoriesDocument documentToWrite)
     : base(documentToWrite)
 {
     // No need to check that the parameter passed is valid - it is checked by the c'tor of the base class
     _maxExtensionSize            = int.MaxValue;
     _preserveAttributeExtensions = true;
     _preserveElementExtensions   = true;
     if (documentToWrite.IsInline)
     {
         _inlineDocumentType     = documentToWrite.GetType();
         _referencedDocumentType = typeof(ReferencedCategoriesDocument);
     }
     else
     {
         _referencedDocumentType = documentToWrite.GetType();
         _inlineDocumentType     = typeof(InlineCategoriesDocument);
     }
 }
 public AtomPub10CategoriesDocumentFormatter(CategoriesDocument documentToWrite)
     : base(documentToWrite)
 {
     // No need to check that the parameter passed is valid - it is checked by the c'tor of the base class
     this.maxExtensionSize = int.MaxValue;
     preserveAttributeExtensions = true;
     preserveElementExtensions = true;
     if (documentToWrite.IsInline)
     {
         this.inlineDocumentType = documentToWrite.GetType();
         this.referencedDocumentType = typeof(ReferencedCategoriesDocument);
     }
     else
     {
         this.referencedDocumentType = documentToWrite.GetType();
         this.inlineDocumentType = typeof(InlineCategoriesDocument);
     }
 }
        internal static void WriteCategoriesInnerXml(XmlWriter writer, CategoriesDocument categories, Uri baseUri, string version)
        {
            Uri baseUriToWrite = FeedUtils.GetBaseUriToWrite(baseUri, categories.BaseUri);

            if (baseUriToWrite != null)
            {
                WriteXmlBase(writer, baseUriToWrite);
            }
            if (!string.IsNullOrEmpty(categories.Language))
            {
                WriteXmlLang(writer, categories.Language);
            }
            if (categories.IsInline)
            {
                WriteInlineCategoriesContent(writer, (InlineCategoriesDocument)categories, version);
            }
            else
            {
                WriteReferencedCategoriesContent(writer, (ReferencedCategoriesDocument)categories, version);
            }
        }
Exemple #23
0
        internal static async Task WriteCategoriesInnerXml(XmlWriter writer, CategoriesDocument categories, Uri baseUri, string version)
        {
            Uri baseUriToWrite = FeedUtils.GetBaseUriToWrite(baseUri, categories.BaseUri);

            if (baseUriToWrite != null)
            {
                WriteXmlBase(writer, baseUriToWrite);
            }

            if (!string.IsNullOrEmpty(categories.Language))
            {
                WriteXmlLang(writer, categories.Language);
            }

            if (categories.IsInline)
            {
                await WriteInlineCategoriesContentAsync(XmlWriterWrapper.CreateFromWriter(writer), (InlineCategoriesDocument)categories, version).ConfigureAwait(false);
            }
            else
            {
                WriteReferencedCategoriesContent(writer, (ReferencedCategoriesDocument)categories, version);
            }
        }
 internal static void LoadElementExtensions(XmlBuffer buffer, XmlDictionaryWriter writer, CategoriesDocument categories)
 {
     if (categories == null)
     {
         throw System.ServiceModel.DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("categories");
     }
     SyndicationFeedFormatter.CloseBuffer(buffer, writer);
     categories.LoadElementExtensions(buffer);
 }
 protected static bool TryParseAttribute(string name, string ns, string value, CategoriesDocument categories, string version)
 {
   return default(bool);
 }
Exemple #26
0
 internal static void LoadElementExtensions(XmlBuffer buffer, XmlDictionaryWriter writer, CategoriesDocument categories)
 {
     if (categories == null)
     {
         throw new ArgumentNullException(nameof(categories));
     }
     Atom10FeedFormatter.CloseBuffer(buffer, writer);
     categories.LoadElementExtensions(buffer);
 }
 protected static bool TryParseElement(System.Xml.XmlReader reader, CategoriesDocument categories, string version)
 {
   return default(bool);
 }
 protected static void WriteElementExtensions(System.Xml.XmlWriter writer, CategoriesDocument categories, string version)
 {
 }
 protected static void LoadElementExtensions(System.Xml.XmlReader reader, CategoriesDocument categories, int maxExtensionSize)
 {
 }
Exemple #30
0
 protected static void LoadElementExtensions(XmlReader reader, CategoriesDocument categories, int maxExtensionSize)
 {
     categories.ElementExtensions.Add(reader);
 }
Exemple #31
0
 protected static bool TryParseElement(XmlReader reader, CategoriesDocument categories, string version)
 {
     return(categories.TryParseElement(reader, version));
 }
 protected static bool TryParseElement(XmlReader reader, CategoriesDocument categories, string version)
 {
     return categories.TryParseElement (reader, version);
 }
 //[MonoTODO ("Use maxExtensionSize somewhere")]
 protected static void LoadElementExtensions(XmlReader reader, CategoriesDocument categories, int maxExtensionSize)
 {
     categories.ElementExtensions.Add (reader);
 }
 protected static void LoadElementExtensions(XmlReader reader, CategoriesDocument categories, int maxExtensionSize)
 {
     if (categories == null)
     {
         throw System.ServiceModel.DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("categories");
     }
     categories.LoadElementExtensions(reader, maxExtensionSize);
 }
Exemple #35
0
 internal static void LoadElementExtensions(XmlBuffer buffer, XmlDictionaryWriter writer, CategoriesDocument categories)
 {
     if (categories == null)
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull(nameof(categories));
     }
     Atom10FeedFormatter.CloseBuffer(buffer, writer);
     categories.LoadElementExtensions(buffer);
 }
 static void WriteCategories(XmlWriter writer, CategoriesDocument categories, Uri baseUri, string version)
 {
     writer.WriteStartElement(App10Constants.Prefix, App10Constants.Categories, App10Constants.Namespace);
     WriteCategoriesInnerXml(writer, categories, baseUri, version);
     writer.WriteEndElement();
 }
 protected static bool TryParseAttribute(string name, string ns, string value, CategoriesDocument categories, string version)
 {
     if (categories == null)
     {
         throw System.ServiceModel.DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("categories");
     }
     return categories.TryParseAttribute(name, ns, value, version);
 }
 protected static void WriteAttributeExtensions(XmlWriter writer, CategoriesDocument categories, string version)
 {
     if (categories == null)
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("categories");
     }
     categories.WriteAttributeExtensions(writer, version);
 }
 protected static bool TryParseAttribute(string name, string ns, string value, CategoriesDocument categories, string version)
 {
     return categories.TryParseAttribute (name, ns, value, version);
 }
 protected static bool TryParseElement(XmlReader reader, CategoriesDocument categories, string version)
 {
     if (categories == null)
     {
         throw System.ServiceModel.DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("categories");
     }
     return categories.TryParseElement(reader, version);
 }
 protected static void WriteElementExtensions(XmlWriter writer, CategoriesDocument categories, string version)
 {
     categories.WriteElementExtensions (writer, version);
 }
		public AtomPub10CategoriesDocumentFormatter (CategoriesDocument documentToWrite)
			: base (documentToWrite)
		{
		}
Exemple #43
0
 protected static void WriteElementExtensions(XmlWriter writer, CategoriesDocument categories, string version)
 {
     categories.WriteElementExtensions(writer, version);
 }
 public AtomPub10CategoriesDocumentFormatter(CategoriesDocument documentToWrite)
 {
   Contract.Requires(documentToWrite != null);
 }
Exemple #45
0
 protected static bool TryParseAttribute(string name, string ns, string value, CategoriesDocument categories, string version)
 {
     return(categories.TryParseAttribute(name, ns, value, version));
 }
 private static void WriteCategories(XmlWriter writer, CategoriesDocument categories, Uri baseUri, string version)
 {
     writer.WriteStartElement("app", "categories", "http://www.w3.org/2007/app");
     WriteCategoriesInnerXml(writer, categories, baseUri, version);
     writer.WriteEndElement();
 }
 private static void WriteCategories(XmlWriter writer, CategoriesDocument categories, Uri baseUri, string version)
 {
     writer.WriteStartElement(App10Constants.Prefix, App10Constants.Categories, App10Constants.Namespace);
     WriteCategoriesInnerXml(writer, categories, baseUri, version);
     writer.WriteEndElement();
 }
 internal static void WriteCategoriesInnerXml(XmlWriter writer, CategoriesDocument categories, Uri baseUri, string version)
 {
     Uri baseUriToWrite = FeedUtils.GetBaseUriToWrite(baseUri, categories.BaseUri);
     if (baseUriToWrite != null)
     {
         WriteXmlBase(writer, baseUriToWrite);
     }
     if (!string.IsNullOrEmpty(categories.Language))
     {
         WriteXmlLang(writer, categories.Language);
     }
     if (categories.IsInline)
     {
         WriteInlineCategoriesContent(writer, (InlineCategoriesDocument) categories, version);
     }
     else
     {
         WriteReferencedCategoriesContent(writer, (ReferencedCategoriesDocument) categories, version);
     }
 }
Exemple #49
0
        protected static bool TryParseAttribute(string name, string ns, string value, CategoriesDocument categories, string version)
        {
            if (categories == null)
            {
                throw new ArgumentNullException(nameof(categories));
            }

            return(categories.TryParseAttribute(name, ns, value, version));
        }
 protected virtual void SetDocument(CategoriesDocument document)
 {
     if (document == null)
         throw new ArgumentNullException ("document");
     Document = document;
 }
 protected static bool TryParseAttribute(string name, string ns, string value, CategoriesDocument categories, string version)
 {
     if (categories == null)
     {
         throw System.ServiceModel.DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("categories");
     }
     return(categories.TryParseAttribute(name, ns, value, version));
 }
 protected CategoriesDocumentFormatter(CategoriesDocument documentToWrite)
 {
     SetDocument (documentToWrite);
 }
 protected static void WriteElementExtensions(XmlWriter writer, CategoriesDocument categories, string version)
 {
     if (categories == null)
     {
         throw System.ServiceModel.DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("categories");
     }
     categories.WriteElementExtensions(writer, version);
 }
 protected virtual void SetDocument(CategoriesDocument document)
 {
     this.document = document;
 }
Exemple #55
0
 protected virtual void SetDocument(CategoriesDocument document)
 {
     _document = document;
 }
 protected virtual new void SetDocument(CategoriesDocument document)
 {
 }