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
- LabelLiteral.cs
- WindowInteractionStateTracker.cs
- DownloadProgressEventArgs.cs
- EndOfStreamException.cs
- MarkupCompilePass2.cs
- ActivityTypeCodeDomSerializer.cs
- CultureInfoConverter.cs
- RadioButtonPopupAdapter.cs
- RNGCryptoServiceProvider.cs
- WebPartConnectionsCloseVerb.cs
- ContainerUtilities.cs
- XmlChildNodes.cs
- StylusDownEventArgs.cs
- SiteMapNode.cs
- Stack.cs
- ForeignKeyFactory.cs
- ProfileManager.cs
- WmlPageAdapter.cs
- SoapHttpTransportImporter.cs
- SolidColorBrush.cs
- documentsequencetextcontainer.cs
- ResourceDictionary.cs
- HitTestDrawingContextWalker.cs
- TextServicesProperty.cs
- ResolveNameEventArgs.cs
- SamlAssertion.cs
- OptimalTextSource.cs
- UInt64Storage.cs
- SqlWebEventProvider.cs
- NativeMethods.cs
- BaseTemplateBuildProvider.cs
- Token.cs
- BStrWrapper.cs
- DbReferenceCollection.cs
- SoapCommonClasses.cs
- tibetanshape.cs
- DoubleStorage.cs
- SerializationInfoEnumerator.cs
- CopyNodeSetAction.cs
- Rotation3DAnimation.cs
- DetailsViewUpdateEventArgs.cs
- DeflateEmulationStream.cs
- MetadataImporter.cs
- MessageEncoder.cs
- ListenerChannelContext.cs
- SafeFileMappingHandle.cs
- InlineCollection.cs
- ParameterToken.cs
- XPathSelfQuery.cs
- AnyReturnReader.cs
- StorageTypeMapping.cs
- XmlSchemaSubstitutionGroup.cs
- UrlEncodedParameterWriter.cs
- QueryCursorEventArgs.cs
- IIS7WorkerRequest.cs
- SqlCommandBuilder.cs
- NativeMethodsOther.cs
- HttpListenerElement.cs
- HandlerWithFactory.cs
- AvtEvent.cs
- HtmlInputRadioButton.cs
- WizardForm.cs
- ServiceHostingEnvironment.cs
- SizeAnimationClockResource.cs
- DrawingAttributeSerializer.cs
- SplitContainer.cs
- TextEditorDragDrop.cs
- XmlILConstructAnalyzer.cs
- ChildrenQuery.cs
- SubMenuStyleCollection.cs
- TextTreeInsertElementUndoUnit.cs
- TextComposition.cs
- DataGridTable.cs
- SqlRetyper.cs
- DbReferenceCollection.cs
- TrustLevel.cs
- TransformConverter.cs
- AttachedPropertyBrowsableForTypeAttribute.cs
- IconHelper.cs
- DependencyPropertyKey.cs
- FixedPosition.cs
- SingleSelectRootGridEntry.cs
- CompilationRelaxations.cs
- PersonalizablePropertyEntry.cs
- baseaxisquery.cs
- TableLayoutSettings.cs
- ApplicationBuildProvider.cs
- CanExpandCollapseAllConverter.cs
- ProcessingInstructionAction.cs
- HttpCookiesSection.cs
- UnsafeNativeMethods.cs
- ScrollableControl.cs
- DataViewManager.cs
- RtfToken.cs
- filewebresponse.cs
- Light.cs
- JapaneseLunisolarCalendar.cs
- ObjectIDGenerator.cs
- SafeNativeMethods.cs
- CompModSwitches.cs