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
- GeneralTransform3D.cs
- XamlBuildTaskServices.cs
- BindUriHelper.cs
- WebPartDescriptionCollection.cs
- PointLight.cs
- RSAPKCS1SignatureFormatter.cs
- ArrayElementGridEntry.cs
- Control.cs
- UserControlParser.cs
- UIHelper.cs
- formatter.cs
- CoreSwitches.cs
- DataServiceProviderMethods.cs
- FlagsAttribute.cs
- RSAPKCS1SignatureDeformatter.cs
- KeyedHashAlgorithm.cs
- PersonalizationState.cs
- PathGradientBrush.cs
- DropDownList.cs
- XmlObjectSerializerReadContextComplexJson.cs
- FilterQuery.cs
- CallId.cs
- ToolStripDropTargetManager.cs
- StringConverter.cs
- PrincipalPermission.cs
- DataBinder.cs
- CacheMemory.cs
- Base64Stream.cs
- DataColumnCollection.cs
- WS2007FederationHttpBinding.cs
- Thread.cs
- EntityPropertyMappingAttribute.cs
- QilDataSource.cs
- DecoderNLS.cs
- login.cs
- FontStretchConverter.cs
- ProcessHostServerConfig.cs
- TableParagraph.cs
- DBDataPermissionAttribute.cs
- AttachedAnnotationChangedEventArgs.cs
- RelationshipDetailsRow.cs
- WebPartUtil.cs
- Int16AnimationUsingKeyFrames.cs
- WindowsMenu.cs
- FrameworkElement.cs
- MetadataConversionError.cs
- DrawingBrush.cs
- SafeNativeMethods.cs
- AsyncOperation.cs
- ConfigurationStrings.cs
- CookieProtection.cs
- PageCatalogPart.cs
- SharedDp.cs
- Application.cs
- TreeNodeCollection.cs
- ListControlBoundActionList.cs
- BulletedListDesigner.cs
- PreservationFileWriter.cs
- CallbackValidator.cs
- SafeMemoryMappedViewHandle.cs
- Rules.cs
- HostedHttpTransportManager.cs
- LogLogRecordHeader.cs
- HyperLinkColumn.cs
- AdjustableArrowCap.cs
- XPathAncestorQuery.cs
- XmlSerializerAssemblyAttribute.cs
- DataColumn.cs
- SerializationInfoEnumerator.cs
- SafeProcessHandle.cs
- CultureNotFoundException.cs
- PrintDialogException.cs
- HtmlLink.cs
- UnknownWrapper.cs
- ParseHttpDate.cs
- XmlIlTypeHelper.cs
- SizeConverter.cs
- FacetEnabledSchemaElement.cs
- TypeHelper.cs
- PasswordTextNavigator.cs
- Renderer.cs
- ResXBuildProvider.cs
- ZipIOExtraField.cs
- ColorIndependentAnimationStorage.cs
- PrintingPermission.cs
- IconConverter.cs
- DecimalAnimationUsingKeyFrames.cs
- HttpApplication.cs
- ButtonStandardAdapter.cs
- IgnoreDeviceFilterElement.cs
- WindowsSpinner.cs
- PagesChangedEventArgs.cs
- CorrelationService.cs
- EntityUtil.cs
- SoapInteropTypes.cs
- WebPartDisplayMode.cs
- OdbcDataReader.cs
- BaseDataBoundControl.cs
- RemoteWebConfigurationHost.cs
- IriParsingElement.cs