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 / PrimitiveSchema.cs / 2 / PrimitiveSchema.cs
//---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //--------------------------------------------------------------------- using System; using System.Diagnostics; using System.Data.Common; using System.Collections.Generic; using System.Data.Metadata.Edm; using System.Xml; namespace System.Data.EntityModel.SchemaObjectModel { ////// The virtual schema for primitive data types /// internal class PrimitiveSchema : Schema { public PrimitiveSchema(SchemaManager schemaManager) : base(schemaManager) { Schema = this; DbProviderManifest providerManifest = ProviderManifest; if (providerManifest == null) { AddError(new EdmSchemaError(System.Data.Entity.Strings.FailedToRetrieveProviderManifest, (int)ErrorCode.FailedToRetrieveProviderManifest, EdmSchemaErrorSeverity.Error)); } else { foreach (PrimitiveType entry in providerManifest.GetStoreTypes()) { TryAddType(new ScalarType(this, entry.Name, entry), false /*doNotAddErrorForEmptyName*/); } } } ////// Returns the alias that can be used for type in this /// Namespace instead of the entire namespace name /// internal override string Alias { get { return ProviderManifest.NamespaceName; } } ////// Returns the TypeAuthority that is driving this schema /// internal override string Namespace { get { if (ProviderManifest != null) { return ProviderManifest.NamespaceName; } return string.Empty; } } protected override bool HandleAttribute(XmlReader reader) { // don't call the base, we don't have any attributes return false; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //--------------------------------------------------------------------- using System; using System.Diagnostics; using System.Data.Common; using System.Collections.Generic; using System.Data.Metadata.Edm; using System.Xml; namespace System.Data.EntityModel.SchemaObjectModel { ////// The virtual schema for primitive data types /// internal class PrimitiveSchema : Schema { public PrimitiveSchema(SchemaManager schemaManager) : base(schemaManager) { Schema = this; DbProviderManifest providerManifest = ProviderManifest; if (providerManifest == null) { AddError(new EdmSchemaError(System.Data.Entity.Strings.FailedToRetrieveProviderManifest, (int)ErrorCode.FailedToRetrieveProviderManifest, EdmSchemaErrorSeverity.Error)); } else { foreach (PrimitiveType entry in providerManifest.GetStoreTypes()) { TryAddType(new ScalarType(this, entry.Name, entry), false /*doNotAddErrorForEmptyName*/); } } } ////// Returns the alias that can be used for type in this /// Namespace instead of the entire namespace name /// internal override string Alias { get { return ProviderManifest.NamespaceName; } } ////// Returns the TypeAuthority that is driving this schema /// internal override string Namespace { get { if (ProviderManifest != null) { return ProviderManifest.NamespaceName; } return string.Empty; } } protected override bool HandleAttribute(XmlReader reader) { // don't call the base, we don't have any attributes return false; } } } // 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
- DocumentOrderComparer.cs
- ToolStripMenuItem.cs
- CodeExporter.cs
- _ContextAwareResult.cs
- LineVisual.cs
- ReceiveCompletedEventArgs.cs
- XmlQueryOutput.cs
- EnumBuilder.cs
- BidPrivateBase.cs
- XmlnsDictionary.cs
- ETagAttribute.cs
- COM2Properties.cs
- UserPreferenceChangingEventArgs.cs
- BuildProvidersCompiler.cs
- DesignerDataStoredProcedure.cs
- OracleParameterBinding.cs
- CommonEndpointBehaviorElement.cs
- WebConfigurationHost.cs
- WebReferencesBuildProvider.cs
- InternalCompensate.cs
- WaitHandle.cs
- SimpleHandlerFactory.cs
- RequiredAttributeAttribute.cs
- QilFactory.cs
- DbExpressionRules.cs
- CodeGotoStatement.cs
- MetadataCollection.cs
- SystemInformation.cs
- LinqDataView.cs
- ReferencedCollectionType.cs
- ObfuscateAssemblyAttribute.cs
- EditorZone.cs
- ResourceDefaultValueAttribute.cs
- FacetChecker.cs
- MessageBuffer.cs
- Point3DAnimation.cs
- Part.cs
- PipeStream.cs
- PathData.cs
- PointHitTestResult.cs
- PlaceHolder.cs
- ImageConverter.cs
- MethodRental.cs
- SiteOfOriginPart.cs
- SingleObjectCollection.cs
- DataGridViewHeaderCell.cs
- DataObject.cs
- CommandTreeTypeHelper.cs
- TypeDefinition.cs
- SapiRecoContext.cs
- compensatingcollection.cs
- Visual3D.cs
- ObjectConverter.cs
- invalidudtexception.cs
- CookielessHelper.cs
- ConnectionProviderAttribute.cs
- CustomTrackingQuery.cs
- ConditionCollection.cs
- XPathMessageFilterTable.cs
- ComponentCommands.cs
- TextRunTypographyProperties.cs
- TableDetailsCollection.cs
- TextUtf8RawTextWriter.cs
- ThrowHelper.cs
- DependencyObjectType.cs
- DefinitionBase.cs
- DataGridViewRowHeightInfoNeededEventArgs.cs
- InkPresenterAutomationPeer.cs
- RemoteWebConfigurationHostServer.cs
- ListView.cs
- ImageField.cs
- ScopelessEnumAttribute.cs
- ListItemCollection.cs
- CounterSample.cs
- TargetConverter.cs
- figurelengthconverter.cs
- Header.cs
- ResourceReferenceKeyNotFoundException.cs
- QilValidationVisitor.cs
- RegexRunner.cs
- Point3DAnimationUsingKeyFrames.cs
- ExceptionTranslationTable.cs
- LocalValueEnumerator.cs
- FileUtil.cs
- TopClause.cs
- ComplexLine.cs
- SchemaLookupTable.cs
- Viewport3DAutomationPeer.cs
- NavigatorInvalidBodyAccessException.cs
- XmlSchemaAnnotation.cs
- AnyAllSearchOperator.cs
- ConfigurationErrorsException.cs
- KoreanCalendar.cs
- ColumnReorderedEventArgs.cs
- ADConnectionHelper.cs
- OutputCacheSettingsSection.cs
- KnownColorTable.cs
- HttpPostedFile.cs
- Utils.cs
- MailDefinition.cs