Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / fx / src / Data / System / Data / SqlClient / SqlUdtInfo.cs / 1 / SqlUdtInfo.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All Rights Reserved. // Information Contained Herein is Proprietary and Confidential. // //[....] //[....] //----------------------------------------------------------------------------- namespace System.Data.SqlClient { using System; using System.Collections; using System.Data.Common; using System.Data.Sql; using System.Data.SqlTypes; using System.Diagnostics; using System.Text; using System.IO; using System.Reflection; using System.Runtime.InteropServices; using System.Runtime.Serialization; using System.Runtime.Serialization.Formatters.Binary; using System.Reflection.Emit; using System.Security.Permissions; using Microsoft.SqlServer.Server; internal class SqlUdtInfo { internal readonly Microsoft.SqlServer.Server.Format SerializationFormat; internal readonly bool IsByteOrdered; internal readonly bool IsFixedLength; internal readonly int MaxByteSize; internal readonly string Name; internal readonly string ValidationMethodName; private SqlUdtInfo(Microsoft.SqlServer.Server.SqlUserDefinedTypeAttribute attr) { SerializationFormat = (Microsoft.SqlServer.Server.Format)attr.Format; IsByteOrdered = attr.IsByteOrdered; IsFixedLength = attr.IsFixedLength; MaxByteSize = attr.MaxByteSize; Name = attr.Name; ValidationMethodName= attr.ValidationMethodName; } internal static SqlUdtInfo GetFromType(Type target) { SqlUdtInfo udtAttr = TryGetFromType(target); if (udtAttr == null) { throw InvalidUdtException.Create(target, Res.SqlUdtReason_NoUdtAttribute); } return udtAttr; } internal static SqlUdtInfo TryGetFromType(Type target) { SqlUdtInfo udtAttr = null; object[] attr = target.GetCustomAttributes(typeof(Microsoft.SqlServer.Server.SqlUserDefinedTypeAttribute), false); if (attr != null && attr.Length == 1) { udtAttr = new SqlUdtInfo((Microsoft.SqlServer.Server.SqlUserDefinedTypeAttribute) attr[0]); } return udtAttr; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All Rights Reserved. // Information Contained Herein is Proprietary and Confidential. // //[....] //[....] //----------------------------------------------------------------------------- namespace System.Data.SqlClient { using System; using System.Collections; using System.Data.Common; using System.Data.Sql; using System.Data.SqlTypes; using System.Diagnostics; using System.Text; using System.IO; using System.Reflection; using System.Runtime.InteropServices; using System.Runtime.Serialization; using System.Runtime.Serialization.Formatters.Binary; using System.Reflection.Emit; using System.Security.Permissions; using Microsoft.SqlServer.Server; internal class SqlUdtInfo { internal readonly Microsoft.SqlServer.Server.Format SerializationFormat; internal readonly bool IsByteOrdered; internal readonly bool IsFixedLength; internal readonly int MaxByteSize; internal readonly string Name; internal readonly string ValidationMethodName; private SqlUdtInfo(Microsoft.SqlServer.Server.SqlUserDefinedTypeAttribute attr) { SerializationFormat = (Microsoft.SqlServer.Server.Format)attr.Format; IsByteOrdered = attr.IsByteOrdered; IsFixedLength = attr.IsFixedLength; MaxByteSize = attr.MaxByteSize; Name = attr.Name; ValidationMethodName= attr.ValidationMethodName; } internal static SqlUdtInfo GetFromType(Type target) { SqlUdtInfo udtAttr = TryGetFromType(target); if (udtAttr == null) { throw InvalidUdtException.Create(target, Res.SqlUdtReason_NoUdtAttribute); } return udtAttr; } internal static SqlUdtInfo TryGetFromType(Type target) { SqlUdtInfo udtAttr = null; object[] attr = target.GetCustomAttributes(typeof(Microsoft.SqlServer.Server.SqlUserDefinedTypeAttribute), false); if (attr != null && attr.Length == 1) { udtAttr = new SqlUdtInfo((Microsoft.SqlServer.Server.SqlUserDefinedTypeAttribute) attr[0]); } return udtAttr; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- AssociationSetMetadata.cs
- ToolStripProgressBar.cs
- VirtualizingPanel.cs
- ObjectQueryProvider.cs
- ChangeProcessor.cs
- DataGridViewTextBoxEditingControl.cs
- Aggregates.cs
- InfoCardSymmetricCrypto.cs
- FontResourceCache.cs
- Utils.cs
- TileModeValidation.cs
- HtmlWindow.cs
- HScrollBar.cs
- XmlUnspecifiedAttribute.cs
- StylusPlugin.cs
- SocketException.cs
- Helpers.cs
- ApplicationServiceManager.cs
- SmiContext.cs
- QueryStringParameter.cs
- CreationContext.cs
- SuppressMergeCheckAttribute.cs
- SqlDataAdapter.cs
- XmlLoader.cs
- FormViewRow.cs
- WebPartAuthorizationEventArgs.cs
- RemotingAttributes.cs
- StatusBar.cs
- XmlNamespaceMapping.cs
- AuthorizationRuleCollection.cs
- SortExpressionBuilder.cs
- XmlCompatibilityReader.cs
- HostnameComparisonMode.cs
- AdjustableArrowCap.cs
- ContentValidator.cs
- CollectionViewSource.cs
- KeyFrames.cs
- FormViewUpdatedEventArgs.cs
- PersonalizationProviderHelper.cs
- NamedPermissionSet.cs
- VSWCFServiceContractGenerator.cs
- RoutedUICommand.cs
- TextTreeUndoUnit.cs
- FileUpload.cs
- TimeStampChecker.cs
- UrlMappingCollection.cs
- ListBase.cs
- TextBox.cs
- OleDbParameterCollection.cs
- CodeConditionStatement.cs
- SignatureToken.cs
- DataGridViewRowStateChangedEventArgs.cs
- HtmlTableCell.cs
- WebBrowser.cs
- Int16.cs
- DataListAutoFormat.cs
- Pen.cs
- IndentedTextWriter.cs
- InkPresenterAutomationPeer.cs
- ImageSource.cs
- TypographyProperties.cs
- InputMethod.cs
- Inflater.cs
- TextDecorationCollection.cs
- shaper.cs
- FormViewCommandEventArgs.cs
- OdbcFactory.cs
- ContentElement.cs
- StylusCaptureWithinProperty.cs
- XPathParser.cs
- Style.cs
- TypefaceMetricsCache.cs
- NativeMethods.cs
- WindowsScrollBarBits.cs
- Matrix3DValueSerializer.cs
- UInt64.cs
- _DomainName.cs
- FunctionDefinition.cs
- AssemblyCache.cs
- DependencyObjectType.cs
- ButtonAutomationPeer.cs
- QueueAccessMode.cs
- TimeSpanSecondsConverter.cs
- PriorityChain.cs
- ResourceDictionary.cs
- ParameterCollection.cs
- FixUp.cs
- TraversalRequest.cs
- WindowsRichEditRange.cs
- SynchronizedInputHelper.cs
- CodeTryCatchFinallyStatement.cs
- DocumentGridContextMenu.cs
- WindowsToolbarAsMenu.cs
- ExpressionDumper.cs
- SupportingTokenProviderSpecification.cs
- HttpApplicationFactory.cs
- PathFigure.cs
- MetadataCacheItem.cs
- ButtonFieldBase.cs
- RoleManagerEventArgs.cs