Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataEntity / System / Data / Metadata / Edm / util.cs / 1305376 / util.cs
//----------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// @owner [....]
// @backupOwner [....]
//---------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Data.Common;
using System.Diagnostics;
using System.Text;
namespace System.Data.Metadata.Edm
{
///
/// Class holding utility functions for metadata
///
internal static class Util
{
#region Methods
///
/// Throws an appropriate exception if the given item is a readonly, used when an attempt is made to change
/// a property
///
/// The item whose readonly is being tested
internal static void ThrowIfReadOnly(MetadataItem item)
{
Debug.Assert(item != null, "The given item is null");
if (item.IsReadOnly)
{
throw EntityUtil.OperationOnReadOnlyItem();
}
}
///
/// Check to make sure the given item do have identity
///
/// The item to check for valid identity
/// The name of the argument
[Conditional("DEBUG")]
internal static void AssertItemHasIdentity(MetadataItem item, string argumentName)
{
Debug.Assert(!string.IsNullOrEmpty(item.Identity), "Item has empty identity.");
EntityUtil.GenericCheckArgumentNull(item, argumentName);
}
#endregion
}
}
// 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
- CacheRequest.cs
- JapaneseCalendar.cs
- UIElement3D.cs
- AnimationStorage.cs
- Guid.cs
- Geometry3D.cs
- WebPartsPersonalizationAuthorization.cs
- HijriCalendar.cs
- EntryWrittenEventArgs.cs
- HttpRuntimeSection.cs
- TextEffectCollection.cs
- EventEntry.cs
- LoginStatusDesigner.cs
- HttpCapabilitiesSectionHandler.cs
- BaseTemplatedMobileComponentEditor.cs
- SQLInt32.cs
- ExtensionQuery.cs
- AuthenticationModuleElementCollection.cs
- ImageBrush.cs
- ExecutionContext.cs
- RequestResizeEvent.cs
- VarInfo.cs
- Msec.cs
- ChangeConflicts.cs
- ValueTypeIndexerReference.cs
- SubMenuStyleCollection.cs
- PageCache.cs
- TemplateBamlRecordReader.cs
- SafeHandles.cs
- DataGridViewSortCompareEventArgs.cs
- HtmlFormParameterReader.cs
- BamlTreeUpdater.cs
- EmptyImpersonationContext.cs
- PartialCachingAttribute.cs
- Hex.cs
- AsyncWaitHandle.cs
- DecimalSumAggregationOperator.cs
- SafeRightsManagementEnvironmentHandle.cs
- X509ScopedServiceCertificateElement.cs
- BulletDecorator.cs
- GenericUriParser.cs
- FontStyleConverter.cs
- PageContentCollection.cs
- HtmlInputPassword.cs
- DurableInstance.cs
- MessagingDescriptionAttribute.cs
- DataContractSet.cs
- CustomError.cs
- MessageQueuePermissionEntryCollection.cs
- HostedTransportConfigurationBase.cs
- MaskedTextProvider.cs
- precedingquery.cs
- InputScopeNameConverter.cs
- ConfigurationProperty.cs
- SafeRightsManagementHandle.cs
- EntityFunctions.cs
- SHA512Managed.cs
- SymbolPair.cs
- ScriptManagerProxy.cs
- AsyncResult.cs
- TypedReference.cs
- TextBox.cs
- DmlSqlGenerator.cs
- ReachPrintTicketSerializer.cs
- SuppressIldasmAttribute.cs
- PageParserFilter.cs
- AttributeUsageAttribute.cs
- FixedSOMPageConstructor.cs
- Button.cs
- Region.cs
- NegatedCellConstant.cs
- CancellationState.cs
- RSAPKCS1KeyExchangeFormatter.cs
- NativeMethods.cs
- BooleanExpr.cs
- DbSourceCommand.cs
- GeometryConverter.cs
- FunctionParameter.cs
- QueryResults.cs
- TextParagraphProperties.cs
- SystemWebSectionGroup.cs
- MenuRenderer.cs
- DelimitedListTraceListener.cs
- CodeCatchClause.cs
- IdentityNotMappedException.cs
- EmptyQuery.cs
- QilParameter.cs
- BamlLocalizableResource.cs
- ClientConfigurationHost.cs
- PartDesigner.cs
- UICuesEvent.cs
- StyleHelper.cs
- WsdlImporterElementCollection.cs
- SynthesizerStateChangedEventArgs.cs
- BindingOperations.cs
- ObjectStateEntryOriginalDbUpdatableDataRecord.cs
- Highlights.cs
- _FtpDataStream.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- MenuRendererClassic.cs