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
- ContractReference.cs
- Vector3DValueSerializer.cs
- CreateUserErrorEventArgs.cs
- ListBase.cs
- TdsParserStaticMethods.cs
- xmlglyphRunInfo.cs
- MSAANativeProvider.cs
- FaultException.cs
- SelectorAutomationPeer.cs
- SingleKeyFrameCollection.cs
- PropertiesTab.cs
- ConcurrentQueue.cs
- ProtocolViolationException.cs
- ContractCodeDomInfo.cs
- LogReservationCollection.cs
- SoapReflectionImporter.cs
- OperationAbortedException.cs
- ValidationPropertyAttribute.cs
- EventLogger.cs
- SpecularMaterial.cs
- StringConverter.cs
- ColorConvertedBitmap.cs
- BoolExpressionVisitors.cs
- BackgroundWorker.cs
- StrokeNodeData.cs
- SingleObjectCollection.cs
- GlyphShapingProperties.cs
- FastEncoder.cs
- TraceListeners.cs
- WebPartConnectionsEventArgs.cs
- ImageKeyConverter.cs
- EntryPointNotFoundException.cs
- BaseProcessor.cs
- SerTrace.cs
- FixedSOMContainer.cs
- ScrollPatternIdentifiers.cs
- PeerCollaboration.cs
- ClientBuildManagerCallback.cs
- PixelShader.cs
- Crc32Helper.cs
- DrawItemEvent.cs
- ByteStreamMessage.cs
- Timer.cs
- DbConnectionPoolGroup.cs
- Menu.cs
- SerializationException.cs
- MetadataStore.cs
- ClientWindowsAuthenticationMembershipProvider.cs
- UInt32Storage.cs
- TextElementEnumerator.cs
- SchemaMerger.cs
- AxHost.cs
- _CommandStream.cs
- DesignTimeVisibleAttribute.cs
- Socket.cs
- LocalBuilder.cs
- SqlUtils.cs
- TickBar.cs
- DataGridItem.cs
- ToolStripContentPanel.cs
- SimpleExpression.cs
- MemoryRecordBuffer.cs
- CodeBinaryOperatorExpression.cs
- InvokeWebService.cs
- LogicalCallContext.cs
- SqlClientFactory.cs
- AutoCompleteStringCollection.cs
- XmlSerializerFaultFormatter.cs
- ClientScriptManager.cs
- AttachmentCollection.cs
- CheckBoxPopupAdapter.cs
- DescendantOverDescendantQuery.cs
- CacheVirtualItemsEvent.cs
- SuppressMessageAttribute.cs
- Schedule.cs
- TrustLevelCollection.cs
- ImagingCache.cs
- LogReservationCollection.cs
- SqlBuilder.cs
- TextElementCollection.cs
- Internal.cs
- LicenseContext.cs
- SQLBoolean.cs
- SchemaMerger.cs
- GenerateHelper.cs
- ConsumerConnectionPoint.cs
- ping.cs
- ValidationErrorCollection.cs
- SafeLibraryHandle.cs
- MenuItem.cs
- WebHttpEndpointElement.cs
- Misc.cs
- TextEditorContextMenu.cs
- CompensatableSequenceActivity.cs
- TimeZoneNotFoundException.cs
- InitiatorSessionSymmetricTransportSecurityProtocol.cs
- UnsafeNativeMethods.cs
- ProgressBarHighlightConverter.cs
- PointLight.cs
- XmlSchemaComplexContent.cs