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
- RichTextBox.cs
- NameValueSectionHandler.cs
- ShapingWorkspace.cs
- InputLanguageCollection.cs
- DrawingGroup.cs
- ACE.cs
- __Error.cs
- MailMessageEventArgs.cs
- ObjectListItem.cs
- DataPagerField.cs
- ClassImporter.cs
- MarkedHighlightComponent.cs
- WebPageTraceListener.cs
- AttributeCollection.cs
- ToolStripDropDownClosingEventArgs.cs
- XmlDeclaration.cs
- UnsafeNativeMethodsPenimc.cs
- RegexTree.cs
- SkewTransform.cs
- WebPartZoneAutoFormat.cs
- GroupByExpressionRewriter.cs
- DataSourceSelectArguments.cs
- SchemaTableColumn.cs
- CodeIndexerExpression.cs
- UIElement3DAutomationPeer.cs
- HostingPreferredMapPath.cs
- StateMachineWorkflowDesigner.cs
- CultureMapper.cs
- RtfControls.cs
- ToolBar.cs
- ReadOnlyPropertyMetadata.cs
- XComponentModel.cs
- MemoryMappedViewStream.cs
- SQLBoolean.cs
- CodeArrayCreateExpression.cs
- ConvertEvent.cs
- UserControlParser.cs
- XmlHierarchicalDataSourceView.cs
- ViewManagerAttribute.cs
- PeerNearMe.cs
- TokenBasedSetEnumerator.cs
- Emitter.cs
- ResourceAttributes.cs
- DataGridViewImageColumn.cs
- NotImplementedException.cs
- DesignerTransaction.cs
- WindowsPen.cs
- DataGridViewImageCell.cs
- StylusPointProperties.cs
- ProtocolElementCollection.cs
- Positioning.cs
- SqlServer2KCompatibilityAnnotation.cs
- TableLayoutSettingsTypeConverter.cs
- MemoryMappedView.cs
- AttributeData.cs
- BooleanFunctions.cs
- EventData.cs
- EntityModelSchemaGenerator.cs
- ClientSideQueueItem.cs
- DeferredRunTextReference.cs
- GetWinFXPath.cs
- BuildProviderAppliesToAttribute.cs
- TableAdapterManagerHelper.cs
- SessionIDManager.cs
- RawMouseInputReport.cs
- ResolveNameEventArgs.cs
- EpmContentDeSerializer.cs
- BooleanConverter.cs
- UrlPath.cs
- BitmapMetadataEnumerator.cs
- DrawingServices.cs
- MetadataPropertyAttribute.cs
- EventMetadata.cs
- AnimatedTypeHelpers.cs
- ChineseLunisolarCalendar.cs
- PropertyGridEditorPart.cs
- EntityDataSourceWrapper.cs
- RefreshPropertiesAttribute.cs
- TdsParserHelperClasses.cs
- DBCSCodePageEncoding.cs
- XamlVector3DCollectionSerializer.cs
- StructuredProperty.cs
- SHA512.cs
- UrlPath.cs
- ProgressBarBrushConverter.cs
- ComponentManagerBroker.cs
- HtmlImage.cs
- StateManagedCollection.cs
- PersonalizablePropertyEntry.cs
- SystemUnicastIPAddressInformation.cs
- VisualBasicReference.cs
- RijndaelManaged.cs
- IpcServerChannel.cs
- SecurityStateEncoder.cs
- LayoutManager.cs
- SupportsEventValidationAttribute.cs
- XmlSchemaIdentityConstraint.cs
- DesignTimeVisibleAttribute.cs
- odbcmetadatacollectionnames.cs
- MouseCaptureWithinProperty.cs