Code:
/ 4.0 / 4.0 / 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. //---------------------------------------------------------------------- //// 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
- GeometryCombineModeValidation.cs
- EventLogStatus.cs
- EntityContainer.cs
- Track.cs
- DataGridViewCellEventArgs.cs
- Rijndael.cs
- FileFormatException.cs
- _HelperAsyncResults.cs
- HttpProfileBase.cs
- ColorConvertedBitmap.cs
- FastEncoderWindow.cs
- VScrollProperties.cs
- SqlUserDefinedAggregateAttribute.cs
- HttpProfileBase.cs
- InputScopeManager.cs
- TextBox.cs
- SocketException.cs
- PathFigureCollectionValueSerializer.cs
- ImageKeyConverter.cs
- ApplyHostConfigurationBehavior.cs
- TypeConverterHelper.cs
- UTF8Encoding.cs
- StateDesignerConnector.cs
- DataException.cs
- RequestStatusBarUpdateEventArgs.cs
- SignatureGenerator.cs
- SafeFindHandle.cs
- ColorConvertedBitmap.cs
- TextRange.cs
- OleAutBinder.cs
- ReferenceEqualityComparer.cs
- RunWorkerCompletedEventArgs.cs
- X509CertificateCollection.cs
- FastPropertyAccessor.cs
- SiteOfOriginPart.cs
- MsmqException.cs
- HotSpotCollection.cs
- ScaleTransform.cs
- SiteMapSection.cs
- DataGridViewAccessibleObject.cs
- FieldCollectionEditor.cs
- WebBrowserContainer.cs
- SimpleMailWebEventProvider.cs
- infer.cs
- ControlBindingsCollection.cs
- XmlDataLoader.cs
- RelationalExpressions.cs
- PerfCounters.cs
- ButtonField.cs
- PiiTraceSource.cs
- HeaderedContentControl.cs
- DispatcherExceptionFilterEventArgs.cs
- ListItemCollection.cs
- Set.cs
- SqlNotificationEventArgs.cs
- ExpressionLink.cs
- TransactionManagerProxy.cs
- RijndaelManaged.cs
- ContainerFilterService.cs
- ListView.cs
- UnsafeNativeMethodsCLR.cs
- MembershipSection.cs
- mactripleDES.cs
- DataGridViewRowPrePaintEventArgs.cs
- EntityDataSourceReferenceGroup.cs
- ByteRangeDownloader.cs
- FontSourceCollection.cs
- HttpPostProtocolImporter.cs
- ManipulationVelocities.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- WindowsTitleBar.cs
- RemotingHelper.cs
- WindowsEditBoxRange.cs
- figurelengthconverter.cs
- SignatureHelper.cs
- UnknownBitmapDecoder.cs
- VoiceInfo.cs
- WebPartConnectionsCloseVerb.cs
- SqlFunctions.cs
- ParallelQuery.cs
- ToolStripPanelRenderEventArgs.cs
- WinFormsSecurity.cs
- BidPrivateBase.cs
- ToolStripTextBox.cs
- XamlFigureLengthSerializer.cs
- Condition.cs
- X509SecurityToken.cs
- WebPartTransformer.cs
- WebBrowserSiteBase.cs
- ErrorStyle.cs
- OutputCacheSettings.cs
- ThemeDictionaryExtension.cs
- EntityDataSourceWrapperCollection.cs
- SourceElementsCollection.cs
- HostingEnvironmentWrapper.cs
- ComponentResourceKey.cs
- ValidationResult.cs
- UnmanagedMemoryStreamWrapper.cs
- CallTemplateAction.cs
- OdbcCommandBuilder.cs