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
- XmlSchemaElement.cs
- TreeViewHitTestInfo.cs
- DeleteBookmarkScope.cs
- XPathNodeInfoAtom.cs
- ConstraintStruct.cs
- CompareInfo.cs
- Icon.cs
- CompareInfo.cs
- AttributeCollection.cs
- RelationshipSet.cs
- ObjectToken.cs
- AsynchronousChannel.cs
- CachedTypeface.cs
- Guid.cs
- BuildResultCache.cs
- OutKeywords.cs
- BooleanFunctions.cs
- ThemeDirectoryCompiler.cs
- TableLayoutStyleCollection.cs
- DataGridColumnHeaderItemAutomationPeer.cs
- SqlCachedBuffer.cs
- SqlNodeAnnotation.cs
- StandardToolWindows.cs
- MapPathBasedVirtualPathProvider.cs
- _ServiceNameStore.cs
- SystemColorTracker.cs
- EditorOptionAttribute.cs
- SqlCacheDependencyDatabase.cs
- keycontainerpermission.cs
- Sequence.cs
- CodeNamespace.cs
- IERequestCache.cs
- UnsafeNativeMethods.cs
- ExceptionHandler.cs
- DataContract.cs
- QueryAccessibilityHelpEvent.cs
- PropertyEmitterBase.cs
- XsltArgumentList.cs
- HitTestResult.cs
- ClientSettings.cs
- WpfSharedBamlSchemaContext.cs
- CodeCastExpression.cs
- UnmanagedMemoryStreamWrapper.cs
- CryptoConfig.cs
- CompoundFileReference.cs
- ArglessEventHandlerProxy.cs
- EastAsianLunisolarCalendar.cs
- StreamGeometryContext.cs
- DataControlField.cs
- ServiceNameElementCollection.cs
- AsynchronousChannelMergeEnumerator.cs
- CollectionExtensions.cs
- MethodBuilderInstantiation.cs
- CodeValidator.cs
- BatchStream.cs
- SecUtil.cs
- CategoryNameCollection.cs
- SchemaConstraints.cs
- EmptyElement.cs
- SqlWebEventProvider.cs
- TextRunCacheImp.cs
- DataGridState.cs
- altserialization.cs
- ControlBuilder.cs
- EmptyQuery.cs
- LinkedResourceCollection.cs
- ObjectDataSourceDisposingEventArgs.cs
- WebBrowserUriTypeConverter.cs
- SiteMapNodeItemEventArgs.cs
- DataViewSetting.cs
- EntityCollectionChangedParams.cs
- ComponentEditorPage.cs
- ReadOnlyHierarchicalDataSource.cs
- DataControlField.cs
- DescendantBaseQuery.cs
- BlobPersonalizationState.cs
- DataGridDesigner.cs
- Exceptions.cs
- ClonableStack.cs
- SiteMapHierarchicalDataSourceView.cs
- PermissionSetTriple.cs
- XmlSerializationWriter.cs
- EncoderFallback.cs
- FullTextLine.cs
- adornercollection.cs
- LiteralControl.cs
- XmlCharCheckingReader.cs
- Switch.cs
- AttributeProviderAttribute.cs
- MouseGestureConverter.cs
- AutoGeneratedField.cs
- AccessibilityHelperForVista.cs
- SettingsBindableAttribute.cs
- RoleManagerModule.cs
- DocumentsTrace.cs
- StandardOleMarshalObject.cs
- CFGGrammar.cs
- XmlHierarchyData.cs
- InternalConfigConfigurationFactory.cs
- AutomationPattern.cs