Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Data / System / Data / Sql / SqlUserDefinedAggregateAttribute.cs / 1305376 / SqlUserDefinedAggregateAttribute.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All Rights Reserved. // Information Contained Herein is Proprietary and Confidential. // //[....] //[....] //daltudov //[....] //beysims //[....] //vadimt //venkar //[....] //----------------------------------------------------------------------------- namespace Microsoft.SqlServer.Server { using System; using System.Data; using System.Data.Common; [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, AllowMultiple=false, Inherited=false)] public sealed class SqlUserDefinedAggregateAttribute: Attribute { private int m_MaxByteSize; private bool m_fInvariantToDup; private bool m_fInvariantToNulls; private bool m_fInvariantToOrder = true; private bool m_fNullIfEmpty; private Format m_format; private string m_fName; // The maximum value for the maxbytesize field, in bytes. public const int MaxByteSizeValue = 8000; // A required attribute on all udaggs, used to indicate that the // given type is a udagg, and its storage format. public SqlUserDefinedAggregateAttribute(Format format) { switch(format) { case Format.Unknown: throw ADP.NotSupportedUserDefinedTypeSerializationFormat((Microsoft.SqlServer.Server.Format)format, "format"); case Format.Native: case Format.UserDefined: #if WINFSFunctionality case Format.Structured: #endif this.m_format = format; break; default: throw ADP.InvalidUserDefinedTypeSerializationFormat((Microsoft.SqlServer.Server.Format)format); } } // The maximum size of this instance, in bytes. Does not have to be // specified for Native format serialization. The maximum value // for this property is specified by MaxByteSizeValue. public int MaxByteSize { get { return this.m_MaxByteSize; } set { if (value < 0 || value > MaxByteSizeValue) { throw ADP.ArgumentOutOfRange(Res.GetString(Res.SQLUDT_MaxByteSizeValue), "MaxByteSize", value); } this.m_MaxByteSize = value; } } public bool IsInvariantToDuplicates { get { return this.m_fInvariantToDup; } set { this.m_fInvariantToDup = value; } } public bool IsInvariantToNulls { get { return this.m_fInvariantToNulls; } set { this.m_fInvariantToNulls = value; } } public bool IsInvariantToOrder { get { return this.m_fInvariantToOrder; } set { this.m_fInvariantToOrder = value; } } public bool IsNullIfEmpty { get { return this.m_fNullIfEmpty; } set { this.m_fNullIfEmpty = value; } } // The on-disk format for this type. public Format Format { get { return this.m_format; } } public string Name { get { return m_fName; } set { m_fName = value; } } } } // 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. // //[....] //[....] //daltudov //[....] //beysims //[....] //vadimt //venkar //[....] //----------------------------------------------------------------------------- namespace Microsoft.SqlServer.Server { using System; using System.Data; using System.Data.Common; [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, AllowMultiple=false, Inherited=false)] public sealed class SqlUserDefinedAggregateAttribute: Attribute { private int m_MaxByteSize; private bool m_fInvariantToDup; private bool m_fInvariantToNulls; private bool m_fInvariantToOrder = true; private bool m_fNullIfEmpty; private Format m_format; private string m_fName; // The maximum value for the maxbytesize field, in bytes. public const int MaxByteSizeValue = 8000; // A required attribute on all udaggs, used to indicate that the // given type is a udagg, and its storage format. public SqlUserDefinedAggregateAttribute(Format format) { switch(format) { case Format.Unknown: throw ADP.NotSupportedUserDefinedTypeSerializationFormat((Microsoft.SqlServer.Server.Format)format, "format"); case Format.Native: case Format.UserDefined: #if WINFSFunctionality case Format.Structured: #endif this.m_format = format; break; default: throw ADP.InvalidUserDefinedTypeSerializationFormat((Microsoft.SqlServer.Server.Format)format); } } // The maximum size of this instance, in bytes. Does not have to be // specified for Native format serialization. The maximum value // for this property is specified by MaxByteSizeValue. public int MaxByteSize { get { return this.m_MaxByteSize; } set { if (value < 0 || value > MaxByteSizeValue) { throw ADP.ArgumentOutOfRange(Res.GetString(Res.SQLUDT_MaxByteSizeValue), "MaxByteSize", value); } this.m_MaxByteSize = value; } } public bool IsInvariantToDuplicates { get { return this.m_fInvariantToDup; } set { this.m_fInvariantToDup = value; } } public bool IsInvariantToNulls { get { return this.m_fInvariantToNulls; } set { this.m_fInvariantToNulls = value; } } public bool IsInvariantToOrder { get { return this.m_fInvariantToOrder; } set { this.m_fInvariantToOrder = value; } } public bool IsNullIfEmpty { get { return this.m_fNullIfEmpty; } set { this.m_fNullIfEmpty = value; } } // The on-disk format for this type. public Format Format { get { return this.m_format; } } public string Name { get { return m_fName; } set { m_fName = value; } } } } // 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
- JoinSymbol.cs
- ReadOnlyActivityGlyph.cs
- ChannelManager.cs
- LineSegment.cs
- HybridObjectCache.cs
- ScriptResourceDefinition.cs
- SqlUtils.cs
- SingleKeyFrameCollection.cs
- TimeSpanSecondsOrInfiniteConverter.cs
- SignatureGenerator.cs
- TypeDescriptor.cs
- StyleModeStack.cs
- TextDecorationCollection.cs
- ArglessEventHandlerProxy.cs
- MSAAEventDispatcher.cs
- EntityDescriptor.cs
- DoubleAnimationBase.cs
- IisTraceListener.cs
- DragCompletedEventArgs.cs
- StrongNamePublicKeyBlob.cs
- ResourceProviderFactory.cs
- StreamUpgradeAcceptor.cs
- GeneralTransform3DTo2D.cs
- AuthorizationRuleCollection.cs
- ExpressionBuilder.cs
- ErrorInfoXmlDocument.cs
- RowsCopiedEventArgs.cs
- ItemCheckedEvent.cs
- UInt32Converter.cs
- IteratorFilter.cs
- ConfigurationPropertyAttribute.cs
- SecondaryIndex.cs
- Ops.cs
- CachedBitmap.cs
- DecoderFallbackWithFailureFlag.cs
- TransformerTypeCollection.cs
- GeneralTransform3D.cs
- EntityTypeEmitter.cs
- WpfWebRequestHelper.cs
- CompositionTarget.cs
- FontFamily.cs
- IisTraceWebEventProvider.cs
- InputLanguageProfileNotifySink.cs
- _UriSyntax.cs
- TextDecorationCollection.cs
- EditingScopeUndoUnit.cs
- PrintDialog.cs
- SelectionItemProviderWrapper.cs
- Models.cs
- DataControlImageButton.cs
- WindowsRebar.cs
- TextDecorationLocationValidation.cs
- GestureRecognizer.cs
- HttpChannelBindingToken.cs
- MarkupCompilePass2.cs
- TemplateBindingExpression.cs
- ServerValidateEventArgs.cs
- RotateTransform3D.cs
- BaseAppDomainProtocolHandler.cs
- ReadOnlyNameValueCollection.cs
- EventDescriptor.cs
- Mapping.cs
- User.cs
- DataGridViewDataErrorEventArgs.cs
- SystemResources.cs
- AddInAttribute.cs
- SqlProviderServices.cs
- InfoCardRSAPKCS1SignatureDeformatter.cs
- ProgressBar.cs
- IDispatchConstantAttribute.cs
- MenuItemBindingCollection.cs
- PolicyVersionConverter.cs
- BasicCommandTreeVisitor.cs
- XmlSchemaSubstitutionGroup.cs
- DictionaryManager.cs
- TabletDeviceInfo.cs
- Rect3D.cs
- ExtenderControl.cs
- NumberSubstitution.cs
- OdbcConnectionPoolProviderInfo.cs
- LineSegment.cs
- FixedNode.cs
- CapabilitiesRule.cs
- AuthStoreRoleProvider.cs
- TimelineClockCollection.cs
- HashHelper.cs
- RectKeyFrameCollection.cs
- PropertySet.cs
- JavaScriptSerializer.cs
- DefaultAuthorizationContext.cs
- WebInvokeAttribute.cs
- SchemaCompiler.cs
- XmlImplementation.cs
- Array.cs
- ValueCollectionParameterReader.cs
- _IPv4Address.cs
- AutoCompleteStringCollection.cs
- WindowsScrollBar.cs
- PartialCachingControl.cs
- MatrixCamera.cs