Code:
/ 4.0 / 4.0 / 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. //---------------------------------------------------------------------- //// 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
- ScrollEventArgs.cs
- DbBuffer.cs
- BaseProcessor.cs
- LayoutInformation.cs
- GridViewCellAutomationPeer.cs
- HttpProfileBase.cs
- AvTrace.cs
- ConfigurationElementCollection.cs
- NumberFunctions.cs
- SqlUDTStorage.cs
- ScriptBehaviorDescriptor.cs
- SqlDeflator.cs
- ConstructorNeedsTagAttribute.cs
- ArgIterator.cs
- TheQuery.cs
- OleDbConnectionFactory.cs
- ColorIndependentAnimationStorage.cs
- ExceptionHandlerDesigner.cs
- Bold.cs
- KeyPressEvent.cs
- LinkedResourceCollection.cs
- FormsAuthenticationUser.cs
- WebPartActionVerb.cs
- UnsafeNativeMethods.cs
- CategoryAttribute.cs
- RelatedImageListAttribute.cs
- WebSysDescriptionAttribute.cs
- VideoDrawing.cs
- AuthenticationService.cs
- ProfileEventArgs.cs
- TraversalRequest.cs
- ServiceDescriptionSerializer.cs
- Scanner.cs
- SmiRecordBuffer.cs
- ServiceCredentials.cs
- IItemContainerGenerator.cs
- DataGridViewCellCollection.cs
- EnumBuilder.cs
- InitializerFacet.cs
- AttributeQuery.cs
- XmlSchemaCollection.cs
- ControlDesigner.cs
- MatrixCamera.cs
- Currency.cs
- NavigationWindowAutomationPeer.cs
- StaticSiteMapProvider.cs
- HttpHandlerActionCollection.cs
- PrinterUnitConvert.cs
- XmlElementAttribute.cs
- EntitySqlQueryState.cs
- WebPartConnectVerb.cs
- QueuePathEditor.cs
- XmlElementAttributes.cs
- DataKey.cs
- ConvertEvent.cs
- GatewayDefinition.cs
- ListItemsCollectionEditor.cs
- PasswordBox.cs
- SoapProtocolReflector.cs
- BufferedGraphicsContext.cs
- HttpFileCollection.cs
- ExpressionEditorAttribute.cs
- PermissionSet.cs
- ExpressionBindingCollection.cs
- RootBrowserWindowProxy.cs
- DbMetaDataCollectionNames.cs
- ContentElement.cs
- SiteIdentityPermission.cs
- XPathSelfQuery.cs
- SignatureToken.cs
- AnimatedTypeHelpers.cs
- HandleCollector.cs
- UnsafeNativeMethodsPenimc.cs
- OpCodes.cs
- TableCell.cs
- GeometryDrawing.cs
- PreProcessInputEventArgs.cs
- DataBoundControl.cs
- HotSpotCollection.cs
- WebPartsPersonalization.cs
- CommandHelper.cs
- RecognizedAudio.cs
- HtmlHead.cs
- ServiceBusyException.cs
- PriorityRange.cs
- While.cs
- PopupEventArgs.cs
- NamedObject.cs
- CellParaClient.cs
- InheritanceContextHelper.cs
- TreeIterator.cs
- StackOverflowException.cs
- WindowsListViewSubItem.cs
- OperatingSystem.cs
- PrintPageEvent.cs
- BaseDataList.cs
- TableLayout.cs
- NegotiateStream.cs
- LifetimeServices.cs
- BindingObserver.cs