SqlUserDefinedAggregateAttribute 클래스

정의

형식을 사용자 정의 집계로 등록해야 함을 나타냅니다. 특성의 속성은 SQL Server에 형식을 등록할 때 사용되는 실제 특성을 반영합니다. 이 클래스는 상속될 수 없습니다.

public ref class SqlUserDefinedAggregateAttribute sealed : Attribute
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Struct, AllowMultiple=false, Inherited=false)]
public sealed class SqlUserDefinedAggregateAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Struct, AllowMultiple=false, Inherited=false)>]
type SqlUserDefinedAggregateAttribute = class
    inherit Attribute
Public NotInheritable Class SqlUserDefinedAggregateAttribute
Inherits Attribute
상속
SqlUserDefinedAggregateAttribute
특성

예제

다음 예제에서는 사용자 정의 집계에 대한 특성을 보여줍니다 SqlUserDefinedAggregateAttribute . 집계는 사용자 지정 serialization을 사용하고, 직렬화될 때 최대 크기가 8,000바이트이며, null, 중복 및 순서에 고정됩니다.

using Microsoft.SqlServer.Server;
using System.IO;
using System.Data.Sql;
using System.Data.SqlTypes;
using System.Text;

[Serializable]
[Microsoft.SqlServer.Server.SqlUserDefinedAggregate(
   Microsoft.SqlServer.Server.Format.UserDefined,
   IsInvariantToNulls = true,
   IsInvariantToDuplicates = false,
   IsInvariantToOrder = false,
   MaxByteSize = 8000)
        ]
public class Concatenate : Microsoft.SqlServer.Server.IBinarySerialize
{

    public void Read(BinaryReader r)
    {

    }

    public void Write(BinaryWriter w)
    {

    }
}

설명

SQL Server 사용자 지정 특성이 있는 클래스 정의에 바인딩된 사용자 정의 집계를 SqlUserDefinedAggregateAttribute 만듭니다. 모든 사용자 정의 집계에는 이 특성이 주석으로 첨부되어야 합니다.

사용자 정의 집계 및 예제에 대한 자세한 내용은 SQL Server 2005 온라인 설명서의 "CLR User-Defined 집계"를 참조하세요.

생성자

SqlUserDefinedAggregateAttribute(Format)

지정된 형식이 사용자 정의 집계와 사용자 정의 집계의 스토리지 형식임을 나타내는 데 사용되는 사용자 정의 집계의 필수 특성입니다.

필드

MaxByteSizeValue

계산 중에 이 집계 인스턴스의 상태를 저장하는 데 필요한 최대 크기(바이트)입니다.

속성

Format

serialization 형식인 Format입니다.

IsInvariantToDuplicates

집계가 중복된 요소에 따라 달라지지 않는지 여부를 나타냅니다.

IsInvariantToNulls

집계가 null에 따라 달라지지 않는지 여부를 나타냅니다.

IsInvariantToOrder

집계가 순서에 따라 달라지지 않는지 여부를 나타냅니다.

IsNullIfEmpty

값이 누적되지 않은 경우 집계가 null을 반환하는지 여부를 나타냅니다.

MaxByteSize

집계 인스턴스의 최대 크기(바이트)입니다.

Name

집계의 이름입니다.

적용 대상