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
- IDataContractSurrogate.cs
- _FtpDataStream.cs
- WeakHashtable.cs
- XmlSchemaSequence.cs
- clipboard.cs
- ConfigurationManagerInternal.cs
- DbParameterCollection.cs
- PaintValueEventArgs.cs
- ConfigXmlWhitespace.cs
- StylusShape.cs
- MethodCallConverter.cs
- AndCondition.cs
- XmlSerializerSection.cs
- WebContext.cs
- ManifestResourceInfo.cs
- EdmSchemaError.cs
- ControlHelper.cs
- Misc.cs
- XhtmlBasicPageAdapter.cs
- PropertyGroupDescription.cs
- CodeDOMUtility.cs
- TextWriter.cs
- _ConnectionGroup.cs
- HostingEnvironmentException.cs
- TranslateTransform.cs
- XsltException.cs
- Unit.cs
- SchemaComplexType.cs
- AttachInfo.cs
- Emitter.cs
- ClientProxyGenerator.cs
- ValidateNames.cs
- CredentialCache.cs
- SeverityFilter.cs
- ManagementPath.cs
- RtfToXamlReader.cs
- OutputScopeManager.cs
- StaticContext.cs
- DesignerAttribute.cs
- AnonymousIdentificationModule.cs
- DocumentXPathNavigator.cs
- NotifyIcon.cs
- UriTemplateTable.cs
- ObjectQuery.cs
- Attributes.cs
- DecimalAnimation.cs
- FreezableDefaultValueFactory.cs
- CorrelationService.cs
- DataGridViewRowPostPaintEventArgs.cs
- Figure.cs
- KeySplineConverter.cs
- mediapermission.cs
- DataGridViewCheckBoxColumn.cs
- VolatileResourceManager.cs
- StrictModeSecurityHeaderElementInferenceEngine.cs
- HttpDebugHandler.cs
- RecognizedPhrase.cs
- PrintPreviewDialog.cs
- DataFormats.cs
- QilLoop.cs
- AnnotationDocumentPaginator.cs
- safelink.cs
- XmlSchemaAnyAttribute.cs
- SqlDataSourceDesigner.cs
- VirtualDirectoryMappingCollection.cs
- HotSpot.cs
- FunctionOverloadResolver.cs
- TransactionScope.cs
- CommonEndpointBehaviorElement.cs
- MsmqInputMessage.cs
- StatusBar.cs
- OrderByExpression.cs
- HtmlPageAdapter.cs
- OdbcStatementHandle.cs
- WeakHashtable.cs
- ContentElementCollection.cs
- ReadOnlyCollectionBase.cs
- ImportCatalogPart.cs
- SafeHGlobalHandleCritical.cs
- ObjectItemCollection.cs
- Profiler.cs
- SchemeSettingElement.cs
- DataGridHeaderBorder.cs
- IsolatedStorageException.cs
- RawStylusInputReport.cs
- EditorPart.cs
- PKCS1MaskGenerationMethod.cs
- EntityContainerEntitySet.cs
- ImmComposition.cs
- UiaCoreProviderApi.cs
- EventInfo.cs
- ConfigXmlElement.cs
- Italic.cs
- CannotUnloadAppDomainException.cs
- TypeEnumerableViewSchema.cs
- PrtTicket_Public_Simple.cs
- CodeDOMProvider.cs
- SqlClientWrapperSmiStreamChars.cs
- XmlWrappingWriter.cs
- Query.cs