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
- TraceHandlerErrorFormatter.cs
- RuleInfoComparer.cs
- ProcessModuleDesigner.cs
- FileDialog.cs
- IRCollection.cs
- ConstructorNeedsTagAttribute.cs
- SerialReceived.cs
- BitmapImage.cs
- ButtonFlatAdapter.cs
- Viewport2DVisual3D.cs
- XmlSignificantWhitespace.cs
- HttpCapabilitiesEvaluator.cs
- Command.cs
- State.cs
- XslAst.cs
- Cursor.cs
- DiagnosticTraceSource.cs
- FlowLayout.cs
- WorkflowServiceHostFactory.cs
- XmlDomTextWriter.cs
- EventDescriptor.cs
- PermissionSet.cs
- FontFamilyIdentifier.cs
- WmlTextBoxAdapter.cs
- ChangesetResponse.cs
- SqlCacheDependencyDatabase.cs
- CodeObjectCreateExpression.cs
- SapiRecoContext.cs
- ContentType.cs
- ManagedWndProcTracker.cs
- PageRequestManager.cs
- SchemaImporterExtensionElementCollection.cs
- ListItemCollection.cs
- XmlTextEncoder.cs
- RotateTransform3D.cs
- Color.cs
- SQLBytesStorage.cs
- RepeaterItem.cs
- BinaryParser.cs
- CombinedGeometry.cs
- XamlStyleSerializer.cs
- MenuItemBindingCollection.cs
- PrincipalPermission.cs
- GuidTagList.cs
- Utils.cs
- EntityDataSourceSelectingEventArgs.cs
- RequestDescription.cs
- SoapMessage.cs
- XmlSchemaImporter.cs
- TaiwanLunisolarCalendar.cs
- PrintDocument.cs
- BlockCollection.cs
- ActivityValidationServices.cs
- DataGridBoolColumn.cs
- StringUtil.cs
- InvokeMethodActivity.cs
- WindowsIdentity.cs
- FrameworkContextData.cs
- SafeNativeMethods.cs
- ConstraintConverter.cs
- PipeSecurity.cs
- EntityViewGenerationAttribute.cs
- TPLETWProvider.cs
- Inline.cs
- WizardStepBase.cs
- Adorner.cs
- RectAnimationClockResource.cs
- NameService.cs
- NetMsmqSecurity.cs
- PopupControlService.cs
- UdpConstants.cs
- FileReservationCollection.cs
- Effect.cs
- OutOfMemoryException.cs
- IntPtr.cs
- DebugControllerThread.cs
- Pair.cs
- SymbolEqualComparer.cs
- TimeoutHelper.cs
- DesignTable.cs
- TransformationRules.cs
- ContextStack.cs
- HtmlInputButton.cs
- sqlstateclientmanager.cs
- Scripts.cs
- dbdatarecord.cs
- ListViewItemMouseHoverEvent.cs
- PropertyManager.cs
- TabletCollection.cs
- SoapElementAttribute.cs
- IItemContainerGenerator.cs
- _SafeNetHandles.cs
- SafeFileMappingHandle.cs
- TextOutput.cs
- MetadataItem_Static.cs
- AtomServiceDocumentSerializer.cs
- EventArgs.cs
- ImagingCache.cs
- PropertyStore.cs
- FullTrustAssemblyCollection.cs