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
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- XmlSubtreeReader.cs
- XmlResolver.cs
- OracleCommandSet.cs
- OciEnlistContext.cs
- TextPointerBase.cs
- TreePrinter.cs
- SynchronizationFilter.cs
- Viewport2DVisual3D.cs
- HandleExceptionArgs.cs
- WebPartActionVerb.cs
- SpecularMaterial.cs
- ResumeStoryboard.cs
- x509store.cs
- _ListenerResponseStream.cs
- BulletedListEventArgs.cs
- EmbossBitmapEffect.cs
- MarkupCompilePass2.cs
- SplitterPanel.cs
- RelatedPropertyManager.cs
- CompressedStack.cs
- PointHitTestParameters.cs
- XomlCompilerError.cs
- ScriptingRoleServiceSection.cs
- XmlNode.cs
- Win32.cs
- NavigationFailedEventArgs.cs
- dbenumerator.cs
- DataSourceControl.cs
- InsufficientMemoryException.cs
- CodeDomDecompiler.cs
- TaskFormBase.cs
- ReflectPropertyDescriptor.cs
- RectConverter.cs
- EntityCommand.cs
- ComboBox.cs
- ExpressionContext.cs
- ProvidersHelper.cs
- HostingEnvironmentException.cs
- OdbcConnection.cs
- StringDictionaryWithComparer.cs
- CheckedPointers.cs
- Event.cs
- ReferenceSchema.cs
- AutoScrollExpandMessageFilter.cs
- MobileContainerDesigner.cs
- ConfigurationSectionHelper.cs
- SkewTransform.cs
- InputProviderSite.cs
- MetadataCache.cs
- CipherData.cs
- PnrpPermission.cs
- UnmanagedMemoryStream.cs
- XmlSchema.cs
- InstalledFontCollection.cs
- SelectionItemProviderWrapper.cs
- RemoveStoryboard.cs
- ColorTransformHelper.cs
- CompareValidator.cs
- TemplateBindingExpression.cs
- ToolStripButton.cs
- ToolStripCollectionEditor.cs
- StructuralCache.cs
- InputLanguageEventArgs.cs
- ServerValidateEventArgs.cs
- PermissionSet.cs
- InternalConfigSettingsFactory.cs
- ObjectQuery.cs
- IPHostEntry.cs
- TypeExtension.cs
- WebPartCatalogCloseVerb.cs
- Vector3DCollectionValueSerializer.cs
- SrgsText.cs
- DataTableMappingCollection.cs
- DefaultParameterValueAttribute.cs
- MimeBasePart.cs
- VariableQuery.cs
- DbMetaDataFactory.cs
- Helpers.cs
- WmfPlaceableFileHeader.cs
- Pen.cs
- DesignerUtility.cs
- Root.cs
- XmlUrlResolver.cs
- DataBinder.cs
- SmiSettersStream.cs
- ConnectionStringSettings.cs
- SpellCheck.cs
- SizeF.cs
- ScrollProviderWrapper.cs
- MethodRental.cs
- StringBlob.cs
- AuthenticationModuleElementCollection.cs
- MultilineStringConverter.cs
- SourceItem.cs
- ApplicationFileParser.cs
- ScrollProviderWrapper.cs
- DataGridTableCollection.cs
- AsyncOperation.cs
- DeviceOverridableAttribute.cs
- ToolConsole.cs