Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataEntity / System / Data / EntityModel / SchemaObjectModel / ReferenceSchema.cs / 1305376 / ReferenceSchema.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.Xml; using System.Data; using System.Data.Metadata.Edm; using System.Diagnostics; using System.Data.Entity; namespace System.Data.EntityModel.SchemaObjectModel { ////// Summary description for UsingElement. /// internal class UsingElement : SchemaElement { #region Instance Fields private string _alias = null; private string _namespaceName = null; #endregion #region Public Methods ////// /// /// internal UsingElement(Schema parentElement) : base(parentElement) { } #endregion #region Public Properties ////// /// public virtual string Alias { get { return _alias; } private set { _alias = value; } } ////// /// public virtual string NamespaceName { get { return _namespaceName; } private set { _namespaceName = value; } } ////// /// public override string FQName { get { return null; } } #endregion #region Protected Properties ////// /// protected override bool ProhibitAttribute(string namespaceUri, string localName) { if (base.ProhibitAttribute(namespaceUri, localName)) { return true; } if (namespaceUri == null && localName == XmlConstants.Name) { return false; } return false; } protected override bool HandleAttribute(XmlReader reader) { if (base.HandleAttribute(reader)) { return true; } else if (CanHandleAttribute(reader, XmlConstants.Namespace)) { HandleNamespaceAttribute(reader); return true; } else if (CanHandleAttribute(reader, XmlConstants.Alias)) { HandleAliasAttribute(reader); return true; } return false; } #endregion #region Private Methods ////// /// /// private void HandleNamespaceAttribute(XmlReader reader) { Debug.Assert(String.IsNullOrEmpty(NamespaceName), "Alias must be set only once"); ReturnValuereturnValue = HandleDottedNameAttribute(reader,NamespaceName, null); if ( returnValue.Succeeded ) NamespaceName = returnValue.Value; } /// /// /// /// private void HandleAliasAttribute(XmlReader reader) { Debug.Assert(String.IsNullOrEmpty(Alias), "Alias must be set only once"); Alias = HandleUndottedNameAttribute(reader, Alias); } #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
- ContextStack.cs
- EntityDataSourceDataSelectionPanel.cs
- EventHandlersStore.cs
- ContentOnlyMessage.cs
- ServiceDescriptions.cs
- ObjectDataSourceStatusEventArgs.cs
- TableItemProviderWrapper.cs
- ConstraintStruct.cs
- XPathNodeHelper.cs
- TextAutomationPeer.cs
- CreateUserWizard.cs
- XmlAnyElementAttributes.cs
- SiteMapNodeItem.cs
- CompiledQuery.cs
- FramingChannels.cs
- HelpKeywordAttribute.cs
- NullRuntimeConfig.cs
- returneventsaver.cs
- SpeechAudioFormatInfo.cs
- ResourceReferenceKeyNotFoundException.cs
- XmlIgnoreAttribute.cs
- HttpPostedFile.cs
- ViewManagerAttribute.cs
- SqlDependencyListener.cs
- ReachSerializableProperties.cs
- PictureBox.cs
- TranslateTransform.cs
- CommonXSendMessage.cs
- RTTypeWrapper.cs
- ipaddressinformationcollection.cs
- CollectionTypeElement.cs
- CorrelationTokenTypeConvertor.cs
- ExtensionWindowResizeGrip.cs
- CacheEntry.cs
- ObjRef.cs
- TextParagraph.cs
- KnownAssembliesSet.cs
- OptimalTextSource.cs
- BitmapMetadata.cs
- SpellerHighlightLayer.cs
- MarginCollapsingState.cs
- XmlRootAttribute.cs
- HtmlButton.cs
- ProcessStartInfo.cs
- ChannelTerminatedException.cs
- Span.cs
- PersonalizableAttribute.cs
- AppliesToBehaviorDecisionTable.cs
- WebHttpElement.cs
- ActiveDocumentEvent.cs
- ContextMarshalException.cs
- ToolboxBitmapAttribute.cs
- CommonDialog.cs
- SiteMapDataSource.cs
- BitSet.cs
- DataColumnSelectionConverter.cs
- DataBindingList.cs
- EncodingDataItem.cs
- EntityDataSourceUtil.cs
- BaseTemplateParser.cs
- AssociationTypeEmitter.cs
- TypeElement.cs
- SmiRequestExecutor.cs
- Array.cs
- StreamInfo.cs
- OleDragDropHandler.cs
- RelationshipEntry.cs
- ReaderOutput.cs
- QueryOutputWriter.cs
- TypeSemantics.cs
- ParentQuery.cs
- CredentialManagerDialog.cs
- InvalidPropValue.cs
- DesignerSerializerAttribute.cs
- InternalConfigConfigurationFactory.cs
- SafeCryptoHandles.cs
- AnimationStorage.cs
- PTConverter.cs
- SecurityState.cs
- CodeMemberField.cs
- EmbeddedObject.cs
- CubicEase.cs
- ScrollPattern.cs
- TextUtf8RawTextWriter.cs
- JpegBitmapDecoder.cs
- Lease.cs
- FilterableAttribute.cs
- WmlValidatorAdapter.cs
- SecurityContext.cs
- BaseTransportHeaders.cs
- ServerTooBusyException.cs
- WizardSideBarListControlItem.cs
- DataGridViewImageColumn.cs
- DocumentViewerBaseAutomationPeer.cs
- BackoffTimeoutHelper.cs
- ReadOnlyAttribute.cs
- HitTestFilterBehavior.cs
- Floater.cs
- DynamicDataManager.cs
- ParallelDesigner.cs