Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- CommonDialog.cs
- XmlNotation.cs
- ConfigXmlElement.cs
- DecimalConverter.cs
- RadioButton.cs
- ParseElementCollection.cs
- ExtenderProvidedPropertyAttribute.cs
- AuthenticatingEventArgs.cs
- StringValidator.cs
- XmlException.cs
- HighlightVisual.cs
- AssemblyGen.cs
- DataBoundControlAdapter.cs
- FieldDescriptor.cs
- XmlParserContext.cs
- CompilerResults.cs
- CompiledQuery.cs
- clipboard.cs
- HtmlLiteralTextAdapter.cs
- UpDownEvent.cs
- BufferedGraphicsContext.cs
- NewArrayExpression.cs
- DataSpaceManager.cs
- _NegotiateClient.cs
- PageCatalogPart.cs
- MonthCalendarDesigner.cs
- DirectoryLocalQuery.cs
- FailedToStartupUIException.cs
- DeploymentSection.cs
- PerformanceCounterLib.cs
- ScopelessEnumAttribute.cs
- DataServiceProviderWrapper.cs
- DeleteIndexBinder.cs
- SQLMoneyStorage.cs
- XmlIlTypeHelper.cs
- XmlAtomicValue.cs
- TypeResolvingOptionsAttribute.cs
- ImageBrush.cs
- SimpleTypesSurrogate.cs
- PieceNameHelper.cs
- ColumnWidthChangedEvent.cs
- StructuredTypeEmitter.cs
- StylusPointProperties.cs
- DropSource.cs
- MimeMultiPart.cs
- DataContractAttribute.cs
- CommandEventArgs.cs
- TimelineGroup.cs
- TextBoxAutomationPeer.cs
- SqlCharStream.cs
- Control.cs
- MouseWheelEventArgs.cs
- ButtonStandardAdapter.cs
- UserControlParser.cs
- EntityDataSourceSelectingEventArgs.cs
- DescendentsWalker.cs
- DataRowChangeEvent.cs
- SymmetricAlgorithm.cs
- DataGridToolTip.cs
- DeclarativeCatalogPartDesigner.cs
- HyperLinkStyle.cs
- ColorBlend.cs
- TextInfo.cs
- ModuleConfigurationInfo.cs
- ConfigurationSection.cs
- QueryCacheKey.cs
- ContentTypeSettingDispatchMessageFormatter.cs
- StorageSetMapping.cs
- TextCompositionEventArgs.cs
- MetafileHeader.cs
- ErrorItem.cs
- DropDownButton.cs
- InstanceDataCollection.cs
- GPPOINT.cs
- XmlCharType.cs
- BaseCollection.cs
- DbProviderManifest.cs
- MarshalDirectiveException.cs
- DataListItemEventArgs.cs
- DesignRelation.cs
- CursorConverter.cs
- MappedMetaModel.cs
- OneToOneMappingSerializer.cs
- MultiBindingExpression.cs
- CachedPathData.cs
- Win32Exception.cs
- DataGridViewRowCancelEventArgs.cs
- TimeSpanSecondsConverter.cs
- EUCJPEncoding.cs
- Buffer.cs
- DependentList.cs
- MarkupCompilePass2.cs
- SafeHGlobalHandleCritical.cs
- HttpDictionary.cs
- ReferencedType.cs
- MediaTimeline.cs
- Quaternion.cs
- ConnectionConsumerAttribute.cs
- LayoutEngine.cs
- FrugalMap.cs