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
- SafeNativeMethods.cs
- DataGridViewImageColumn.cs
- shaperfactory.cs
- IChannel.cs
- TogglePattern.cs
- OdbcReferenceCollection.cs
- XMLUtil.cs
- TimeZone.cs
- ToolStripItemGlyph.cs
- DataSourceCacheDurationConverter.cs
- FileDataSource.cs
- StrongNamePublicKeyBlob.cs
- ProcessInputEventArgs.cs
- TextParentUndoUnit.cs
- RegexCompiler.cs
- LineSegment.cs
- PackageDigitalSignature.cs
- GridToolTip.cs
- SortExpressionBuilder.cs
- WorkflowInstance.cs
- controlskin.cs
- EntityDataSourceWizardForm.cs
- ApplicationDirectory.cs
- Matrix3D.cs
- OSEnvironmentHelper.cs
- TableRowCollection.cs
- SortQueryOperator.cs
- BuildProvider.cs
- ParserOptions.cs
- DataGridDetailsPresenterAutomationPeer.cs
- AuthenticationSection.cs
- Dictionary.cs
- DatatypeImplementation.cs
- IdleTimeoutMonitor.cs
- DataListComponentEditor.cs
- HitTestFilterBehavior.cs
- UIPermission.cs
- DetailsViewDeleteEventArgs.cs
- AudioFormatConverter.cs
- WebServiceErrorEvent.cs
- TextShapeableCharacters.cs
- EntityDataSourceSelectedEventArgs.cs
- DataTableClearEvent.cs
- TableCell.cs
- DropShadowEffect.cs
- EntityDesignerDataSourceView.cs
- PrintPreviewDialog.cs
- Script.cs
- PackagePart.cs
- DeviceContext2.cs
- DrawingAttributeSerializer.cs
- ResourceExpressionBuilder.cs
- WebPartConnectionsDisconnectVerb.cs
- Error.cs
- DataGridViewRowHeaderCell.cs
- SafePointer.cs
- PropertyChangedEventArgs.cs
- OfTypeExpression.cs
- BitmapEffectGeneralTransform.cs
- FileDialog.cs
- UserControlBuildProvider.cs
- HashSet.cs
- StyleCollection.cs
- CaseInsensitiveComparer.cs
- JapaneseLunisolarCalendar.cs
- AsyncOperationManager.cs
- TextLineBreak.cs
- DataGridViewRowConverter.cs
- GenericEnumConverter.cs
- ExcludeFromCodeCoverageAttribute.cs
- BindingsCollection.cs
- InputBinding.cs
- PropertiesTab.cs
- ScrollEventArgs.cs
- StyleHelper.cs
- Sql8ConformanceChecker.cs
- WebConfigurationManager.cs
- PointAnimationClockResource.cs
- LayoutEditorPart.cs
- ImageMapEventArgs.cs
- ErrorView.xaml.cs
- HttpAsyncResult.cs
- shaperfactoryquerycachekey.cs
- ValueCollectionParameterReader.cs
- ImageSourceConverter.cs
- StateMachineHistory.cs
- TaiwanLunisolarCalendar.cs
- BindingCompleteEventArgs.cs
- GACIdentityPermission.cs
- StylusPointProperties.cs
- UInt64Converter.cs
- WpfPayload.cs
- CreateUserWizard.cs
- Nullable.cs
- ProcessProtocolHandler.cs
- AnonymousIdentificationModule.cs
- HitTestWithPointDrawingContextWalker.cs
- CheckBoxFlatAdapter.cs
- XamlSerializationHelper.cs
- NonVisualControlAttribute.cs