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
- DbCommandTree.cs
- StringInfo.cs
- XdrBuilder.cs
- BasicHttpSecurityElement.cs
- MaskedTextProvider.cs
- SafeEventLogWriteHandle.cs
- FontCacheLogic.cs
- FullTextState.cs
- UnsafeNativeMethods.cs
- EntitySqlQueryCacheEntry.cs
- EnumDataContract.cs
- Stroke2.cs
- XmlToDatasetMap.cs
- IOThreadScheduler.cs
- TableLayoutCellPaintEventArgs.cs
- BindingListCollectionView.cs
- SafeLibraryHandle.cs
- WindowsPrincipal.cs
- GC.cs
- ScriptingAuthenticationServiceSection.cs
- BaseAppDomainProtocolHandler.cs
- InternalMappingException.cs
- dataobject.cs
- SoapMessage.cs
- __Error.cs
- WpfGeneratedKnownProperties.cs
- AppDomainProtocolHandler.cs
- ValidationError.cs
- DateTimePicker.cs
- DataGridViewColumnCollectionDialog.cs
- EmbeddedObject.cs
- DesignUtil.cs
- RepeaterItemCollection.cs
- BezierSegment.cs
- WebPartCloseVerb.cs
- StyleCollectionEditor.cs
- DelegatingTypeDescriptionProvider.cs
- ExceptionUtil.cs
- WebPartVerbsEventArgs.cs
- SecurityState.cs
- AnonymousIdentificationModule.cs
- BrowserDefinitionCollection.cs
- BatchParser.cs
- XmlDictionary.cs
- ScrollBarRenderer.cs
- ConsoleKeyInfo.cs
- TextAdaptor.cs
- MSHTMLHostUtil.cs
- DSACryptoServiceProvider.cs
- ButtonFieldBase.cs
- HtmlString.cs
- ChannelServices.cs
- FontDialog.cs
- ProfessionalColorTable.cs
- ZoneButton.cs
- ConnectionInterfaceCollection.cs
- ProjectionPath.cs
- DataGridViewCellMouseEventArgs.cs
- LabelTarget.cs
- Catch.cs
- WorkflowInstanceExtensionProvider.cs
- XmlSubtreeReader.cs
- StructuralType.cs
- ContentPlaceHolder.cs
- ProtocolsConfigurationEntry.cs
- IImplicitResourceProvider.cs
- ToolStripPanelRenderEventArgs.cs
- OverflowException.cs
- CodeAccessPermission.cs
- Matrix3D.cs
- TransportContext.cs
- CodeExpressionStatement.cs
- SmtpLoginAuthenticationModule.cs
- DataBoundControlAdapter.cs
- StatusBarPanel.cs
- AnnotationDocumentPaginator.cs
- DataGridViewCellFormattingEventArgs.cs
- ElapsedEventArgs.cs
- RectAnimationClockResource.cs
- ItemCollection.cs
- ConnectionsZone.cs
- BadImageFormatException.cs
- MetadataPropertyAttribute.cs
- COSERVERINFO.cs
- DataRecordInfo.cs
- ErrorProvider.cs
- ColorKeyFrameCollection.cs
- ImmutableDispatchRuntime.cs
- ComponentEditorPage.cs
- WeakHashtable.cs
- ContextConfiguration.cs
- ConnectionsZone.cs
- TagMapCollection.cs
- SchemaNamespaceManager.cs
- Transform3D.cs
- SchemaElementDecl.cs
- DecoderBestFitFallback.cs
- ContractTypeNameCollection.cs
- SelectionService.cs
- WindowsScroll.cs