Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / ndp / fx / src / DataEntity / System / Data / EntityModel / SchemaObjectModel / ReferenceSchema.cs / 1 / 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
- _FtpDataStream.cs
- Scheduling.cs
- Label.cs
- AutoResizedEvent.cs
- BitmapDecoder.cs
- MsmqTransportElement.cs
- InfoCardRSAPKCS1KeyExchangeFormatter.cs
- RecordsAffectedEventArgs.cs
- CounterSet.cs
- SerTrace.cs
- ImageCreator.cs
- VirtualizingPanel.cs
- WaitHandleCannotBeOpenedException.cs
- PeerCollaborationPermission.cs
- GeometryDrawing.cs
- SoapObjectReader.cs
- EnvelopeVersion.cs
- AudioStateChangedEventArgs.cs
- ZoomPercentageConverter.cs
- EntityDesignerUtils.cs
- _IPv4Address.cs
- VsPropertyGrid.cs
- _ConnectOverlappedAsyncResult.cs
- RadioButtonRenderer.cs
- TrackingMemoryStreamFactory.cs
- SrgsGrammarCompiler.cs
- BinaryObjectWriter.cs
- TrustManagerMoreInformation.cs
- ModelServiceImpl.cs
- CFGGrammar.cs
- SafeNativeMemoryHandle.cs
- HashHelper.cs
- PropertyReferenceExtension.cs
- FrameworkEventSource.cs
- UrlAuthFailedErrorFormatter.cs
- precedingsibling.cs
- SchemaComplexType.cs
- BuildManager.cs
- DataPager.cs
- Activator.cs
- ListBoxItemAutomationPeer.cs
- ZipArchive.cs
- StateMachineHelpers.cs
- TreeBuilderBamlTranslator.cs
- XmlSubtreeReader.cs
- controlskin.cs
- Msec.cs
- TextRenderingModeValidation.cs
- ChtmlPageAdapter.cs
- AxisAngleRotation3D.cs
- Hashtable.cs
- NavigatorInput.cs
- SerialErrors.cs
- CompilerGlobalScopeAttribute.cs
- Exceptions.cs
- ObjectStateManager.cs
- RtfControls.cs
- ComponentDispatcherThread.cs
- SpellerError.cs
- FixedPage.cs
- FontUnitConverter.cs
- ProjectionCamera.cs
- DataGridRowHeaderAutomationPeer.cs
- ModelPerspective.cs
- WhitespaceRuleReader.cs
- SafeLibraryHandle.cs
- invalidudtexception.cs
- WindowsScrollBar.cs
- XamlStream.cs
- XPathItem.cs
- ThreadInterruptedException.cs
- CompositeFontParser.cs
- TrackingServices.cs
- RuntimeResourceSet.cs
- BuilderPropertyEntry.cs
- ExtendedPropertyDescriptor.cs
- SimpleMailWebEventProvider.cs
- HitTestParameters3D.cs
- RadioButton.cs
- Oci.cs
- ValidationSummary.cs
- DataGridColumnHeaderAutomationPeer.cs
- TypedServiceOperationListItem.cs
- DiscreteKeyFrames.cs
- HttpStreams.cs
- EqualityComparer.cs
- PageBuildProvider.cs
- KeyProperty.cs
- SmtpSpecifiedPickupDirectoryElement.cs
- VariableQuery.cs
- ObjectManager.cs
- ControllableStoryboardAction.cs
- FlowDocumentReaderAutomationPeer.cs
- DbConnectionInternal.cs
- IWorkflowDebuggerService.cs
- CodeExpressionStatement.cs
- TreeNodeConverter.cs
- ClientScriptItem.cs
- QilPatternFactory.cs
- ActionFrame.cs