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
- EditorPart.cs
- PagesSection.cs
- DbParameterCollection.cs
- FixedDocument.cs
- DBBindings.cs
- GridViewUpdateEventArgs.cs
- ExpressionPrefixAttribute.cs
- SqlConnection.cs
- DataGridViewRowDividerDoubleClickEventArgs.cs
- FilterEventArgs.cs
- RichTextBoxAutomationPeer.cs
- LostFocusEventManager.cs
- DecimalStorage.cs
- StorageInfo.cs
- SoapAttributes.cs
- ChtmlCalendarAdapter.cs
- ContractHandle.cs
- DataSourceExpressionCollection.cs
- ToolStripSystemRenderer.cs
- MultitargetUtil.cs
- SQLRoleProvider.cs
- PaginationProgressEventArgs.cs
- HttpCacheVaryByContentEncodings.cs
- SqlIdentifier.cs
- Int32Collection.cs
- ClientRuntimeConfig.cs
- TextRunCache.cs
- UnmanagedMarshal.cs
- GenericWebPart.cs
- Debug.cs
- SafeFindHandle.cs
- ResourceType.cs
- Wow64ConfigurationLoader.cs
- AxHostDesigner.cs
- UnsafeNativeMethods.cs
- DoubleLinkListEnumerator.cs
- DbConnectionPoolCounters.cs
- WindowsTab.cs
- InstanceKey.cs
- DataControlImageButton.cs
- XmlHierarchyData.cs
- DataSourceControlBuilder.cs
- VectorAnimationBase.cs
- BypassElement.cs
- InvokeWebService.cs
- TriggerAction.cs
- SqlCacheDependencySection.cs
- DataGridBoolColumn.cs
- XPathEmptyIterator.cs
- PrintDialog.cs
- Rss20FeedFormatter.cs
- CommandExpr.cs
- SessionStateModule.cs
- HorizontalAlignConverter.cs
- HttpApplicationFactory.cs
- RawStylusActions.cs
- LinearGradientBrush.cs
- PersonalizationAdministration.cs
- SharedConnectionListener.cs
- ArraySubsetEnumerator.cs
- LoginUtil.cs
- GenericsNotImplementedException.cs
- BypassElementCollection.cs
- SizeChangedEventArgs.cs
- SoapElementAttribute.cs
- ValidationSummary.cs
- InterleavedZipPartStream.cs
- InstanceData.cs
- ColorConvertedBitmapExtension.cs
- InternalCache.cs
- SafeRightsManagementPubHandle.cs
- WindowsListViewSubItem.cs
- SqlServer2KCompatibilityCheck.cs
- GridViewDeletedEventArgs.cs
- ExpressionNode.cs
- ConditionChanges.cs
- ObjectDataSource.cs
- AutoCompleteStringCollection.cs
- Button.cs
- ObjectItemAssemblyLoader.cs
- HelloOperationCD1AsyncResult.cs
- DataGridPreparingCellForEditEventArgs.cs
- OSEnvironmentHelper.cs
- WebMessageEncodingBindingElement.cs
- StandardToolWindows.cs
- XmlSchemaSimpleTypeRestriction.cs
- Rect.cs
- ObjectSelectorEditor.cs
- DataTableReader.cs
- EntitySqlException.cs
- Queue.cs
- WindowsGraphicsCacheManager.cs
- TextFormatterHost.cs
- NavigationExpr.cs
- SourceLineInfo.cs
- EventDescriptor.cs
- XmlSchemaSimpleTypeList.cs
- TagPrefixAttribute.cs
- TextSpanModifier.cs
- ReferencedType.cs