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
- CacheForPrimitiveTypes.cs
- UInt64Converter.cs
- FolderBrowserDialog.cs
- LambdaCompiler.ControlFlow.cs
- SplitterPanel.cs
- dataprotectionpermission.cs
- DateTimeFormat.cs
- StyleModeStack.cs
- TraceSwitch.cs
- ToolStripScrollButton.cs
- PersonalizableTypeEntry.cs
- SerialStream.cs
- FrameDimension.cs
- ConsumerConnectionPoint.cs
- DataGridViewCellCancelEventArgs.cs
- DataObject.cs
- COM2Properties.cs
- AddressHeader.cs
- Symbol.cs
- FormsAuthenticationCredentials.cs
- xmlsaver.cs
- DesignerSerializerAttribute.cs
- FileUtil.cs
- XmlQualifiedName.cs
- MappingModelBuildProvider.cs
- GcSettings.cs
- PointValueSerializer.cs
- AdobeCFFWrapper.cs
- UpdateTracker.cs
- SafeNativeMethods.cs
- RelationshipDetailsRow.cs
- RegistryExceptionHelper.cs
- MailMessage.cs
- TextTreePropertyUndoUnit.cs
- _emptywebproxy.cs
- CompressStream.cs
- SessionEndingEventArgs.cs
- TouchPoint.cs
- QueryCacheManager.cs
- AutoResetEvent.cs
- TextServicesHost.cs
- Attributes.cs
- ForeignConstraint.cs
- ILGenerator.cs
- CommandID.cs
- SignatureDescription.cs
- ImageCodecInfoPrivate.cs
- DynamicScriptObject.cs
- PrivateUnsafeNativeCompoundFileMethods.cs
- StreamUpdate.cs
- XmlAnyElementAttributes.cs
- FlowDocumentView.cs
- SectionVisual.cs
- ScriptRef.cs
- FormViewUpdatedEventArgs.cs
- RectangleConverter.cs
- TreeNodeSelectionProcessor.cs
- DataGridItem.cs
- XmlSignatureProperties.cs
- Thumb.cs
- DrawingBrush.cs
- TextEditorThreadLocalStore.cs
- OrderedDictionaryStateHelper.cs
- EventHandlerList.cs
- BamlWriter.cs
- MaskInputRejectedEventArgs.cs
- XmlEncodedRawTextWriter.cs
- X509PeerCertificateElement.cs
- CommentEmitter.cs
- DesignTimeVisibleAttribute.cs
- ReceiveCompletedEventArgs.cs
- RijndaelManaged.cs
- WinEventWrap.cs
- SeparatorAutomationPeer.cs
- SimplePropertyEntry.cs
- StandardMenuStripVerb.cs
- WpfKnownType.cs
- SetterBase.cs
- TrackingProvider.cs
- UInt32Converter.cs
- Vector3D.cs
- GacUtil.cs
- ComNativeDescriptor.cs
- SizeConverter.cs
- CreateUserErrorEventArgs.cs
- ContextMenuStrip.cs
- RoutedEventHandlerInfo.cs
- DetailsViewCommandEventArgs.cs
- SystemDropShadowChrome.cs
- SRef.cs
- OpenTypeMethods.cs
- IndentTextWriter.cs
- StyleSelector.cs
- StringUtil.cs
- ZipIORawDataFileBlock.cs
- DefaultExpressionVisitor.cs
- PrintController.cs
- RangeValuePattern.cs
- NetworkInformationException.cs
- DependencyPropertyChangedEventArgs.cs