Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataEntity / System / Data / EntityModel / SchemaObjectModel / Documentation.cs / 1305376 / Documentation.cs
//---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //--------------------------------------------------------------------- using System; using System.Collections; using System.Collections.Generic; using System.Collections.Specialized; using System.Text; using System.Xml; using System.Data; using System.Data.Common.Utils; using System.Data.Metadata.Edm; namespace System.Data.EntityModel.SchemaObjectModel { ////// Summary description for Documentation. /// internal sealed class DocumentationElement: SchemaElement { #region Instance Fields Documentation _metdataDocumentation = new Documentation(); #endregion #region Public Methods ////// /// /// public DocumentationElement(SchemaElement parentElement) : base(parentElement) { } #endregion #region Public Properties ////// Returns the wrapped metaDocumentation instance /// public Documentation MetadataDocumentation { get { _metdataDocumentation.SetReadOnly(); return _metdataDocumentation; } } #endregion #region Protected Properties protected override bool HandleElement(XmlReader reader) { if (base.HandleElement(reader)) { return true; } else if (CanHandleElement(reader, XmlConstants.Summary)) { HandleSummaryElement(reader); return true; } else if (CanHandleElement(reader, XmlConstants.LongDescription)) { HandleLongDescriptionElement(reader); return true; } return false; } #endregion #region Private Methods protected override bool HandleText(XmlReader reader) { string text = reader.Value; if (!StringUtil.IsNullOrEmptyOrWhiteSpace(text)) { AddError(ErrorCode.UnexpectedXmlElement, EdmSchemaErrorSeverity.Error, System.Data.Entity.Strings.InvalidDocumentationBothTextAndStructure); } return true; } ////// /// /// private void HandleSummaryElement(XmlReader reader) { TextElement text = new TextElement(this); text.Parse(reader); _metdataDocumentation.Summary = text.Value; } ////// /// /// private void HandleLongDescriptionElement(XmlReader reader) { TextElement text = new TextElement(this); text.Parse(reader); _metdataDocumentation.LongDescription = text.Value; } #endregion } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //--------------------------------------------------------------------- using System; using System.Collections; using System.Collections.Generic; using System.Collections.Specialized; using System.Text; using System.Xml; using System.Data; using System.Data.Common.Utils; using System.Data.Metadata.Edm; namespace System.Data.EntityModel.SchemaObjectModel { ////// Summary description for Documentation. /// internal sealed class DocumentationElement: SchemaElement { #region Instance Fields Documentation _metdataDocumentation = new Documentation(); #endregion #region Public Methods ////// /// /// public DocumentationElement(SchemaElement parentElement) : base(parentElement) { } #endregion #region Public Properties ////// Returns the wrapped metaDocumentation instance /// public Documentation MetadataDocumentation { get { _metdataDocumentation.SetReadOnly(); return _metdataDocumentation; } } #endregion #region Protected Properties protected override bool HandleElement(XmlReader reader) { if (base.HandleElement(reader)) { return true; } else if (CanHandleElement(reader, XmlConstants.Summary)) { HandleSummaryElement(reader); return true; } else if (CanHandleElement(reader, XmlConstants.LongDescription)) { HandleLongDescriptionElement(reader); return true; } return false; } #endregion #region Private Methods protected override bool HandleText(XmlReader reader) { string text = reader.Value; if (!StringUtil.IsNullOrEmptyOrWhiteSpace(text)) { AddError(ErrorCode.UnexpectedXmlElement, EdmSchemaErrorSeverity.Error, System.Data.Entity.Strings.InvalidDocumentationBothTextAndStructure); } return true; } ////// /// /// private void HandleSummaryElement(XmlReader reader) { TextElement text = new TextElement(this); text.Parse(reader); _metdataDocumentation.Summary = text.Value; } ////// /// /// private void HandleLongDescriptionElement(XmlReader reader) { TextElement text = new TextElement(this); text.Parse(reader); _metdataDocumentation.LongDescription = text.Value; } #endregion } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ControlBindingsConverter.cs
- TrackingLocation.cs
- Convert.cs
- CompositeActivityDesigner.cs
- NotificationContext.cs
- Style.cs
- PictureBox.cs
- DropDownList.cs
- ReferenceSchema.cs
- MulticastNotSupportedException.cs
- XmlDigitalSignatureProcessor.cs
- SamlSubjectStatement.cs
- NonBatchDirectoryCompiler.cs
- XmlWrappingReader.cs
- DataTableNewRowEvent.cs
- DataGridRow.cs
- AttributeUsageAttribute.cs
- IntSecurity.cs
- BinaryUtilClasses.cs
- CryptoStream.cs
- TabItemWrapperAutomationPeer.cs
- Queue.cs
- WebPartMovingEventArgs.cs
- PartialCachingAttribute.cs
- DBSchemaTable.cs
- ProviderException.cs
- BitmapData.cs
- Highlights.cs
- XmlWriterDelegator.cs
- CollectionsUtil.cs
- GridViewColumnCollectionChangedEventArgs.cs
- FullTextBreakpoint.cs
- ModelVisual3D.cs
- LiteralControl.cs
- ProtocolInformationWriter.cs
- RegionInfo.cs
- SecureStringHasher.cs
- CompilationLock.cs
- ProcessHostConfigUtils.cs
- ServiceMetadataContractBehavior.cs
- PersonalizableTypeEntry.cs
- SmtpNetworkElement.cs
- VisualTreeUtils.cs
- StandardOleMarshalObject.cs
- LogReservationCollection.cs
- StateDesigner.LayoutSelectionGlyph.cs
- LocalizationParserHooks.cs
- TokenizerHelper.cs
- CodeGenerationManager.cs
- TableRowGroup.cs
- ResourceDescriptionAttribute.cs
- DetailsViewPageEventArgs.cs
- StopStoryboard.cs
- DashStyle.cs
- ButtonFieldBase.cs
- TextTreeUndoUnit.cs
- BinaryUtilClasses.cs
- ColorIndependentAnimationStorage.cs
- BaseDataListPage.cs
- MaskPropertyEditor.cs
- XmlSchemaGroupRef.cs
- StorageComplexTypeMapping.cs
- BuildProviderAppliesToAttribute.cs
- CodeGotoStatement.cs
- ActivityDesignerAccessibleObject.cs
- X509CertificateCollection.cs
- GetWinFXPath.cs
- SkinBuilder.cs
- AncillaryOps.cs
- EntitySetRetriever.cs
- FtpRequestCacheValidator.cs
- LinkedList.cs
- SqlDataReader.cs
- AttachedPropertyBrowsableForChildrenAttribute.cs
- PackagePartCollection.cs
- TypeCodeDomSerializer.cs
- ParameterCollection.cs
- ContractComponent.cs
- WebRequestModulesSection.cs
- AttributeXamlType.cs
- SelectionChangedEventArgs.cs
- TcpChannelListener.cs
- Profiler.cs
- ClosureBinding.cs
- TextDecorationCollection.cs
- NetCodeGroup.cs
- DataSourceSelectArguments.cs
- indexingfiltermarshaler.cs
- XmlNamespaceMappingCollection.cs
- CollectionViewProxy.cs
- MenuItemStyle.cs
- FormViewPagerRow.cs
- WindowInteractionStateTracker.cs
- FaultImportOptions.cs
- HelloMessageCD1.cs
- Triplet.cs
- SchemaNames.cs
- PieceDirectory.cs
- TextRenderer.cs
- securitycriticaldata.cs