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
- TdsParserHelperClasses.cs
- SizeValueSerializer.cs
- Stream.cs
- CompilationRelaxations.cs
- SqlGatherConsumedAliases.cs
- HitTestFilterBehavior.cs
- RemotingException.cs
- FileUtil.cs
- CngKeyBlobFormat.cs
- DependencyObject.cs
- ToolTipService.cs
- CodeTypeDelegate.cs
- X509ChainPolicy.cs
- DocumentSequence.cs
- ServiceCredentials.cs
- ComPlusServiceLoader.cs
- DataGrid.cs
- SchemaImporterExtension.cs
- TableRowGroup.cs
- DbCommandTree.cs
- TreeView.cs
- ProcessHostConfigUtils.cs
- LedgerEntry.cs
- WorkflowInstanceUnhandledExceptionRecord.cs
- ApplicationHost.cs
- WebResourceAttribute.cs
- keycontainerpermission.cs
- MediaCommands.cs
- UIElement3DAutomationPeer.cs
- JsonClassDataContract.cs
- CollectionView.cs
- ClientCultureInfo.cs
- WebControlAdapter.cs
- TemplateXamlTreeBuilder.cs
- TextChangedEventArgs.cs
- InfiniteIntConverter.cs
- TextDecorationCollectionConverter.cs
- ObjectCloneHelper.cs
- XamlSerializerUtil.cs
- WindowsTab.cs
- XmlSchemaFacet.cs
- ThemeableAttribute.cs
- SqlConnectionFactory.cs
- WebServiceHandler.cs
- InteropAutomationProvider.cs
- ParameterSubsegment.cs
- DiscoveryDocument.cs
- IRCollection.cs
- RegexRunnerFactory.cs
- EnvelopedSignatureTransform.cs
- _SslState.cs
- GuidelineCollection.cs
- PathSegmentCollection.cs
- PassportPrincipal.cs
- NativeMethods.cs
- Emitter.cs
- SqlMethods.cs
- AmbientLight.cs
- ListSortDescription.cs
- StringFormat.cs
- SqlDataSourceDesigner.cs
- InstanceKey.cs
- AttributeEmitter.cs
- IdentityModelStringsVersion1.cs
- SecurityUtils.cs
- ActivatedMessageQueue.cs
- CodeIndexerExpression.cs
- ISSmlParser.cs
- MatrixTransform.cs
- Brushes.cs
- CompleteWizardStep.cs
- FixedSOMTableRow.cs
- SqlConnection.cs
- MetadataArtifactLoaderFile.cs
- GridViewColumnCollection.cs
- XmlSortKey.cs
- RegexRunner.cs
- SectionXmlInfo.cs
- SafeFileMappingHandle.cs
- DispatcherTimer.cs
- FileRecordSequenceCompletedAsyncResult.cs
- Vector3DCollection.cs
- XsdDateTime.cs
- HandledMouseEvent.cs
- NavigationProperty.cs
- HtmlTitle.cs
- DataSourceComponent.cs
- RuleSettings.cs
- ContextMenuStrip.cs
- EntityRecordInfo.cs
- Control.cs
- DesignerVerb.cs
- ImpersonationContext.cs
- DataTable.cs
- ScriptResourceInfo.cs
- EntitySetBaseCollection.cs
- ShutDownListener.cs
- StateFinalizationActivity.cs
- SafeMemoryMappedFileHandle.cs
- BaseDataBoundControl.cs