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
- XomlCompilerError.cs
- TreeViewImageKeyConverter.cs
- SafeNativeMethods.cs
- MailSettingsSection.cs
- ExeConfigurationFileMap.cs
- TextEndOfParagraph.cs
- QueryRewriter.cs
- TimeStampChecker.cs
- InstanceData.cs
- InputLanguageSource.cs
- DataColumnMapping.cs
- AnimatedTypeHelpers.cs
- ToolboxSnapDragDropEventArgs.cs
- IUnknownConstantAttribute.cs
- CompressionTransform.cs
- CodeNamespaceImportCollection.cs
- SoapReflectionImporter.cs
- PageCodeDomTreeGenerator.cs
- LinqTreeNodeEvaluator.cs
- RepeatInfo.cs
- LinqDataSourceValidationException.cs
- KeyTime.cs
- CancelEventArgs.cs
- DynamicScriptObject.cs
- IisTraceListener.cs
- GridViewSelectEventArgs.cs
- XsdDateTime.cs
- RuntimeHandles.cs
- TdsParserSessionPool.cs
- XmlRawWriterWrapper.cs
- DataGridViewColumnHeaderCell.cs
- AudioFormatConverter.cs
- DbDataAdapter.cs
- DriveNotFoundException.cs
- MemberMemberBinding.cs
- QueryCacheManager.cs
- TypedAsyncResult.cs
- ClickablePoint.cs
- FixedSOMLineRanges.cs
- ComponentResourceManager.cs
- TypeListConverter.cs
- HMACRIPEMD160.cs
- WebScriptServiceHostFactory.cs
- FlowDecisionDesigner.xaml.cs
- ComboBox.cs
- ParentQuery.cs
- UnsafeNativeMethodsTablet.cs
- DbConnectionPoolIdentity.cs
- ConfigurationStrings.cs
- PersonalizationAdministration.cs
- ContextMarshalException.cs
- DbConnectionInternal.cs
- hwndwrapper.cs
- ImpersonateTokenRef.cs
- EventLogPermissionAttribute.cs
- EntityProviderServices.cs
- wmiprovider.cs
- WasEndpointConfigContainer.cs
- OleDbEnumerator.cs
- DbConnectionPool.cs
- ValidationEventArgs.cs
- _DigestClient.cs
- AcceleratedTokenProviderState.cs
- Exceptions.cs
- WasAdminWrapper.cs
- Parameter.cs
- DragEventArgs.cs
- TextDecorations.cs
- Group.cs
- CodeEntryPointMethod.cs
- UserNameSecurityToken.cs
- AttachedPropertyMethodSelector.cs
- EdmTypeAttribute.cs
- RegistrationServices.cs
- ValueExpressions.cs
- ConfigurationSectionGroup.cs
- HtmlTableRow.cs
- wgx_sdk_version.cs
- TypeTypeConverter.cs
- HttpListenerContext.cs
- DataObjectPastingEventArgs.cs
- SourceChangedEventArgs.cs
- HttpConfigurationSystem.cs
- KeysConverter.cs
- IsolatedStorageException.cs
- XmlSchemaObject.cs
- InputBuffer.cs
- PropertyChangingEventArgs.cs
- MethodToken.cs
- WindowsScroll.cs
- ElementInit.cs
- ToolStripButton.cs
- FixedFindEngine.cs
- RegexCaptureCollection.cs
- BindingSource.cs
- DeobfuscatingStream.cs
- ActiveXHelper.cs
- Rectangle.cs
- httpapplicationstate.cs
- RelationshipConstraintValidator.cs