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
- ScriptMethodAttribute.cs
- DiagnosticsConfigurationHandler.cs
- OrderByLifter.cs
- AffineTransform3D.cs
- WorkflowApplicationTerminatedException.cs
- TimerEventSubscription.cs
- XmlSignatureManifest.cs
- XmlTextReaderImplHelpers.cs
- DrawingGroupDrawingContext.cs
- KerberosSecurityTokenParameters.cs
- AccessDataSource.cs
- NumberFunctions.cs
- DBConcurrencyException.cs
- XmlCollation.cs
- X509Utils.cs
- ExtensionDataReader.cs
- ColorKeyFrameCollection.cs
- LinkGrep.cs
- ZipIOLocalFileHeader.cs
- ExtendedProtectionPolicyTypeConverter.cs
- Rfc2898DeriveBytes.cs
- ZipIORawDataFileBlock.cs
- ProcessThreadCollection.cs
- LogicalTreeHelper.cs
- ListenerSingletonConnectionReader.cs
- QilTypeChecker.cs
- MsmqActivation.cs
- ErrorStyle.cs
- WindowsTab.cs
- ObservableDictionary.cs
- EventDescriptor.cs
- MessageSmuggler.cs
- Win32Native.cs
- RtfNavigator.cs
- XmlReflectionMember.cs
- wmiprovider.cs
- ObjectAnimationUsingKeyFrames.cs
- DeploymentSectionCache.cs
- SqlBulkCopyColumnMapping.cs
- XmlElementCollection.cs
- _IPv6Address.cs
- TimeZone.cs
- EventLogPropertySelector.cs
- InvalidWMPVersionException.cs
- Claim.cs
- LocatorGroup.cs
- X509ThumbprintKeyIdentifierClause.cs
- RIPEMD160.cs
- basemetadatamappingvisitor.cs
- OrderPreservingSpoolingTask.cs
- XmlSchemaFacet.cs
- MDIControlStrip.cs
- SoapSchemaMember.cs
- NativeObjectSecurity.cs
- MouseButtonEventArgs.cs
- UntrustedRecipientException.cs
- KeyManager.cs
- MouseWheelEventArgs.cs
- MappingException.cs
- AttachedPropertyMethodSelector.cs
- MessagePartDescription.cs
- latinshape.cs
- GrammarBuilderRuleRef.cs
- _UriTypeConverter.cs
- RichTextBox.cs
- MethodBody.cs
- ByteStreamGeometryContext.cs
- Row.cs
- SQLInt32.cs
- ELinqQueryState.cs
- Animatable.cs
- compensatingcollection.cs
- WorkflowControlClient.cs
- TextEditorTyping.cs
- AdCreatedEventArgs.cs
- PersonalizationProvider.cs
- AesCryptoServiceProvider.cs
- EntityDesignerDataSourceView.cs
- NaturalLanguageHyphenator.cs
- Matrix3DConverter.cs
- LoadMessageLogger.cs
- ContentWrapperAttribute.cs
- ProjectionCamera.cs
- XmlProcessingInstruction.cs
- TextElementEditingBehaviorAttribute.cs
- ObjectDataSourceDisposingEventArgs.cs
- TTSEngineProxy.cs
- InkSerializer.cs
- PasswordRecoveryDesigner.cs
- MethodImplAttribute.cs
- NativeMethods.cs
- DataGridLinkButton.cs
- SchemaType.cs
- Baml2006KeyRecord.cs
- ListViewSelectEventArgs.cs
- MachineKeySection.cs
- IndexedString.cs
- RegexGroup.cs
- BinaryWriter.cs
- XmlWellformedWriterHelpers.cs