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
- DataGridViewRowHeightInfoPushedEventArgs.cs
- AdornerDecorator.cs
- PeerObject.cs
- SelectorItemAutomationPeer.cs
- SQlBooleanStorage.cs
- FrameworkContentElement.cs
- RewritingPass.cs
- ProfileGroupSettingsCollection.cs
- SelectionRangeConverter.cs
- NumberFunctions.cs
- ProjectionNode.cs
- FilePrompt.cs
- keycontainerpermission.cs
- Hex.cs
- ErrorEventArgs.cs
- DelayedRegex.cs
- WS2007HttpBindingCollectionElement.cs
- PropertyGridCommands.cs
- XmlNamespaceDeclarationsAttribute.cs
- FocusChangedEventArgs.cs
- AsyncPostBackTrigger.cs
- WmlCommandAdapter.cs
- SystemUdpStatistics.cs
- DesignerForm.cs
- MailMessage.cs
- StreamInfo.cs
- TickBar.cs
- CheckPair.cs
- RuntimeConfigLKG.cs
- PairComparer.cs
- tibetanshape.cs
- BindingExpressionBase.cs
- AdornerHitTestResult.cs
- DataProtection.cs
- RepeaterItemCollection.cs
- DataGridViewDataErrorEventArgs.cs
- TiffBitmapDecoder.cs
- WebPartZoneBase.cs
- FrameworkContextData.cs
- ArraySet.cs
- BookmarkManager.cs
- FileDialog.cs
- JsonStringDataContract.cs
- MethodBody.cs
- IgnoreFlushAndCloseStream.cs
- HiddenFieldPageStatePersister.cs
- XmlComplianceUtil.cs
- SyntaxCheck.cs
- IUnknownConstantAttribute.cs
- uribuilder.cs
- XamlDesignerSerializationManager.cs
- PagerSettings.cs
- _TransmitFileOverlappedAsyncResult.cs
- ButtonChrome.cs
- DataGridViewBand.cs
- ComUdtElement.cs
- ContractUtils.cs
- TextRangeEdit.cs
- CodeGroup.cs
- DataServiceQueryProvider.cs
- PasswordTextContainer.cs
- SelectorAutomationPeer.cs
- IIS7ConfigurationLoader.cs
- ScriptControlManager.cs
- CatalogPart.cs
- OpenFileDialog.cs
- ActivityUtilities.cs
- FlowNode.cs
- RefreshPropertiesAttribute.cs
- BindingManagerDataErrorEventArgs.cs
- PointAnimationUsingKeyFrames.cs
- HandlerFactoryCache.cs
- AdornerLayer.cs
- WebPartTransformerCollection.cs
- DataPager.cs
- LambdaCompiler.Logical.cs
- HtmlLabelAdapter.cs
- WebPartManager.cs
- ConnectionPointConverter.cs
- TextBox.cs
- CompilerGeneratedAttribute.cs
- VideoDrawing.cs
- sqlcontext.cs
- CombinedGeometry.cs
- CallbackValidator.cs
- WSFederationHttpBinding.cs
- SqlWebEventProvider.cs
- ObjectTag.cs
- ResourceAttributes.cs
- XmlSchemaImport.cs
- IntSecurity.cs
- FtpWebRequest.cs
- LinqExpressionNormalizer.cs
- DataSourceNameHandler.cs
- Size3DValueSerializer.cs
- ContextMenu.cs
- ConfigViewGenerator.cs
- GeneralTransform.cs
- Scheduling.cs
- SqlInternalConnectionTds.cs