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
- XamlFilter.cs
- MimeTypeMapper.cs
- RewritingSimplifier.cs
- ClientBuildManager.cs
- XmlCompatibilityReader.cs
- EntityDesignerUtils.cs
- Oid.cs
- DisplayInformation.cs
- ProviderException.cs
- ArraySubsetEnumerator.cs
- OleDbParameter.cs
- ViewStateModeByIdAttribute.cs
- EnterpriseServicesHelper.cs
- InfoCardBaseException.cs
- CngProvider.cs
- ParallelTimeline.cs
- Misc.cs
- CssStyleCollection.cs
- BindMarkupExtensionSerializer.cs
- ContractHandle.cs
- ProxyWebPartConnectionCollection.cs
- BitmapPalette.cs
- WebPartEventArgs.cs
- EntityRecordInfo.cs
- NativeMethods.cs
- InfocardInteractiveChannelInitializer.cs
- Environment.cs
- DBPropSet.cs
- oledbconnectionstring.cs
- SchemaElementDecl.cs
- Point3DIndependentAnimationStorage.cs
- WindowsHyperlink.cs
- LinkLabel.cs
- ChannelPoolSettings.cs
- DashStyles.cs
- validation.cs
- MethodBuilder.cs
- MatrixStack.cs
- CloseSequence.cs
- DesignerDataRelationship.cs
- WebContext.cs
- mactripleDES.cs
- IndicFontClient.cs
- FixedFlowMap.cs
- mda.cs
- SpStreamWrapper.cs
- TextUtf8RawTextWriter.cs
- TimelineGroup.cs
- RoutedPropertyChangedEventArgs.cs
- InputLanguageCollection.cs
- CollectionChangeEventArgs.cs
- NetCodeGroup.cs
- ClockGroup.cs
- PathGeometry.cs
- SemanticBasicElement.cs
- CriticalFinalizerObject.cs
- StringUtil.cs
- Graph.cs
- Profiler.cs
- SiteMapDataSourceView.cs
- ResourceDictionary.cs
- PropertyChangeTracker.cs
- ProxyOperationRuntime.cs
- WeakRefEnumerator.cs
- RegexEditorDialog.cs
- NetPeerTcpBinding.cs
- SmiEventSink_DeferedProcessing.cs
- Sequence.cs
- DecimalAnimation.cs
- ComponentSerializationService.cs
- PageThemeBuildProvider.cs
- PointConverter.cs
- DynamicValidator.cs
- HorizontalAlignConverter.cs
- Selector.cs
- UrlAuthFailedErrorFormatter.cs
- EmptyQuery.cs
- DataSourceExpressionCollection.cs
- HMACSHA384.cs
- MatrixTransform3D.cs
- SmtpNegotiateAuthenticationModule.cs
- XpsFilter.cs
- ObjectSecurity.cs
- Lock.cs
- Tablet.cs
- DbMetaDataFactory.cs
- HelloOperationAsyncResult.cs
- CodeGroup.cs
- DataControlImageButton.cs
- OracleEncoding.cs
- RuntimeEnvironment.cs
- ExpressionVisitorHelpers.cs
- _NestedMultipleAsyncResult.cs
- MethodAccessException.cs
- BaseParagraph.cs
- XmlDownloadManager.cs
- IdentitySection.cs
- DataControlFieldCollection.cs
- XmlSchemaComplexContent.cs
- TileBrush.cs