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
- RegistrationServices.cs
- SpeechRecognizer.cs
- SqlBinder.cs
- CultureInfo.cs
- DesignSurfaceEvent.cs
- WebScriptMetadataMessageEncoderFactory.cs
- IMembershipProvider.cs
- CodeIdentifiers.cs
- RectangleF.cs
- ColorPalette.cs
- EastAsianLunisolarCalendar.cs
- VirtualStackFrame.cs
- StrongNameKeyPair.cs
- ConfigurationPropertyCollection.cs
- ChineseLunisolarCalendar.cs
- MouseOverProperty.cs
- Parsers.cs
- UpdatePanel.cs
- Funcletizer.cs
- PackageDigitalSignature.cs
- CodeTypeDeclarationCollection.cs
- CodeArrayCreateExpression.cs
- List.cs
- SqlTriggerAttribute.cs
- QueryOutputWriter.cs
- CategoryAttribute.cs
- AttachedAnnotationChangedEventArgs.cs
- SqlDataSourceQueryConverter.cs
- PanelDesigner.cs
- MarginsConverter.cs
- Font.cs
- IgnoreSection.cs
- EnvelopedSignatureTransform.cs
- BuildResult.cs
- ToolboxDataAttribute.cs
- PropagatorResult.cs
- TreeViewBindingsEditor.cs
- EventRoute.cs
- IfElseDesigner.xaml.cs
- HttpCookieCollection.cs
- FixedDocument.cs
- TargetPerspective.cs
- unitconverter.cs
- DataGridViewCellStyle.cs
- RayHitTestParameters.cs
- HtmlTable.cs
- CopyNodeSetAction.cs
- FormViewRow.cs
- UIntPtr.cs
- SystemEvents.cs
- EventWaitHandle.cs
- HtmlToClrEventProxy.cs
- FontSource.cs
- KnownTypeDataContractResolver.cs
- XsltException.cs
- ContextMarshalException.cs
- TraceEventCache.cs
- MimeMapping.cs
- SubMenuStyleCollection.cs
- DependencySource.cs
- ResourceBinder.cs
- StateDesigner.Helpers.cs
- SourceExpressionException.cs
- CodeAttributeArgumentCollection.cs
- WorkerRequest.cs
- ImageDrawing.cs
- AdapterDictionary.cs
- AxHost.cs
- OleDbMetaDataFactory.cs
- XPathBinder.cs
- ResolveNameEventArgs.cs
- AutomationIdentifierGuids.cs
- MobileUITypeEditor.cs
- HttpHandlersSection.cs
- TypeConverterAttribute.cs
- uribuilder.cs
- StreamProxy.cs
- DataGridViewRowsAddedEventArgs.cs
- SystemIPGlobalProperties.cs
- VideoDrawing.cs
- ServiceDiscoveryElement.cs
- AuthStoreRoleProvider.cs
- Wildcard.cs
- RadialGradientBrush.cs
- MemberInfoSerializationHolder.cs
- OleDbParameter.cs
- _ScatterGatherBuffers.cs
- PopOutPanel.cs
- ImageListStreamer.cs
- NativeMethods.cs
- IndentedTextWriter.cs
- ColumnResizeAdorner.cs
- EntityObject.cs
- UrlPath.cs
- ProviderCommandInfoUtils.cs
- CapabilitiesRule.cs
- CodeLinePragma.cs
- DesignerView.cs
- DataGridViewCellValueEventArgs.cs
- ItemsPanelTemplate.cs