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
- DynamicControlParameter.cs
- DomNameTable.cs
- SqlConnectionManager.cs
- RoutedEventHandlerInfo.cs
- RemotingServices.cs
- ProxyHwnd.cs
- SurrogateDataContract.cs
- WindowHideOrCloseTracker.cs
- XmlBufferReader.cs
- ConfigurationSectionGroup.cs
- MimeFormImporter.cs
- UrlUtility.cs
- TypeCodeDomSerializer.cs
- CompositeTypefaceMetrics.cs
- OpenTypeLayout.cs
- WebConfigurationHostFileChange.cs
- ConditionBrowserDialog.cs
- InternalPermissions.cs
- TypeToken.cs
- SafeNativeHandle.cs
- FixedSOMTableRow.cs
- AutomationElementCollection.cs
- Button.cs
- SpellerError.cs
- ClientBuildManagerTypeDescriptionProviderBridge.cs
- UnmanagedHandle.cs
- ListView.cs
- WmpBitmapEncoder.cs
- RelatedEnd.cs
- ToggleProviderWrapper.cs
- TextRangeBase.cs
- Rect3DConverter.cs
- AdapterDictionary.cs
- ValidatingPropertiesEventArgs.cs
- WindowsSecurityTokenAuthenticator.cs
- ListView.cs
- EventHandlingScope.cs
- Message.cs
- OleDbDataAdapter.cs
- StandardToolWindows.cs
- HtmlWindow.cs
- XmlCharCheckingReader.cs
- PrintingPermission.cs
- MetadataItem.cs
- AutomationProperties.cs
- Calendar.cs
- StringDictionaryEditor.cs
- XmlDataSourceView.cs
- TagNameToTypeMapper.cs
- EntityDataSourceWrapper.cs
- RelationshipManager.cs
- DrawingContextDrawingContextWalker.cs
- BuildDependencySet.cs
- TypeElement.cs
- SqlTriggerContext.cs
- PrePrepareMethodAttribute.cs
- HealthMonitoringSection.cs
- IconHelper.cs
- HandleValueEditor.cs
- HttpFileCollectionWrapper.cs
- CommonRemoteMemoryBlock.cs
- MenuItemCollection.cs
- DataColumnMappingCollection.cs
- MemoryStream.cs
- RawStylusInputReport.cs
- NeutralResourcesLanguageAttribute.cs
- GeneralTransform3DGroup.cs
- DependencySource.cs
- DependsOnAttribute.cs
- RpcAsyncResult.cs
- InputBinder.cs
- FontInfo.cs
- DataGridViewColumnConverter.cs
- QilParameter.cs
- FakeModelPropertyImpl.cs
- TextLine.cs
- StandardCommands.cs
- GlyphingCache.cs
- DateTimeOffset.cs
- Control.cs
- ColumnResizeAdorner.cs
- AxHost.cs
- BinarySecretKeyIdentifierClause.cs
- ManifestResourceInfo.cs
- XamlSerializerUtil.cs
- SmiGettersStream.cs
- IImplicitResourceProvider.cs
- ControlBuilder.cs
- mda.cs
- CancellationToken.cs
- SmiEventSink_Default.cs
- EventDrivenDesigner.cs
- StylusSystemGestureEventArgs.cs
- CreateUserErrorEventArgs.cs
- Accessors.cs
- TailPinnedEventArgs.cs
- GeometryDrawing.cs
- TypeReference.cs
- Mappings.cs
- CompositeActivityCodeGenerator.cs