Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / ndp / fx / src / DataEntity / System / Data / EntityModel / SchemaObjectModel / ReferenceSchema.cs / 2 / 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, Strings.AlreadyDefined); 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, Strings.AlreadyDefined); 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
- OutputCacheSettings.cs
- FacetChecker.cs
- InvalidTimeZoneException.cs
- BoundPropertyEntry.cs
- ContextMenu.cs
- PackagePart.cs
- QilInvoke.cs
- RetrieveVirtualItemEventArgs.cs
- QilChoice.cs
- DataColumnCollection.cs
- TextSpanModifier.cs
- SoapEnumAttribute.cs
- CodeDOMProvider.cs
- ConnectionPointGlyph.cs
- HttpInputStream.cs
- PeerCollaboration.cs
- ConnectionPoolManager.cs
- Activity.cs
- StorageMappingItemCollection.cs
- Parser.cs
- PublisherMembershipCondition.cs
- SectionInformation.cs
- PolyBezierSegment.cs
- LogStore.cs
- PieceDirectory.cs
- ChannelEndpointElementCollection.cs
- TextContainerHelper.cs
- BatchWriter.cs
- DriveInfo.cs
- Operand.cs
- TextRangeBase.cs
- PeerOutputChannel.cs
- BaseDataList.cs
- ConfigurationErrorsException.cs
- StringOutput.cs
- XmlSchemaSimpleTypeRestriction.cs
- KeyInterop.cs
- NativeMethods.cs
- PeerCollaborationPermission.cs
- XmlReflectionImporter.cs
- TdsParserHelperClasses.cs
- CheckBoxRenderer.cs
- DataControlPagerLinkButton.cs
- SerializationInfoEnumerator.cs
- TypeToArgumentTypeConverter.cs
- FieldAccessException.cs
- EntityAdapter.cs
- BindingsCollection.cs
- Duration.cs
- DoubleCollectionConverter.cs
- DataGridItemEventArgs.cs
- FileLoadException.cs
- BindingOperations.cs
- SqlRowUpdatingEvent.cs
- SafeNativeMethods.cs
- __ConsoleStream.cs
- EncryptedReference.cs
- Scanner.cs
- RectValueSerializer.cs
- CodeDomComponentSerializationService.cs
- DependencyPropertyAttribute.cs
- FrameworkElement.cs
- StoreContentChangedEventArgs.cs
- CatalogZoneAutoFormat.cs
- SocketSettings.cs
- ExponentialEase.cs
- Profiler.cs
- figurelength.cs
- Storyboard.cs
- PathBox.cs
- Repeater.cs
- Deflater.cs
- TextServicesProperty.cs
- DrawingAttributes.cs
- MapPathBasedVirtualPathProvider.cs
- StatusBar.cs
- XDRSchema.cs
- TaiwanLunisolarCalendar.cs
- FtpRequestCacheValidator.cs
- DataTableNewRowEvent.cs
- XmlUtil.cs
- SpeakProgressEventArgs.cs
- Point3DAnimationBase.cs
- RouteParser.cs
- SiteMapNodeCollection.cs
- TimeSpanSecondsOrInfiniteConverter.cs
- WebPartConnectionsConnectVerb.cs
- ArraySet.cs
- HtmlImage.cs
- EdgeProfileValidation.cs
- MaterialCollection.cs
- Win32Native.cs
- ListViewDeletedEventArgs.cs
- dataSvcMapFileLoader.cs
- UserControlParser.cs
- _Semaphore.cs
- UIElementPropertyUndoUnit.cs
- MenuCommand.cs
- ImageSource.cs
- HtmlControlPersistable.cs