Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / NetFx35 / System.ServiceModel.Web / System / ServiceModel / Syndication / SyndicationItemFormatter.cs / 1 / SyndicationItemFormatter.cs
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- namespace System.ServiceModel.Syndication { using System; using System.Collections.Generic; using System.Xml; using System.Runtime.Serialization; using System.Globalization; using System.Xml.Serialization; using System.Xml.Schema; using System.Diagnostics.CodeAnalysis; using DiagnosticUtility = System.ServiceModel.DiagnosticUtility; [DataContract] public abstract class SyndicationItemFormatter { SyndicationItem item; protected SyndicationItemFormatter() { this.item = null; } protected SyndicationItemFormatter(SyndicationItem itemToWrite) { if (itemToWrite == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("itemToWrite"); } this.item = itemToWrite; } public SyndicationItem Item { get { return this.item; } } public abstract String Version { get; } public abstract bool CanRead(XmlReader reader); public abstract void ReadFrom(XmlReader reader); public override string ToString() { return String.Format(CultureInfo.CurrentCulture, "{0}, SyndicationVersion={1}", this.GetType(), this.Version); } public abstract void WriteTo(XmlWriter writer); internal protected virtual void SetItem(SyndicationItem item) { if (item == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("item"); } this.item = item; } internal static void CreateBufferIfRequiredAndWriteNode(ref XmlBuffer buffer, ref XmlDictionaryWriter extWriter, XmlDictionaryReader reader, int maxExtensionSize) { SyndicationFeedFormatter.CreateBufferIfRequiredAndWriteNode(ref buffer, ref extWriter, reader, maxExtensionSize); } internal static SyndicationItem CreateItemInstance(Type itemType) { if (itemType.Equals(typeof(SyndicationItem))) { return new SyndicationItem(); } else { return (SyndicationItem) Activator.CreateInstance(itemType); } } internal static void LoadElementExtensions(XmlBuffer buffer, XmlDictionaryWriter writer, SyndicationItem item) { SyndicationFeedFormatter.LoadElementExtensions(buffer, writer, item); } internal static void LoadElementExtensions(XmlBuffer buffer, XmlDictionaryWriter writer, SyndicationCategory category) { SyndicationFeedFormatter.LoadElementExtensions(buffer, writer, category); } internal static void LoadElementExtensions(XmlBuffer buffer, XmlDictionaryWriter writer, SyndicationLink link) { SyndicationFeedFormatter.LoadElementExtensions(buffer, writer, link); } internal static void LoadElementExtensions(XmlBuffer buffer, XmlDictionaryWriter writer, SyndicationPerson person) { SyndicationFeedFormatter.LoadElementExtensions(buffer, writer, person); } protected static SyndicationCategory CreateCategory(SyndicationItem item) { return SyndicationFeedFormatter.CreateCategory(item); } protected static SyndicationLink CreateLink(SyndicationItem item) { return SyndicationFeedFormatter.CreateLink(item); } protected static SyndicationPerson CreatePerson(SyndicationItem item) { return SyndicationFeedFormatter.CreatePerson(item); } protected static void LoadElementExtensions(XmlReader reader, SyndicationItem item, int maxExtensionSize) { SyndicationFeedFormatter.LoadElementExtensions(reader, item, maxExtensionSize); } protected static void LoadElementExtensions(XmlReader reader, SyndicationCategory category, int maxExtensionSize) { SyndicationFeedFormatter.LoadElementExtensions(reader, category, maxExtensionSize); } protected static void LoadElementExtensions(XmlReader reader, SyndicationLink link, int maxExtensionSize) { SyndicationFeedFormatter.LoadElementExtensions(reader, link, maxExtensionSize); } protected static void LoadElementExtensions(XmlReader reader, SyndicationPerson person, int maxExtensionSize) { SyndicationFeedFormatter.LoadElementExtensions(reader, person, maxExtensionSize); } protected static bool TryParseAttribute(string name, string ns, string value, SyndicationItem item, string version) { return SyndicationFeedFormatter.TryParseAttribute(name, ns, value, item, version); } protected static bool TryParseAttribute(string name, string ns, string value, SyndicationCategory category, string version) { return SyndicationFeedFormatter.TryParseAttribute(name, ns, value, category, version); } protected static bool TryParseAttribute(string name, string ns, string value, SyndicationLink link, string version) { return SyndicationFeedFormatter.TryParseAttribute(name, ns, value, link, version); } protected static bool TryParseAttribute(string name, string ns, string value, SyndicationPerson person, string version) { return SyndicationFeedFormatter.TryParseAttribute(name, ns, value, person, version); } protected static bool TryParseContent(XmlReader reader, SyndicationItem item, string contentType, string version, out SyndicationContent content) { return SyndicationFeedFormatter.TryParseContent(reader, item, contentType, version, out content); } protected static bool TryParseElement(XmlReader reader, SyndicationItem item, string version) { return SyndicationFeedFormatter.TryParseElement(reader, item, version); } protected static bool TryParseElement(XmlReader reader, SyndicationCategory category, string version) { return SyndicationFeedFormatter.TryParseElement(reader, category, version); } protected static bool TryParseElement(XmlReader reader, SyndicationLink link, string version) { return SyndicationFeedFormatter.TryParseElement(reader, link, version); } protected static bool TryParseElement(XmlReader reader, SyndicationPerson person, string version) { return SyndicationFeedFormatter.TryParseElement(reader, person, version); } protected static void WriteAttributeExtensions(XmlWriter writer, SyndicationItem item, string version) { SyndicationFeedFormatter.WriteAttributeExtensions(writer, item, version); } protected static void WriteAttributeExtensions(XmlWriter writer, SyndicationCategory category, string version) { SyndicationFeedFormatter.WriteAttributeExtensions(writer, category, version); } protected static void WriteAttributeExtensions(XmlWriter writer, SyndicationLink link, string version) { SyndicationFeedFormatter.WriteAttributeExtensions(writer, link, version); } protected static void WriteAttributeExtensions(XmlWriter writer, SyndicationPerson person, string version) { SyndicationFeedFormatter.WriteAttributeExtensions(writer, person, version); } protected static void WriteElementExtensions(XmlWriter writer, SyndicationItem item, string version) { SyndicationFeedFormatter.WriteElementExtensions(writer, item, version); } protected abstract SyndicationItem CreateItemInstance(); protected void WriteElementExtensions(XmlWriter writer, SyndicationCategory category, string version) { SyndicationFeedFormatter.WriteElementExtensions(writer, category, version); } protected void WriteElementExtensions(XmlWriter writer, SyndicationLink link, string version) { SyndicationFeedFormatter.WriteElementExtensions(writer, link, version); } protected void WriteElementExtensions(XmlWriter writer, SyndicationPerson person, string version) { SyndicationFeedFormatter.WriteElementExtensions(writer, person, version); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- XsltContext.cs
- Hashtable.cs
- HostDesigntimeLicenseContext.cs
- DecimalConstantAttribute.cs
- ExtractorMetadata.cs
- RecognizerInfo.cs
- SessionState.cs
- Matrix.cs
- LogicalExpr.cs
- CounterSampleCalculator.cs
- LocalizationParserHooks.cs
- OperandQuery.cs
- DataGridViewSortCompareEventArgs.cs
- XpsPackagingPolicy.cs
- ProtectedConfigurationProviderCollection.cs
- XmlDocumentFragment.cs
- AddInControllerImpl.cs
- InternalDispatchObject.cs
- SafeProcessHandle.cs
- ToolStripLocationCancelEventArgs.cs
- TypefaceMetricsCache.cs
- ExtenderControl.cs
- ObsoleteAttribute.cs
- TextParaClient.cs
- BitmapEffect.cs
- ObjectQuery_EntitySqlExtensions.cs
- SqlUtil.cs
- TemplateLookupAction.cs
- FileAuthorizationModule.cs
- PagesSection.cs
- DynamicILGenerator.cs
- HttpChannelHelper.cs
- Update.cs
- WpfWebRequestHelper.cs
- FacetDescriptionElement.cs
- Transform.cs
- CharEnumerator.cs
- NonValidatingSecurityTokenAuthenticator.cs
- UInt64.cs
- SqlDataSourceCommandEventArgs.cs
- ObservableDictionary.cs
- DataTableExtensions.cs
- ArithmeticException.cs
- LineSegment.cs
- StoryFragments.cs
- ErrorCodes.cs
- WindowsGrip.cs
- PrintingPermissionAttribute.cs
- RelatedImageListAttribute.cs
- ItemAutomationPeer.cs
- SymbolMethod.cs
- IgnoreSectionHandler.cs
- SqlBuilder.cs
- UndoManager.cs
- CachingParameterInspector.cs
- DetailsViewInsertedEventArgs.cs
- GridViewPageEventArgs.cs
- RegistryExceptionHelper.cs
- XPathAncestorQuery.cs
- UInt16Storage.cs
- JournalEntryStack.cs
- EditingMode.cs
- Expression.cs
- CodeComment.cs
- PageAsyncTask.cs
- SymbolPair.cs
- SystemThemeKey.cs
- ToolStripSeparator.cs
- ListItemCollection.cs
- DictionarySectionHandler.cs
- ItemsControlAutomationPeer.cs
- SignalGate.cs
- ConfigPathUtility.cs
- XamlWriter.cs
- CacheChildrenQuery.cs
- CodeBlockBuilder.cs
- RoutedEventArgs.cs
- XmlTextEncoder.cs
- Button.cs
- BindingOperations.cs
- GridErrorDlg.cs
- XmlWellformedWriterHelpers.cs
- SelectionProviderWrapper.cs
- PreloadedPackages.cs
- BooleanExpr.cs
- CheckedPointers.cs
- COM2FontConverter.cs
- EventWaitHandle.cs
- SqlTriggerContext.cs
- CommandPlan.cs
- IndependentlyAnimatedPropertyMetadata.cs
- FileLogRecordStream.cs
- StylusPoint.cs
- HitTestParameters3D.cs
- LineGeometry.cs
- WindowsTooltip.cs
- OpCellTreeNode.cs
- ListSortDescription.cs
- DesignerVerbCollection.cs
- Vector3D.cs