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
- EventLogWatcher.cs
- Stroke.cs
- StateDesigner.LayoutSelectionGlyph.cs
- EmptyEnumerable.cs
- ConfigurationSectionGroupCollection.cs
- MinMaxParagraphWidth.cs
- MimeXmlImporter.cs
- BitmapEffect.cs
- Stroke2.cs
- DelegatedStream.cs
- QilGeneratorEnv.cs
- BufferedWebEventProvider.cs
- TagPrefixAttribute.cs
- EntityTypeBase.cs
- Int64AnimationUsingKeyFrames.cs
- DiagnosticsElement.cs
- ETagAttribute.cs
- Container.cs
- EntityDataSourceChangedEventArgs.cs
- TrackingDataItemValue.cs
- WebPartRestoreVerb.cs
- DelayedRegex.cs
- SmiContextFactory.cs
- CounterSample.cs
- SessionChannels.cs
- SqlAliasesReferenced.cs
- DesignerProperties.cs
- SByteStorage.cs
- InfocardChannelParameter.cs
- HtmlTableCellCollection.cs
- SHA1Cng.cs
- FontNameEditor.cs
- TypeConverterHelper.cs
- LineBreakRecord.cs
- Wildcard.cs
- URLMembershipCondition.cs
- PolicyDesigner.cs
- DocumentReference.cs
- MailSettingsSection.cs
- RNGCryptoServiceProvider.cs
- TextViewSelectionProcessor.cs
- UniqueID.cs
- MetadataAssemblyHelper.cs
- TableStyle.cs
- XmlReflectionImporter.cs
- PngBitmapDecoder.cs
- CommunicationObjectAbortedException.cs
- Timeline.cs
- IProvider.cs
- JumpPath.cs
- DefaultAsyncDataDispatcher.cs
- XamlClipboardData.cs
- _SSPIWrapper.cs
- TreeView.cs
- DataControlField.cs
- AssertHelper.cs
- Privilege.cs
- AutomationEventArgs.cs
- PrintingPermission.cs
- Membership.cs
- TemplateControl.cs
- PropertyKey.cs
- StrongNameUtility.cs
- RadioButtonList.cs
- ConstantSlot.cs
- SQLMoneyStorage.cs
- CompilerGeneratedAttribute.cs
- ValidationPropertyAttribute.cs
- InterleavedZipPartStream.cs
- EventLogHandle.cs
- UserPreferenceChangingEventArgs.cs
- BatchStream.cs
- _Events.cs
- WebDisplayNameAttribute.cs
- TableRowCollection.cs
- NotificationContext.cs
- DecoderNLS.cs
- RowUpdatedEventArgs.cs
- FixedSOMTableCell.cs
- BufferModesCollection.cs
- WebPartActionVerb.cs
- PageAdapter.cs
- EventWaitHandle.cs
- AttachedPropertyBrowsableForTypeAttribute.cs
- TableParagraph.cs
- DesignerAutoFormatStyle.cs
- CustomWebEventKey.cs
- DtrList.cs
- WmiInstallComponent.cs
- BitmapEffectvisualstate.cs
- ItemCollection.cs
- ValidationUtility.cs
- ControlTemplate.cs
- FileClassifier.cs
- MarginsConverter.cs
- ItemCollectionEditor.cs
- DataConnectionHelper.cs
- StrokeDescriptor.cs
- EventLog.cs
- TextLineResult.cs