Code:
/ 4.0 / 4.0 / untmp / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- CallSiteHelpers.cs
- HttpListenerPrefixCollection.cs
- MobileControlsSectionHelper.cs
- XPathAncestorQuery.cs
- BrowserCapabilitiesFactory.cs
- ToolStripControlHost.cs
- DocumentScope.cs
- SmtpNegotiateAuthenticationModule.cs
- SelectiveScrollingGrid.cs
- UrlMappingCollection.cs
- SemaphoreFullException.cs
- KnowledgeBase.cs
- PageThemeParser.cs
- BitmapEncoder.cs
- LogicalExpressionTypeConverter.cs
- EnumerableRowCollection.cs
- SettingsProperty.cs
- Mapping.cs
- Pair.cs
- FontConverter.cs
- StorageConditionPropertyMapping.cs
- EntitySetBase.cs
- AlgoModule.cs
- FormatterServicesNoSerializableCheck.cs
- IncrementalReadDecoders.cs
- ResXResourceWriter.cs
- RightsDocument.cs
- SchemaElementLookUpTable.cs
- ApplicationDirectoryMembershipCondition.cs
- NetPeerTcpBindingCollectionElement.cs
- PolicyStatement.cs
- ControlAdapter.cs
- DefinitionProperties.cs
- AssemblyAttributes.cs
- DataGridViewIntLinkedList.cs
- DeferredReference.cs
- CommandConverter.cs
- _SslStream.cs
- ConfigPathUtility.cs
- StyleSheetRefUrlEditor.cs
- NTAccount.cs
- PrintDialog.cs
- WebPartZone.cs
- DataGridViewCellMouseEventArgs.cs
- KnownIds.cs
- DbProviderManifest.cs
- GeneralTransform2DTo3DTo2D.cs
- DrawingDrawingContext.cs
- RenderContext.cs
- SeekableReadStream.cs
- ConfigurationValues.cs
- StringCollectionMarkupSerializer.cs
- BinaryObjectReader.cs
- XmlSchemas.cs
- SQLBytesStorage.cs
- XslException.cs
- ApplicationFileCodeDomTreeGenerator.cs
- MethodBody.cs
- IdnElement.cs
- HostElement.cs
- CompatibleComparer.cs
- JavaScriptObjectDeserializer.cs
- GreenMethods.cs
- AnimationTimeline.cs
- XmlSchemaSimpleType.cs
- TdsParserStaticMethods.cs
- SQLDateTime.cs
- RepeatButton.cs
- SafeNativeMethods.cs
- ListSortDescriptionCollection.cs
- InvalidFilterCriteriaException.cs
- GenericXmlSecurityToken.cs
- RawStylusInput.cs
- Simplifier.cs
- NativeMethods.cs
- StandardMenuStripVerb.cs
- SharedPerformanceCounter.cs
- MenuItemCollection.cs
- LinkTarget.cs
- SchemaExporter.cs
- InvalidPrinterException.cs
- ProfilePropertyNameValidator.cs
- IISUnsafeMethods.cs
- GroupQuery.cs
- Interlocked.cs
- DrawItemEvent.cs
- ColumnHeader.cs
- NestPullup.cs
- QilStrConcatenator.cs
- UrlAuthorizationModule.cs
- Properties.cs
- TabControlEvent.cs
- UriTemplateTableMatchCandidate.cs
- SqlUserDefinedAggregateAttribute.cs
- Geometry.cs
- Page.cs
- TextMetrics.cs
- IIS7UserPrincipal.cs
- HtmlHead.cs
- DomainUpDown.cs