Code:
/ 4.0 / 4.0 / 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. //---------------------------------------------------------------------- //// 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
- MouseWheelEventArgs.cs
- LayoutEditorPart.cs
- ObjectTypeMapping.cs
- SoapExtensionStream.cs
- UpdatePanelControlTrigger.cs
- RadialGradientBrush.cs
- EventDescriptor.cs
- OdbcDataAdapter.cs
- ConfigurationStrings.cs
- InsufficientMemoryException.cs
- CalloutQueueItem.cs
- TimeZone.cs
- CacheEntry.cs
- HttpCookiesSection.cs
- DataError.cs
- MaterialGroup.cs
- ListBindingHelper.cs
- MaterializeFromAtom.cs
- cookiecontainer.cs
- ServiceOperationParameter.cs
- SingleTagSectionHandler.cs
- OrderedDictionary.cs
- WebPartsPersonalization.cs
- DesignerVerbCollection.cs
- Pick.cs
- InvalidAsynchronousStateException.cs
- VariableQuery.cs
- HtmlSelect.cs
- LassoSelectionBehavior.cs
- Expander.cs
- EntitySqlException.cs
- StringValidatorAttribute.cs
- ITreeGenerator.cs
- ADMembershipProvider.cs
- DataServiceOperationContext.cs
- AssemblyFilter.cs
- PersistChildrenAttribute.cs
- OleDbConnectionInternal.cs
- DocumentViewerBaseAutomationPeer.cs
- GroupStyle.cs
- CancelEventArgs.cs
- HtmlUtf8RawTextWriter.cs
- PlainXmlDeserializer.cs
- FormParameter.cs
- UInt64.cs
- SystemTcpStatistics.cs
- ViewCellSlot.cs
- ConfigurationElementCollection.cs
- UseManagedPresentationBindingElementImporter.cs
- MessageAction.cs
- HwndSourceKeyboardInputSite.cs
- Enlistment.cs
- HtmlHistory.cs
- SystemWebCachingSectionGroup.cs
- _NestedMultipleAsyncResult.cs
- ColorMatrix.cs
- RowSpanVector.cs
- UnsafeNativeMethods.cs
- EntityAdapter.cs
- FixedHighlight.cs
- SelectionHighlightInfo.cs
- InOutArgument.cs
- DataColumnSelectionConverter.cs
- ObservableCollection.cs
- TablePatternIdentifiers.cs
- DataGridTablesFactory.cs
- CrossContextChannel.cs
- OptimizedTemplateContentHelper.cs
- TextServicesManager.cs
- EntityTypeEmitter.cs
- Win32Exception.cs
- SecurityDescriptor.cs
- AuthenticationConfig.cs
- MetabaseSettingsIis7.cs
- RuntimeArgumentHandle.cs
- SystemResourceKey.cs
- SqlCaseSimplifier.cs
- SqlDataSourceCache.cs
- CodeValidator.cs
- DecoderFallback.cs
- QilCloneVisitor.cs
- UserControl.cs
- rsa.cs
- DiagnosticsConfiguration.cs
- precedingquery.cs
- PhysicalOps.cs
- ConfigurationElementProperty.cs
- FillRuleValidation.cs
- uribuilder.cs
- XamlHostingConfiguration.cs
- RuntimeResourceSet.cs
- ReflectTypeDescriptionProvider.cs
- FrameworkElement.cs
- DetailsViewInsertEventArgs.cs
- PageThemeCodeDomTreeGenerator.cs
- Delay.cs
- RtType.cs
- TextParagraphView.cs
- FormsAuthenticationTicket.cs
- SafeThreadHandle.cs