Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / ndp / fx / src / DataEntity / System / Data / EntityModel / SchemaObjectModel / PrimitiveSchema.cs / 2 / 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
- SqlFunctionAttribute.cs
- SRGSCompiler.cs
- ViewManager.cs
- ClientOptions.cs
- TreeChangeInfo.cs
- CheckBoxPopupAdapter.cs
- MSG.cs
- BookmarkTable.cs
- Boolean.cs
- ExpressionVisitor.cs
- VisualState.cs
- QilNode.cs
- StylusPointCollection.cs
- SelectionList.cs
- Pkcs9Attribute.cs
- NavigatorInput.cs
- ContractType.cs
- RegistryConfigurationProvider.cs
- LiteralTextContainerControlBuilder.cs
- CommonObjectSecurity.cs
- VScrollBar.cs
- ObjectHelper.cs
- QilInvoke.cs
- MenuItemBindingCollection.cs
- CompositeActivityTypeDescriptorProvider.cs
- ApplicationTrust.cs
- BaseDataBoundControl.cs
- EdmToObjectNamespaceMap.cs
- ObjectCacheHost.cs
- ForeignConstraint.cs
- HttpApplicationFactory.cs
- RelationshipFixer.cs
- TagPrefixCollection.cs
- SpAudioStreamWrapper.cs
- OdbcTransaction.cs
- Drawing.cs
- MergeFilterQuery.cs
- ChameleonKey.cs
- MetadataUtilsSmi.cs
- CustomDictionarySources.cs
- OptimizerPatterns.cs
- CompressEmulationStream.cs
- DesignSurface.cs
- SizeFConverter.cs
- TimeSpanValidatorAttribute.cs
- GenericsInstances.cs
- ConstructorExpr.cs
- Point3DValueSerializer.cs
- ViewManager.cs
- ObsoleteAttribute.cs
- DataGridViewToolTip.cs
- AppDomainShutdownMonitor.cs
- HtmlTableRow.cs
- DesignerVerb.cs
- NameValueConfigurationElement.cs
- TextServicesLoader.cs
- CompressStream.cs
- Size.cs
- SubMenuStyleCollection.cs
- TextParentUndoUnit.cs
- DataSpaceManager.cs
- TextViewBase.cs
- OneOfScalarConst.cs
- EnumType.cs
- CellCreator.cs
- HttpProcessUtility.cs
- DragEventArgs.cs
- ServiceDefaults.cs
- QueryPrefixOp.cs
- ExpressionConverter.cs
- ObjectParameterCollection.cs
- ToolStripOverflowButton.cs
- FolderLevelBuildProviderCollection.cs
- Binding.cs
- SqlInternalConnectionTds.cs
- EntityDataSourceSelectedEventArgs.cs
- XmlElementAttributes.cs
- GeometryModel3D.cs
- XmlTextReaderImpl.cs
- ClientProxyGenerator.cs
- DataErrorValidationRule.cs
- SchemaImporterExtension.cs
- DecoderExceptionFallback.cs
- CryptoKeySecurity.cs
- WindowsContainer.cs
- SignedPkcs7.cs
- SqlAggregateChecker.cs
- assertwrapper.cs
- SafeSerializationManager.cs
- SingleConverter.cs
- SchemaTableColumn.cs
- DispatcherObject.cs
- Encoding.cs
- SoapProcessingBehavior.cs
- PageSetupDialog.cs
- Section.cs
- DataRelationCollection.cs
- GestureRecognitionResult.cs
- XmlEncodedRawTextWriter.cs
- ClosableStream.cs