Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataEntity / System / Data / EntityModel / SchemaObjectModel / PrimitiveSchema.cs / 1305376 / 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
- SqlTopReducer.cs
- TextEditorMouse.cs
- ScriptRegistrationManager.cs
- SqlTriggerContext.cs
- XmlArrayItemAttributes.cs
- LinkLabelLinkClickedEvent.cs
- X509Certificate2Collection.cs
- SettingsBase.cs
- NavigationCommands.cs
- XmlTypeMapping.cs
- BinaryConverter.cs
- XmlWellformedWriter.cs
- ValidationPropertyAttribute.cs
- WebPartMenuStyle.cs
- XComponentModel.cs
- FontFamilyConverter.cs
- Permission.cs
- WebDescriptionAttribute.cs
- SchemaManager.cs
- SafeHandle.cs
- ContextMenuService.cs
- Stack.cs
- TdsParserStateObject.cs
- FontConverter.cs
- ClientConfigurationSystem.cs
- DeferredTextReference.cs
- ScaleTransform.cs
- AutomationPatternInfo.cs
- InvalidProgramException.cs
- XamlGridLengthSerializer.cs
- ManipulationLogic.cs
- ILGen.cs
- Rijndael.cs
- PartialArray.cs
- ClusterUtils.cs
- SelectionHighlightInfo.cs
- NativeObjectSecurity.cs
- PointHitTestResult.cs
- AppDomain.cs
- QilIterator.cs
- SrgsText.cs
- HttpRequestCacheValidator.cs
- StateMachineTimers.cs
- GridViewRowPresenterBase.cs
- TextAutomationPeer.cs
- XmlWriterDelegator.cs
- PositiveTimeSpanValidatorAttribute.cs
- DEREncoding.cs
- ETagAttribute.cs
- Int64AnimationUsingKeyFrames.cs
- HierarchicalDataSourceControl.cs
- _SslState.cs
- PointLight.cs
- XmlTextAttribute.cs
- PathFigureCollection.cs
- AssemblyCollection.cs
- _SslSessionsCache.cs
- PreviewPrintController.cs
- CqlWriter.cs
- SR.Designer.cs
- FontFaceLayoutInfo.cs
- ProgressiveCrcCalculatingStream.cs
- TextChange.cs
- ToolStripRenderer.cs
- NotFiniteNumberException.cs
- GroupItem.cs
- TableCellAutomationPeer.cs
- DataGridViewLinkCell.cs
- RegexRunnerFactory.cs
- HtmlAnchor.cs
- SQLSingleStorage.cs
- DependencyPropertyValueSerializer.cs
- PositiveTimeSpanValidatorAttribute.cs
- StandardCommands.cs
- BuildResult.cs
- ListArgumentProvider.cs
- XmlRootAttribute.cs
- StoryFragments.cs
- QueryRewriter.cs
- TypeInitializationException.cs
- BitmapCodecInfo.cs
- SingleKeyFrameCollection.cs
- QilPatternFactory.cs
- DbConnectionPool.cs
- IsolatedStorageFile.cs
- DebugController.cs
- MDIClient.cs
- SqlDataSourceView.cs
- MailMessage.cs
- SmtpLoginAuthenticationModule.cs
- ExternalDataExchangeService.cs
- IRCollection.cs
- DiagnosticStrings.cs
- Int64KeyFrameCollection.cs
- SqlCachedBuffer.cs
- ListDesigner.cs
- BufferModeSettings.cs
- ComEventsHelper.cs
- BamlRecords.cs
- InternalDispatchObject.cs