Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- PreservationFileWriter.cs
- ProfileSection.cs
- AttachedPropertyBrowsableAttribute.cs
- PassportAuthentication.cs
- XmlSchemaImport.cs
- DataBinder.cs
- ImpersonateTokenRef.cs
- WebPartConnectionsDisconnectVerb.cs
- DecoratedNameAttribute.cs
- BehaviorDragDropEventArgs.cs
- UrlPath.cs
- StateInitialization.cs
- ColorDialog.cs
- AnimatedTypeHelpers.cs
- Table.cs
- FixedPage.cs
- SqlDataAdapter.cs
- Debug.cs
- Camera.cs
- Int16.cs
- SubMenuStyle.cs
- IdnElement.cs
- ToolStripDropDownButton.cs
- CodeNamespaceCollection.cs
- IdentityModelDictionary.cs
- StrongNameUtility.cs
- ToolBarTray.cs
- BindToObject.cs
- FormViewCommandEventArgs.cs
- MDIClient.cs
- SqlConnectionPoolProviderInfo.cs
- SqlDependencyListener.cs
- ZeroOpNode.cs
- WindowsStatusBar.cs
- RootBrowserWindow.cs
- SafeMILHandleMemoryPressure.cs
- LoginName.cs
- ConfigurationException.cs
- ModelVisual3D.cs
- Decimal.cs
- HttpCacheParams.cs
- UrlMappingsModule.cs
- MergablePropertyAttribute.cs
- VirtualPathProvider.cs
- ObjectStateFormatter.cs
- MsmqBindingMonitor.cs
- WebEventTraceProvider.cs
- Action.cs
- PassportPrincipal.cs
- MenuRendererStandards.cs
- PixelFormatConverter.cs
- SByteConverter.cs
- Internal.cs
- NotifyIcon.cs
- _HelperAsyncResults.cs
- WebPermission.cs
- MexTcpBindingCollectionElement.cs
- WriteLineDesigner.xaml.cs
- AppliedDeviceFiltersDialog.cs
- DetailsViewUpdateEventArgs.cs
- AutoGeneratedFieldProperties.cs
- MessageContractMemberAttribute.cs
- OracleTransaction.cs
- OAVariantLib.cs
- EventManager.cs
- Sequence.cs
- MappingSource.cs
- TiffBitmapDecoder.cs
- BasePattern.cs
- DiscreteKeyFrames.cs
- SmtpMail.cs
- HttpGetServerProtocol.cs
- WebPermission.cs
- XmlElement.cs
- GridViewPageEventArgs.cs
- ImageButton.cs
- FileEnumerator.cs
- SQlBooleanStorage.cs
- SqlUDTStorage.cs
- ServiceSettingsResponseInfo.cs
- ThrowHelper.cs
- Rfc2898DeriveBytes.cs
- Queue.cs
- OracleNumber.cs
- WMICapabilities.cs
- StoreItemCollection.Loader.cs
- FileUpload.cs
- SelectionRangeConverter.cs
- ColumnResult.cs
- DBCSCodePageEncoding.cs
- XhtmlTextWriter.cs
- dbdatarecord.cs
- FlowDocumentPageViewerAutomationPeer.cs
- LocatorGroup.cs
- XmlSerializerSection.cs
- SystemIPv6InterfaceProperties.cs
- StringFormat.cs
- EncodingConverter.cs
- TiffBitmapDecoder.cs
- X509UI.cs