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
- ToolStripSplitStackLayout.cs
- KeyValuePair.cs
- FontNameConverter.cs
- _ChunkParse.cs
- FunctionDetailsReader.cs
- DataGridViewRowPostPaintEventArgs.cs
- CapacityStreamGeometryContext.cs
- RegistrationServices.cs
- DataGridViewAdvancedBorderStyle.cs
- ComboBoxAutomationPeer.cs
- ApplicationException.cs
- ScrollItemPattern.cs
- KeyGestureConverter.cs
- Window.cs
- DataSourceSelectArguments.cs
- MultiSelectRootGridEntry.cs
- SynchronizedInputHelper.cs
- AuditLogLocation.cs
- ProcessStartInfo.cs
- KeyboardEventArgs.cs
- ExpressionBuilder.cs
- EntityContainerRelationshipSet.cs
- SafeArchiveContext.cs
- StatusBarAutomationPeer.cs
- IntSecurity.cs
- AnimationException.cs
- PageThemeBuildProvider.cs
- InternalTypeHelper.cs
- SecurityTokenAuthenticator.cs
- OdbcFactory.cs
- ObjectDataProvider.cs
- XPathNavigatorKeyComparer.cs
- EntityDataSourceContextDisposingEventArgs.cs
- WebBrowserEvent.cs
- TreePrinter.cs
- CustomErrorsSection.cs
- OdbcRowUpdatingEvent.cs
- HtmlInputRadioButton.cs
- TableLayout.cs
- DesignerCategoryAttribute.cs
- NaturalLanguageHyphenator.cs
- GreenMethods.cs
- PageThemeBuildProvider.cs
- X509InitiatorCertificateServiceElement.cs
- CharConverter.cs
- HMAC.cs
- ToolboxItemWrapper.cs
- FixedDocumentPaginator.cs
- InputMethod.cs
- EncryptedKey.cs
- AttachedPropertyInfo.cs
- HostingEnvironmentException.cs
- PageAsyncTask.cs
- SymbolResolver.cs
- DataGridColumnFloatingHeader.cs
- Expression.cs
- SizeChangedEventArgs.cs
- UnsafeNativeMethods.cs
- RsaSecurityTokenAuthenticator.cs
- XPathSelectionIterator.cs
- HostSecurityManager.cs
- FormsAuthenticationEventArgs.cs
- SslStreamSecurityElement.cs
- ClassData.cs
- TextDecorations.cs
- DurationConverter.cs
- PtsHost.cs
- FileDetails.cs
- unitconverter.cs
- XmlDocumentFragment.cs
- Wizard.cs
- AnimationStorage.cs
- MultitargetUtil.cs
- JsonObjectDataContract.cs
- RawStylusActions.cs
- TypeToArgumentTypeConverter.cs
- ServiceMetadataPublishingElement.cs
- SqlConnectionHelper.cs
- DataGridViewCheckBoxCell.cs
- TextInfo.cs
- infer.cs
- DocumentSequenceHighlightLayer.cs
- DetailsViewInsertedEventArgs.cs
- MessageBuffer.cs
- DetailsViewInsertEventArgs.cs
- MethodExpr.cs
- SimpleMailWebEventProvider.cs
- TimeSpanSecondsConverter.cs
- ImpersonateTokenRef.cs
- SqlNode.cs
- IWorkflowDebuggerService.cs
- WebDisplayNameAttribute.cs
- SqlInternalConnectionTds.cs
- DataBindingHandlerAttribute.cs
- DateTimeOffset.cs
- X509ChainPolicy.cs
- PromptStyle.cs
- SafeUserTokenHandle.cs
- EditorPartCollection.cs
- CompensatableTransactionScopeActivity.cs