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
- Formatter.cs
- StrokeSerializer.cs
- RotateTransform3D.cs
- MethodExpr.cs
- CompressedStack.cs
- StickyNoteContentControl.cs
- EntityStoreSchemaGenerator.cs
- FormsAuthenticationConfiguration.cs
- WebDescriptionAttribute.cs
- GZipDecoder.cs
- XmlArrayItemAttributes.cs
- FloaterParagraph.cs
- ListenerTraceUtility.cs
- InvalidPrinterException.cs
- UnmanagedMemoryStreamWrapper.cs
- ItemChangedEventArgs.cs
- ExitEventArgs.cs
- BrowsableAttribute.cs
- JournalEntry.cs
- UITypeEditor.cs
- _TLSstream.cs
- CompositionTarget.cs
- AutomationPropertyInfo.cs
- XmlNamespaceDeclarationsAttribute.cs
- DataControlCommands.cs
- AttributeExtensions.cs
- SqlNotificationEventArgs.cs
- DynamicPropertyHolder.cs
- _SSPISessionCache.cs
- XmlToDatasetMap.cs
- TiffBitmapDecoder.cs
- PageCodeDomTreeGenerator.cs
- HtmlTableCellCollection.cs
- TypedReference.cs
- SpeechRecognitionEngine.cs
- ScriptingScriptResourceHandlerSection.cs
- BinaryUtilClasses.cs
- UnmanagedMemoryStream.cs
- ClockController.cs
- SHA256CryptoServiceProvider.cs
- TextDocumentView.cs
- VarRefManager.cs
- ConfigXmlElement.cs
- ProviderUtil.cs
- GregorianCalendar.cs
- DataTableTypeConverter.cs
- ListViewUpdatedEventArgs.cs
- _RequestCacheProtocol.cs
- IssuanceLicense.cs
- ListComponentEditorPage.cs
- SqlDataSourceParameterParser.cs
- unsafeIndexingFilterStream.cs
- ConnectionPoolManager.cs
- PassportPrincipal.cs
- QilTernary.cs
- SQLSingleStorage.cs
- BaseResourcesBuildProvider.cs
- SecurityTokenSerializer.cs
- StrokeCollection.cs
- SafeSystemMetrics.cs
- ConfigXmlSignificantWhitespace.cs
- DbDeleteCommandTree.cs
- UriSectionReader.cs
- AnnotationResourceCollection.cs
- ProcessingInstructionAction.cs
- AppearanceEditorPart.cs
- XPathBuilder.cs
- EdmConstants.cs
- ListViewPagedDataSource.cs
- FixedTextPointer.cs
- DeviceOverridableAttribute.cs
- PasswordTextContainer.cs
- GridViewRowPresenterBase.cs
- CodeDomLocalizationProvider.cs
- XmlSchemaSimpleContentExtension.cs
- xmlglyphRunInfo.cs
- AutomationPropertyInfo.cs
- MediaPlayerState.cs
- UndirectedGraph.cs
- RuleRefElement.cs
- DiscreteKeyFrames.cs
- SchemaSetCompiler.cs
- StrokeIntersection.cs
- HandleCollector.cs
- BlurEffect.cs
- isolationinterop.cs
- ListViewDeleteEventArgs.cs
- DataGridViewControlCollection.cs
- ProviderMetadata.cs
- KnownBoxes.cs
- RuntimeCompatibilityAttribute.cs
- LineServicesCallbacks.cs
- SmtpNtlmAuthenticationModule.cs
- TableProviderWrapper.cs
- DotExpr.cs
- _LocalDataStoreMgr.cs
- SyntaxCheck.cs
- SmtpReplyReader.cs
- PresentationTraceSources.cs
- CompilationRelaxations.cs