Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / ndp / fx / src / DataEntity / System / Data / Map / ViewGeneration / Utils / ExceptionHelpers.cs / 2 / ExceptionHelpers.cs
//----------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// @owner [....]
// @backupOwner [....]
//---------------------------------------------------------------------
using System.Text;
using System.Data.Mapping.ViewGeneration.Structures;
using System.Diagnostics;
using System.Data.Common.Utils;
namespace System.Data.Mapping.ViewGeneration.Utils {
// Miscellaneous helper routines for generating mapping exceptions
internal static class ExceptionHelpers {
// effects: if condition is false, throws an InvalidOperation
// exception with resourceMmessage that is looked up in the resources
internal static void CheckAndThrowRes(bool condition, Func formatMessage) {
if (condition == false) {
StringBuilder builder = new StringBuilder();
builder.Append(System.Data.Entity.Strings.ViewGen_Internal_Error);
builder.AppendLine(formatMessage());
throw EntityUtil.InvalidOperation(builder.ToString());
}
}
// effects: if condition is false, throws an InvalidOperation
// exception with a message where the resourceFormatString is looked up in
// the resources
internal static void CheckAndThrowResArgs(bool condition, Func
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- StreamWithDictionary.cs
- PingOptions.cs
- Utilities.cs
- Int16Storage.cs
- Cursors.cs
- RawStylusSystemGestureInputReport.cs
- TTSEngineTypes.cs
- DSASignatureDeformatter.cs
- FixedSOMGroup.cs
- XsdBuildProvider.cs
- ParameterModifier.cs
- StrongNameUtility.cs
- SymbolTable.cs
- XmlChildEnumerator.cs
- MergablePropertyAttribute.cs
- AxHost.cs
- MailHeaderInfo.cs
- CatalogZone.cs
- TypefaceCollection.cs
- SQLUtility.cs
- FormatConvertedBitmap.cs
- CalculatedColumn.cs
- IPEndPoint.cs
- RuntimeWrappedException.cs
- OdbcPermission.cs
- Rect3DValueSerializer.cs
- HtmlInputSubmit.cs
- ContentTextAutomationPeer.cs
- ZipQueryOperator.cs
- StateMachineWorkflow.cs
- HttpServerProtocol.cs
- ClientSettingsProvider.cs
- FixedPosition.cs
- RemotingConfigParser.cs
- CqlGenerator.cs
- DrawingAttributeSerializer.cs
- SettingsPropertyNotFoundException.cs
- KnownTypesProvider.cs
- ListBindingHelper.cs
- OutputCacheSection.cs
- GAC.cs
- ResourceDescriptionAttribute.cs
- TreeNode.cs
- CacheOutputQuery.cs
- TypeBuilderInstantiation.cs
- RSAPKCS1KeyExchangeFormatter.cs
- QuaternionIndependentAnimationStorage.cs
- ProgressBar.cs
- HexParser.cs
- OleDbInfoMessageEvent.cs
- ConfigXmlComment.cs
- RoleGroupCollection.cs
- UIPropertyMetadata.cs
- TextFormatterContext.cs
- FieldMetadata.cs
- WebBrowserProgressChangedEventHandler.cs
- DataGridViewButtonColumn.cs
- SqlAliaser.cs
- TableParagraph.cs
- FilteredAttributeCollection.cs
- DropDownList.cs
- SqlInfoMessageEvent.cs
- StreamMarshaler.cs
- SSmlParser.cs
- CacheMemory.cs
- ReadOnlyHierarchicalDataSourceView.cs
- FontTypeConverter.cs
- MonthCalendarDesigner.cs
- OrderByQueryOptionExpression.cs
- XmlNamespaceMapping.cs
- CaseStatementSlot.cs
- HtmlWindow.cs
- MissingManifestResourceException.cs
- EntityDataSourceViewSchema.cs
- LocalizationParserHooks.cs
- CurrentChangingEventManager.cs
- CachedRequestParams.cs
- ExpressionEditorAttribute.cs
- Crc32.cs
- MessageHeader.cs
- Compiler.cs
- IItemProperties.cs
- Utils.cs
- CommandValueSerializer.cs
- MDIClient.cs
- HttpStreams.cs
- SegmentInfo.cs
- SubclassTypeValidator.cs
- Int32RectValueSerializer.cs
- HttpPostProtocolReflector.cs
- TextBox.cs
- CodeGen.cs
- DbProviderFactoriesConfigurationHandler.cs
- Opcode.cs
- AvTraceFormat.cs
- UriExt.cs
- BaseServiceProvider.cs
- EntityPropertyMappingAttribute.cs
- StylusLogic.cs
- InlineCollection.cs