Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / ndp / fx / src / DataEntity / System / Data / EntityModel / SchemaObjectModel / PrimitiveSchema.cs / 1 / 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
- Rfc2898DeriveBytes.cs
- Font.cs
- ContentFilePart.cs
- InternalDuplexChannelFactory.cs
- TextBoxDesigner.cs
- KnownTypeHelper.cs
- KeySplineConverter.cs
- BitmapCacheBrush.cs
- x509store.cs
- UserUseLicenseDictionaryLoader.cs
- ProfileSettings.cs
- PrimitiveSchema.cs
- XmlNode.cs
- ModelPerspective.cs
- XmlObjectSerializerReadContextComplexJson.cs
- UnorderedHashRepartitionStream.cs
- FullTrustAssembliesSection.cs
- AutoFocusStyle.xaml.cs
- WebScriptEnablingElement.cs
- ExpressionNode.cs
- MenuCommand.cs
- ComplexTypeEmitter.cs
- mediapermission.cs
- JsonServiceDocumentSerializer.cs
- InternalRelationshipCollection.cs
- XslVisitor.cs
- Switch.cs
- List.cs
- TdsEnums.cs
- WindowClosedEventArgs.cs
- PrintingPermission.cs
- DependsOnAttribute.cs
- XmlName.cs
- Signature.cs
- DataKeyCollection.cs
- SelectionList.cs
- ActivationServices.cs
- CorePropertiesFilter.cs
- SafeArrayRankMismatchException.cs
- ToolStripPanelRow.cs
- ProcessHostFactoryHelper.cs
- DataGridHeaderBorder.cs
- HistoryEventArgs.cs
- HandlerFactoryWrapper.cs
- XmlComment.cs
- SqlException.cs
- ShadowGlyph.cs
- ColorConvertedBitmap.cs
- VisualTreeHelper.cs
- Command.cs
- RadioButtonAutomationPeer.cs
- ChannelHandler.cs
- DockPatternIdentifiers.cs
- SynchronizationLockException.cs
- BlockCollection.cs
- TaiwanLunisolarCalendar.cs
- StructuredCompositeActivityDesigner.cs
- InputReport.cs
- Logging.cs
- ReturnEventArgs.cs
- XmlQuerySequence.cs
- HighlightVisual.cs
- QueryPageSettingsEventArgs.cs
- MetabaseSettingsIis7.cs
- MD5.cs
- ThicknessAnimationUsingKeyFrames.cs
- UIElementParaClient.cs
- DbTransaction.cs
- BinaryMethodMessage.cs
- typedescriptorpermissionattribute.cs
- TerminateDesigner.cs
- PolyLineSegment.cs
- DataRowExtensions.cs
- DynamicUpdateCommand.cs
- LightweightEntityWrapper.cs
- HelpOperationInvoker.cs
- Frame.cs
- PlaceHolder.cs
- BaseTemplateParser.cs
- BitStack.cs
- ApplicationActivator.cs
- PassportPrincipal.cs
- HealthMonitoringSectionHelper.cs
- NullReferenceException.cs
- HttpTransportManager.cs
- BamlBinaryWriter.cs
- TreePrinter.cs
- TransformerTypeCollection.cs
- IndexedWhereQueryOperator.cs
- SecurityManager.cs
- ErrorWrapper.cs
- SplayTreeNode.cs
- CollectionViewGroup.cs
- ReferencedCollectionType.cs
- WebMethodAttribute.cs
- SchemaElementDecl.cs
- ComponentConverter.cs
- DesignerTextViewAdapter.cs
- SQLInt64Storage.cs
- NotSupportedException.cs