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
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- CodeSnippetTypeMember.cs
- CoordinationService.cs
- HtmlFormAdapter.cs
- UInt64.cs
- BaseDataBoundControl.cs
- SignedXml.cs
- DrawingVisualDrawingContext.cs
- FunctionDescription.cs
- Camera.cs
- updateconfighost.cs
- OleDbErrorCollection.cs
- RoleManagerModule.cs
- ExpressionPrinter.cs
- AppDomainAttributes.cs
- GregorianCalendar.cs
- XmlNodeChangedEventManager.cs
- _LoggingObject.cs
- StorageRoot.cs
- Overlapped.cs
- SqlConnectionFactory.cs
- ServiceErrorHandler.cs
- Vars.cs
- DriveNotFoundException.cs
- FixedSOMTextRun.cs
- ControlBuilder.cs
- WebPartConnectionsEventArgs.cs
- ManifestResourceInfo.cs
- ProgressBarAutomationPeer.cs
- ZipIOCentralDirectoryFileHeader.cs
- UserMapPath.cs
- WebPartsSection.cs
- ParseHttpDate.cs
- DbProviderServices.cs
- PassportIdentity.cs
- NavigationPropertyEmitter.cs
- ECDiffieHellman.cs
- SecurityManager.cs
- SQLSingleStorage.cs
- Wrapper.cs
- GlyphInfoList.cs
- MessagingActivityHelper.cs
- FormClosingEvent.cs
- RequestCachingSection.cs
- TripleDESCryptoServiceProvider.cs
- ViewManager.cs
- Boolean.cs
- RewritingPass.cs
- Annotation.cs
- ReferentialConstraint.cs
- UIPermission.cs
- RectangleHotSpot.cs
- TableLayoutPanel.cs
- PtsHelper.cs
- NativeMethods.cs
- CodeTypeDeclarationCollection.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- DateTimeConverter2.cs
- UnsafeNativeMethodsCLR.cs
- EdmRelationshipNavigationPropertyAttribute.cs
- TextWriterTraceListener.cs
- Component.cs
- Debug.cs
- DataControlField.cs
- InlinedAggregationOperatorEnumerator.cs
- AssignDesigner.xaml.cs
- RegistryDataKey.cs
- Int64AnimationBase.cs
- SchemaSetCompiler.cs
- AnonymousIdentificationModule.cs
- SoapElementAttribute.cs
- BStrWrapper.cs
- ExplicitDiscriminatorMap.cs
- Relationship.cs
- SerialPinChanges.cs
- ObjectIDGenerator.cs
- HuffModule.cs
- XmlElementList.cs
- PeerEndPoint.cs
- MonitorWrapper.cs
- QuestionEventArgs.cs
- DesignerToolboxInfo.cs
- VectorCollectionConverter.cs
- BuildManager.cs
- WebBrowserNavigatedEventHandler.cs
- ServiceBusyException.cs
- COMException.cs
- ActiveXHelper.cs
- ContentPresenter.cs
- CallContext.cs
- NativeMethods.cs
- PageBuildProvider.cs
- MulticastDelegate.cs
- ExpressionPrefixAttribute.cs
- ElementHost.cs
- DataGridViewRowCancelEventArgs.cs
- UInt16Storage.cs
- CharEnumerator.cs
- EtwTrackingBehaviorElement.cs
- Int16AnimationBase.cs
- CacheRequest.cs