Code:
/ 4.0 / 4.0 / 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. //------------------------------------------------------------------------------ // // 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
- FontDialog.cs
- VarInfo.cs
- StylusPointProperties.cs
- SoapObjectInfo.cs
- EventMap.cs
- UnicodeEncoding.cs
- VisualBasicExpressionConverter.cs
- NativeRecognizer.cs
- Int16AnimationBase.cs
- EntityAdapter.cs
- AssemblyInfo.cs
- KeySplineConverter.cs
- ASCIIEncoding.cs
- FontUnit.cs
- TextMarkerSource.cs
- File.cs
- CapacityStreamGeometryContext.cs
- UIElementCollection.cs
- GenericTypeParameterConverter.cs
- ImageFormat.cs
- PngBitmapDecoder.cs
- MaskedTextBoxTextEditorDropDown.cs
- TrustLevelCollection.cs
- EntityModelBuildProvider.cs
- TokenFactoryBase.cs
- XmlAggregates.cs
- MemoryFailPoint.cs
- ControlBuilder.cs
- Opcode.cs
- CompositeFontInfo.cs
- SettingsPropertyValue.cs
- WorkflowApplicationCompletedEventArgs.cs
- GlyphsSerializer.cs
- Int16.cs
- SqlDataSourceDesigner.cs
- TypefaceMetricsCache.cs
- WebPartConnectionCollection.cs
- MetaType.cs
- TextRange.cs
- CodeSnippetTypeMember.cs
- DependentList.cs
- NetworkInterface.cs
- ReaderWriterLock.cs
- DrawTreeNodeEventArgs.cs
- IBuiltInEvidence.cs
- PanningMessageFilter.cs
- COM2IManagedPerPropertyBrowsingHandler.cs
- MethodCallTranslator.cs
- webeventbuffer.cs
- OneToOneMappingSerializer.cs
- ManagedWndProcTracker.cs
- AuthenticationModeHelper.cs
- WebDescriptionAttribute.cs
- ManipulationStartingEventArgs.cs
- SqlDataSourceSelectingEventArgs.cs
- ConfigurationLocation.cs
- ReflectEventDescriptor.cs
- DBSchemaTable.cs
- XXXOnTypeBuilderInstantiation.cs
- DocumentGrid.cs
- CompiledXpathExpr.cs
- CultureTableRecord.cs
- FontEditor.cs
- PersonalizationStateInfo.cs
- DataGridViewMethods.cs
- ForeignKeyConstraint.cs
- PixelShader.cs
- StoreConnection.cs
- DictionaryChange.cs
- DTCTransactionManager.cs
- CompareInfo.cs
- GraphicsContext.cs
- HtmlTableRowCollection.cs
- FileAuthorizationModule.cs
- FtpRequestCacheValidator.cs
- GridViewUpdateEventArgs.cs
- RSAPKCS1SignatureDeformatter.cs
- WorkflowRequestContext.cs
- WebPartDisplayModeCollection.cs
- ColumnBinding.cs
- BrowserDefinitionCollection.cs
- SolidBrush.cs
- FixedDocumentSequencePaginator.cs
- TreeView.cs
- FactoryGenerator.cs
- DoubleConverter.cs
- Choices.cs
- DataGrid.cs
- TextContainer.cs
- ExceptQueryOperator.cs
- ArrowControl.xaml.cs
- CollectionViewSource.cs
- CustomCredentialPolicy.cs
- FormsAuthenticationTicket.cs
- DBSqlParserColumnCollection.cs
- BinaryNode.cs
- SequentialUshortCollection.cs
- RegexFCD.cs
- WebHttpSecurityElement.cs
- ApplicationInfo.cs