Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / ndp / fx / src / DataEntity / System / Data / EntityModel / SchemaObjectModel / PrimitiveSchema.cs / 3 / 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
- BitmapCodecInfo.cs
- AssemblyHash.cs
- TemplateXamlParser.cs
- TextEditorLists.cs
- DockProviderWrapper.cs
- RectIndependentAnimationStorage.cs
- SubstitutionList.cs
- CustomTypeDescriptor.cs
- XmlSchemaInclude.cs
- SpecialFolderEnumConverter.cs
- Emitter.cs
- BaseInfoTable.cs
- MessageAction.cs
- PixelFormat.cs
- ConfigurationSectionGroupCollection.cs
- WindowsComboBox.cs
- ListViewDataItem.cs
- EntityContainerEntitySetDefiningQuery.cs
- HtmlMeta.cs
- ResourceLoader.cs
- ActivitiesCollection.cs
- DescriptionAttribute.cs
- GenericsInstances.cs
- Listener.cs
- COAUTHIDENTITY.cs
- __ConsoleStream.cs
- SoapElementAttribute.cs
- ButtonBaseAutomationPeer.cs
- WmfPlaceableFileHeader.cs
- SchemaNamespaceManager.cs
- SafeEventLogWriteHandle.cs
- SettingsBindableAttribute.cs
- XmlSchemaImporter.cs
- SoapConverter.cs
- ImplicitInputBrush.cs
- TreeNodeSelectionProcessor.cs
- ArrayElementGridEntry.cs
- IISMapPath.cs
- UInt16.cs
- ProviderConnectionPoint.cs
- ConnectionsZone.cs
- Attribute.cs
- IntSecurity.cs
- ImportCatalogPart.cs
- LinqDataSourceView.cs
- ManipulationDevice.cs
- ComponentEvent.cs
- Panel.cs
- Matrix3DValueSerializer.cs
- VSDExceptions.cs
- NativeCompoundFileAPIs.cs
- HtmlShim.cs
- ValidationSummary.cs
- SqlBulkCopyColumnMapping.cs
- AttributeData.cs
- HtmlGenericControl.cs
- NativeRightsManagementAPIsStructures.cs
- HexParser.cs
- ChannelSinkStacks.cs
- DataSet.cs
- ParserHooks.cs
- SharedStatics.cs
- WebBrowserBase.cs
- PermissionSetEnumerator.cs
- JapaneseCalendar.cs
- BaseCodeDomTreeGenerator.cs
- InstanceDataCollectionCollection.cs
- TextPointer.cs
- MouseCaptureWithinProperty.cs
- SqlDependency.cs
- ZipIOLocalFileBlock.cs
- HttpServerVarsCollection.cs
- FileNameEditor.cs
- SqlUdtInfo.cs
- CaseExpr.cs
- CachedBitmap.cs
- DefaultObjectMappingItemCollection.cs
- CommandDesigner.cs
- OdbcConnectionPoolProviderInfo.cs
- Zone.cs
- HebrewCalendar.cs
- SafeMILHandle.cs
- RequestSecurityTokenResponse.cs
- WebPartConnectionsCancelVerb.cs
- ExpressionConverter.cs
- XmlNamespaceDeclarationsAttribute.cs
- SystemIcons.cs
- FileLevelControlBuilderAttribute.cs
- BitStack.cs
- DependentList.cs
- UInt16Converter.cs
- MaskedTextBoxTextEditorDropDown.cs
- FileLoadException.cs
- ConditionalExpression.cs
- Utility.cs
- ListDictionaryInternal.cs
- ExceptionUtil.cs
- TextEditorTyping.cs
- BaseParaClient.cs
- ChangeInterceptorAttribute.cs