Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataWeb / Design / system / Data / Entity / Design / Common / EDesignUtil.cs / 1305376 / EDesignUtil.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // // @owner [....] // @backupOwner [....] //----------------------------------------------------------------------------- namespace System.Data.Services.Design.Common { using System; internal static class EDesignUtil { //////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// // // Helper Functions // static internal T CheckArgumentNull(T value, string parameterName) where T : class { if (null == value) { throw Error.ArgumentNull(parameterName); } return value; } static internal void CheckStringArgument(string value, string parameterName) { // Throw ArgumentNullException when string is null CheckArgumentNull(value, parameterName); // Throw ArgumentException when string is empty if (value.Length == 0) { throw InvalidStringArgument(parameterName); } } static internal LanguageOption CheckLanguageOptionArgument(LanguageOption value, string paramName) { if (value == LanguageOption.GenerateCSharpCode || value == LanguageOption.GenerateVBCode) { return value; } throw Error.ArgumentOutOfRange(paramName); } static internal DataServiceCodeVersion CheckDataServiceCodeVersionArgument(DataServiceCodeVersion value, string paramName) { if (value == DataServiceCodeVersion.V1 || value == DataServiceCodeVersion.V2) { return value; } throw Error.ArgumentOutOfRange(paramName); } static internal ArgumentException InvalidStringArgument(string parameterName) { ArgumentException e = new ArgumentException(Strings.InvalidStringArgument(parameterName)); return e; } static internal InvalidOperationException InvalidOperation(string error) { InvalidOperationException e = new InvalidOperationException(error); return e; } } } // 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
- StrongNameHelpers.cs
- AssemblyBuilder.cs
- StringConverter.cs
- ImageAutomationPeer.cs
- cache.cs
- _ListenerAsyncResult.cs
- SoapHeaderException.cs
- StylusPlugInCollection.cs
- MessageRpc.cs
- SequenceQuery.cs
- TableAutomationPeer.cs
- ArrayHelper.cs
- RuntimeComponentFilter.cs
- SamlAuthenticationClaimResource.cs
- DynamicRouteExpression.cs
- DiscoveryDocumentSerializer.cs
- MemoryRecordBuffer.cs
- UIHelper.cs
- CreatingCookieEventArgs.cs
- BidPrivateBase.cs
- ComponentCache.cs
- ExtensionQuery.cs
- AdornedElementPlaceholder.cs
- DocumentGridContextMenu.cs
- SqlDataSourceQueryEditorForm.cs
- GeneralTransform3DCollection.cs
- XmlnsDictionary.cs
- BuildProviderUtils.cs
- Italic.cs
- CodePrimitiveExpression.cs
- HistoryEventArgs.cs
- LicenseException.cs
- WebPartConnectionsCloseVerb.cs
- SmtpReplyReaderFactory.cs
- SqlGenericUtil.cs
- XmlEncoding.cs
- Array.cs
- RotateTransform.cs
- HtmlWindowCollection.cs
- StrongNameUtility.cs
- ZipIOExtraField.cs
- DataQuery.cs
- WebPartConnectionCollection.cs
- MonthChangedEventArgs.cs
- HandleDictionary.cs
- SingleSelectRootGridEntry.cs
- PropertyNames.cs
- PartialClassGenerationTask.cs
- XPathArrayIterator.cs
- DbProviderFactory.cs
- DesignerDataConnection.cs
- IisTraceWebEventProvider.cs
- BindableTemplateBuilder.cs
- PrintSchema.cs
- SecUtil.cs
- QilGenerator.cs
- MulticastNotSupportedException.cs
- TextFormattingConverter.cs
- ToolboxItem.cs
- HatchBrush.cs
- WeakReferenceEnumerator.cs
- TreeNodeStyle.cs
- XmlNullResolver.cs
- SubMenuStyleCollection.cs
- Missing.cs
- DbConnectionPoolGroup.cs
- Fonts.cs
- CodeBlockBuilder.cs
- XmlQueryType.cs
- MappingModelBuildProvider.cs
- AutomationTextAttribute.cs
- HtmlInputControl.cs
- CellParagraph.cs
- NamespaceInfo.cs
- SessionEndingCancelEventArgs.cs
- SiteOfOriginPart.cs
- ColorTranslator.cs
- HighContrastHelper.cs
- UnmanagedBitmapWrapper.cs
- HeaderLabel.cs
- SafeFileMappingHandle.cs
- DbDataReader.cs
- CodeDirectoryCompiler.cs
- ClientSettingsProvider.cs
- ObjectDataSourceMethodEventArgs.cs
- TextParentUndoUnit.cs
- ObjectStorage.cs
- CultureInfoConverter.cs
- MenuItemCollection.cs
- BitmapEffectOutputConnector.cs
- DataMemberListEditor.cs
- ResourcesGenerator.cs
- SiteMapNodeItem.cs
- DataGridTableCollection.cs
- IndentedWriter.cs
- HtmlFormWrapper.cs
- DesignTimeDataBinding.cs
- ActivityTypeDesigner.xaml.cs
- ApplicationDirectory.cs
- AuthenticationSection.cs