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
- _emptywebproxy.cs
- SoapAttributes.cs
- VirtualizingStackPanel.cs
- AccessedThroughPropertyAttribute.cs
- KnownBoxes.cs
- XmlSchemaRedefine.cs
- PreservationFileWriter.cs
- Timer.cs
- OleDbConnectionInternal.cs
- Control.cs
- EventLogRecord.cs
- GroupStyle.cs
- EndpointInfo.cs
- RepeatBehavior.cs
- ViewStateException.cs
- FixedTextBuilder.cs
- UrlEncodedParameterWriter.cs
- AppSettingsReader.cs
- control.ime.cs
- LambdaReference.cs
- WhileDesigner.cs
- XmlWriter.cs
- IPHostEntry.cs
- GridViewRowPresenterBase.cs
- listitem.cs
- SettingsBindableAttribute.cs
- GenericRootAutomationPeer.cs
- X509CertificateChain.cs
- ExternalException.cs
- FlowDocumentReader.cs
- MethodToken.cs
- XmlAttributeCollection.cs
- PeerNameRecordCollection.cs
- CfgParser.cs
- IConvertible.cs
- ContractCodeDomInfo.cs
- StructuralType.cs
- MarkupCompilePass2.cs
- NamespaceCollection.cs
- EllipseGeometry.cs
- DPCustomTypeDescriptor.cs
- TimelineClockCollection.cs
- SimpleExpression.cs
- WebBrowserNavigatingEventHandler.cs
- ProcessModelInfo.cs
- _ContextAwareResult.cs
- ISCIIEncoding.cs
- DesignerAdRotatorAdapter.cs
- XPathDocument.cs
- Random.cs
- SafeMarshalContext.cs
- Set.cs
- ToolStripTemplateNode.cs
- TemplateNameScope.cs
- UnsafeNativeMethods.cs
- PointLight.cs
- ClientScriptManagerWrapper.cs
- LinkLabelLinkClickedEvent.cs
- TypedDataSetSchemaImporterExtensionFx35.cs
- X509ChainElement.cs
- AutomationEvent.cs
- SubstitutionList.cs
- CheckPair.cs
- BitmapEditor.cs
- WindowsTitleBar.cs
- JsonDeserializer.cs
- KeySpline.cs
- IArgumentProvider.cs
- ImageMetadata.cs
- ClientBuildManager.cs
- Pen.cs
- DataAdapter.cs
- SqlInternalConnectionSmi.cs
- BorderGapMaskConverter.cs
- xsdvalidator.cs
- ContractsBCL.cs
- FreezableOperations.cs
- WorkflowRuntimeSection.cs
- WindowsSecurityToken.cs
- SafeArchiveContext.cs
- namescope.cs
- RealProxy.cs
- ExpressionPrefixAttribute.cs
- TextEditorDragDrop.cs
- ECDiffieHellmanPublicKey.cs
- Ipv6Element.cs
- ToolTipAutomationPeer.cs
- connectionpool.cs
- PointUtil.cs
- AllMembershipCondition.cs
- AdCreatedEventArgs.cs
- Enum.cs
- ObfuscationAttribute.cs
- RNGCryptoServiceProvider.cs
- TraceSource.cs
- TextSpan.cs
- DispatcherTimer.cs
- QueryableDataSourceEditData.cs
- RangeContentEnumerator.cs
- DesignerSerializationOptionsAttribute.cs