Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / ndp / fx / src / DataWeb / Design / system / Data / Entity / Design / Common / EDesignUtil.cs / 1 / EDesignUtil.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // // @owner [....] // @backupOwner [....] //----------------------------------------------------------------------------- namespace System.Data.Services.Design.Common { using Microsoft.Win32; using System; using System.Collections; using System.Collections.Generic; using System.ComponentModel; using System.Configuration; using System.Data; using System.Data.Metadata.Edm; using System.Data.Objects; using System.Data.Objects.DataClasses; using System.Data.SqlTypes; using System.Diagnostics; using System.Globalization; using System.IO; using System.Reflection; using System.Runtime.ConstrainedExecution; using System.Runtime.InteropServices; using System.Runtime.Serialization; using System.Text; using System.Threading; using System.Xml; using Microsoft.SqlServer.Server; internal static class EDesignUtil { //////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// // // Helper Functions // static internal T CheckArgumentNull(T value, string parameterName) where T : class { if (null == value) { throw 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 ArgumentOutOfRange(paramName); } static internal ArgumentException InvalidStringArgument(string parameterName) { ArgumentException e = new ArgumentException(Strings.InvalidStringArgument(parameterName)); return e; } static internal ArgumentNullException ArgumentNull(string parameter) { ArgumentNullException e = new ArgumentNullException(parameter); return e; } static internal InvalidOperationException InvalidOperation(string error) { InvalidOperationException e = new InvalidOperationException(error); return e; } static internal ArgumentOutOfRangeException ArgumentOutOfRange(string paramName) { return new ArgumentOutOfRangeException(paramName); } } } // 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 Microsoft.Win32; using System; using System.Collections; using System.Collections.Generic; using System.ComponentModel; using System.Configuration; using System.Data; using System.Data.Metadata.Edm; using System.Data.Objects; using System.Data.Objects.DataClasses; using System.Data.SqlTypes; using System.Diagnostics; using System.Globalization; using System.IO; using System.Reflection; using System.Runtime.ConstrainedExecution; using System.Runtime.InteropServices; using System.Runtime.Serialization; using System.Text; using System.Threading; using System.Xml; using Microsoft.SqlServer.Server; internal static class EDesignUtil { //////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// // // Helper Functions // static internal T CheckArgumentNull(T value, string parameterName) where T : class { if (null == value) { throw 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 ArgumentOutOfRange(paramName); } static internal ArgumentException InvalidStringArgument(string parameterName) { ArgumentException e = new ArgumentException(Strings.InvalidStringArgument(parameterName)); return e; } static internal ArgumentNullException ArgumentNull(string parameter) { ArgumentNullException e = new ArgumentNullException(parameter); return e; } static internal InvalidOperationException InvalidOperation(string error) { InvalidOperationException e = new InvalidOperationException(error); return e; } static internal ArgumentOutOfRangeException ArgumentOutOfRange(string paramName) { return new ArgumentOutOfRangeException(paramName); } } } // 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
- ProfileParameter.cs
- MultiDataTrigger.cs
- Vector.cs
- SelfIssuedAuthRSAPKCS1SignatureDeformatter.cs
- CredentialCache.cs
- ValidationErrorCollection.cs
- Configuration.cs
- DataObject.cs
- ParallelTimeline.cs
- ScriptRegistrationManager.cs
- RegexCompiler.cs
- HttpChannelListener.cs
- ParameterCollection.cs
- ActivityWithResult.cs
- PopupRoot.cs
- DataBoundControlHelper.cs
- Int16Storage.cs
- XmlHierarchyData.cs
- OrderedDictionary.cs
- IxmlLineInfo.cs
- PenLineJoinValidation.cs
- MSAAWinEventWrap.cs
- RC2CryptoServiceProvider.cs
- SafeProcessHandle.cs
- SpellerError.cs
- SymDocumentType.cs
- TextStore.cs
- StyleXamlTreeBuilder.cs
- RijndaelManaged.cs
- NullRuntimeConfig.cs
- WorkflowPersistenceContext.cs
- MachineKeySection.cs
- HttpListenerRequest.cs
- BaseParaClient.cs
- UniqueIdentifierService.cs
- EpmCustomContentWriterNodeData.cs
- DataSourceProvider.cs
- Light.cs
- EdgeProfileValidation.cs
- SymbolMethod.cs
- Adorner.cs
- HelloMessageApril2005.cs
- QuotedPrintableStream.cs
- InkCanvasInnerCanvas.cs
- CallbackValidatorAttribute.cs
- DescendantOverDescendantQuery.cs
- AdapterUtil.cs
- RootNamespaceAttribute.cs
- Substitution.cs
- StaticDataManager.cs
- WsdlInspector.cs
- DragSelectionMessageFilter.cs
- RuntimeArgumentHandle.cs
- ProgressBarAutomationPeer.cs
- ListParaClient.cs
- DBCSCodePageEncoding.cs
- DataServiceQueryOfT.cs
- EncodingNLS.cs
- SqlResolver.cs
- TransactionScope.cs
- DataTableTypeConverter.cs
- FileSystemInfo.cs
- ClientTargetCollection.cs
- WindowsEditBox.cs
- WindowsToolbarItemAsMenuItem.cs
- StaticDataManager.cs
- ProcessThreadCollection.cs
- EntityDataReader.cs
- ProxyGenerator.cs
- PageParserFilter.cs
- CqlBlock.cs
- SelectionList.cs
- MaterialCollection.cs
- CmsInterop.cs
- ItemsPanelTemplate.cs
- SafeBitVector32.cs
- InheritanceContextChangedEventManager.cs
- ByteStreamMessageEncoderFactory.cs
- WebPartCloseVerb.cs
- JoinSymbol.cs
- AccessControlEntry.cs
- GraphicsContext.cs
- JsonByteArrayDataContract.cs
- HTMLTagNameToTypeMapper.cs
- CharacterBuffer.cs
- XmlSchemaValidator.cs
- SecUtil.cs
- XmlSerializableServices.cs
- AssemblyAssociatedContentFileAttribute.cs
- ViewStateModeByIdAttribute.cs
- NullNotAllowedCollection.cs
- SqlSelectStatement.cs
- HttpPostedFile.cs
- SystemColorTracker.cs
- Vector3DAnimationUsingKeyFrames.cs
- StaticResourceExtension.cs
- GuidelineCollection.cs
- BatchParser.cs
- BufferedGraphics.cs
- FunctionImportMapping.ReturnTypeRenameMapping.cs