Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
![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
- CodeExporter.cs
- OutputWindow.cs
- MatrixConverter.cs
- SudsWriter.cs
- FilteredAttributeCollection.cs
- FontWeights.cs
- WizardStepBase.cs
- UnsafeNativeMethods.cs
- OdbcUtils.cs
- ClientScriptManagerWrapper.cs
- ScopeCollection.cs
- RuntimeConfigLKG.cs
- VisualBasic.cs
- RegistrySecurity.cs
- TextServicesContext.cs
- TableRow.cs
- ConstraintManager.cs
- TextDecorations.cs
- BaseTemplatedMobileComponentEditor.cs
- SrgsRuleRef.cs
- BitmapData.cs
- AlignmentXValidation.cs
- PrimaryKeyTypeConverter.cs
- SessionParameter.cs
- OutputCache.cs
- GlyphRun.cs
- NegotiateStream.cs
- EnumerableRowCollectionExtensions.cs
- OpenFileDialog.cs
- ServiceNameCollection.cs
- TreeViewAutomationPeer.cs
- ProfileGroupSettings.cs
- DrawingContextWalker.cs
- CachedFontFace.cs
- VisualTreeHelper.cs
- CellTreeNode.cs
- ExpressionVisitor.cs
- ServicePoint.cs
- TypedReference.cs
- TextInfo.cs
- DllNotFoundException.cs
- EdmEntityTypeAttribute.cs
- UncommonField.cs
- Cursor.cs
- KeyProperty.cs
- PreviewKeyDownEventArgs.cs
- GroupBox.cs
- AutoFocusStyle.xaml.cs
- FunctionDefinition.cs
- Item.cs
- XmlCompatibilityReader.cs
- CodeAccessPermission.cs
- CancellationState.cs
- Buffer.cs
- DbConnectionStringCommon.cs
- SafeFileHandle.cs
- StorageAssociationTypeMapping.cs
- TextTreeUndoUnit.cs
- Exceptions.cs
- AssemblyCache.cs
- ToolStripItemCollection.cs
- ExpressionPrefixAttribute.cs
- ProfilePropertySettingsCollection.cs
- PlatformNotSupportedException.cs
- ResourceSet.cs
- OuterGlowBitmapEffect.cs
- NullRuntimeConfig.cs
- TemplateKey.cs
- InkCanvasSelection.cs
- ReflectTypeDescriptionProvider.cs
- SectionInput.cs
- RangeBaseAutomationPeer.cs
- BaseAutoFormat.cs
- userdatakeys.cs
- TimeEnumHelper.cs
- ToolStripDropDownButton.cs
- DataColumnCollection.cs
- PropertyRecord.cs
- baseshape.cs
- ConcurrencyMode.cs
- XmlObjectSerializerWriteContextComplex.cs
- SelectedCellsCollection.cs
- NetSectionGroup.cs
- CodeDelegateCreateExpression.cs
- Margins.cs
- XmlAnyElementAttributes.cs
- BmpBitmapEncoder.cs
- SpecialFolderEnumConverter.cs
- EmptyControlCollection.cs
- MergeLocalizationDirectives.cs
- BufferedGraphicsContext.cs
- WindowsGraphics2.cs
- NotSupportedException.cs
- TextTreeInsertUndoUnit.cs
- StartUpEventArgs.cs
- MexServiceChannelBuilder.cs
- PackUriHelper.cs
- CompileLiteralTextParser.cs
- SiteMapHierarchicalDataSourceView.cs
- PiiTraceSource.cs