November Happy Hour will be moved to Thursday December 5th.

Class ActivityDB

Inheritance
System.Object
ActivityDB
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.DataAccess.Internal
Assembly: EPiServer.dll
Version: 10.10.4
Syntax
[ServiceConfiguration(typeof(ActivityDB))]
[ServiceConfiguration(typeof(ActivityDB))]
public class ActivityDB

Constructors

ActivityDB(ServiceAccessor<IAsyncDatabaseExecutor>, IEnumerable<IActivityFactory>)

Declaration
public ActivityDB(ServiceAccessor<IAsyncDatabaseExecutor> databaseHandler, IEnumerable<IActivityFactory> entryFactories)
Parameters
Type Name Description
ServiceAccessor<IAsyncDatabaseExecutor> databaseHandler
System.Collections.Generic.IEnumerable<IActivityFactory> entryFactories

Fields

DateTimeMaxValue

Declaration
protected readonly DateTime DateTimeMaxValue
Field Value
Type Description
System.DateTime

DateTimeMinValue

Declaration
protected readonly DateTime DateTimeMinValue
Field Value
Type Description
System.DateTime

Methods

AddCommonParametersFromQuery(ChangeLogQueryInfo, DbCommand)

Declaration
[Obsolete("Supports obsolete methods")]
protected virtual void AddCommonParametersFromQuery(ChangeLogQueryInfo queryInfo, DbCommand cmd)
Parameters
Type Name Description
ChangeLogQueryInfo queryInfo
System.Data.Common.DbCommand cmd

AddNullableParameter<T>(String, Nullable<T>, DbCommand)

Declaration
protected virtual void AddNullableParameter<T>(string name, T? value, DbCommand cmd)
    where T : struct
Parameters
Type Name Description
System.String name
System.Nullable<T> value
System.Data.Common.DbCommand cmd
Type Parameters
Name Description
T

AssociateAsync(Uri, Int64)

Declaration
public virtual Task AssociateAsync(Uri associatedItem, long changeLogEntryId)
Parameters
Type Name Description
System.Uri associatedItem
System.Int64 changeLogEntryId
Returns
Type Description
System.Threading.Tasks.Task

DeleteAsync(Int64)

Declaration
public virtual Task<ActivityOperationResult> DeleteAsync(long id)
Parameters
Type Name Description
System.Int64 id
Returns
Type Description
System.Threading.Tasks.Task<ActivityOperationResult>

DeleteComment(Int64)

Declaration
public virtual Task<bool> DeleteComment(long commentId)
Parameters
Type Name Description
System.Int64 commentId
Returns
Type Description
System.Threading.Tasks.Task<System.Boolean>

EnsureDateTimeInRange(DateTime)

Declaration
protected virtual DateTime EnsureDateTimeInRange(DateTime dt)
Parameters
Type Name Description
System.DateTime dt
Returns
Type Description
System.DateTime

GetAssociationsAsync(Int64)

Declaration
public virtual Task<IEnumerable<Uri>> GetAssociationsAsync(long changeLogEntryId)
Parameters
Type Name Description
System.Int64 changeLogEntryId
Returns
Type Description
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<System.Uri>>

GetChangeCount(ChangeLogQueryInfo)

Declaration
[Obsolete("Supports obsolete methods")]
public virtual long GetChangeCount(ChangeLogQueryInfo queryInfo)
Parameters
Type Name Description
ChangeLogQueryInfo queryInfo
Returns
Type Description
System.Int64

GetChangeCountBackwards(ChangeLogQueryInfo)

Declaration
[Obsolete("Supports obsolete methods")]
public virtual long GetChangeCountBackwards(ChangeLogQueryInfo queryInfo)
Parameters
Type Name Description
ChangeLogQueryInfo queryInfo
Returns
Type Description
System.Int64

GetChangeCountForward(ChangeLogQueryInfo)

Declaration
[Obsolete("Supports obsolete methods")]
public virtual long GetChangeCountForward(ChangeLogQueryInfo queryInfo)
Parameters
Type Name Description
ChangeLogQueryInfo queryInfo
Returns
Type Description
System.Int64

GetChanges(ChangeLogQueryInfo, ReadDirection, SortOrder)

Declaration
[Obsolete("Supports obsolete methods")]
public virtual IList<Activity> GetChanges(ChangeLogQueryInfo queryInfo, ReadDirection direction, SortOrder order)
Parameters
Type Name Description
ChangeLogQueryInfo queryInfo
ReadDirection direction
SortOrder order
Returns
Type Description
System.Collections.Generic.IList<Activity>

GetHighestSequenceNumber()

Declaration
[Obsolete("Supports obsolete methods")]
public virtual long GetHighestSequenceNumber()
Returns
Type Description
System.Int64

GetLowestAssociatedId(Uri)

Declaration
public virtual long? GetLowestAssociatedId(Uri associatedItem)
Parameters
Type Name Description
System.Uri associatedItem
Returns
Type Description
System.Nullable<System.Int64>

ListAllMatchedAsync(ICollection<Uri>, Int64, Int32)

Declaration
public virtual Task<PagedActivityResult> ListAllMatchedAsync(ICollection<Uri> itemsToMatch, long startIndex, int maxCount)
Parameters
Type Name Description
System.Collections.Generic.ICollection<System.Uri> itemsToMatch
System.Int64 startIndex
System.Int32 maxCount
Returns
Type Description
System.Threading.Tasks.Task<PagedActivityResult>

ListAnyMatchedAsync(ICollection<Uri>, Int64, Int32)

Declaration
public virtual Task<PagedActivityResult> ListAnyMatchedAsync(ICollection<Uri> itemsToMatch, long startIndex, int maxCount)
Parameters
Type Name Description
System.Collections.Generic.ICollection<System.Uri> itemsToMatch
System.Int64 startIndex
System.Int32 maxCount
Returns
Type Description
System.Threading.Tasks.Task<PagedActivityResult>

ListChangesAsync(ActivityQuery)

Declaration
public virtual Task<IEnumerable<Activity>> ListChangesAsync(ActivityQuery query)
Parameters
Type Name Description
ActivityQuery query
Returns
Type Description
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<Activity>>

ListComments(Int64)

Declaration
public virtual Task<IEnumerable<ActivityComment>> ListComments(long entryID)
Parameters
Type Name Description
System.Int64 entryID
Returns
Type Description
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<ActivityComment>>

ListCommentsMany(IEnumerable<Int64>)

Declaration
public virtual Task<IEnumerable<ActivityComment>> ListCommentsMany(IEnumerable<long> entryIDs)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<System.Int64> entryIDs
Returns
Type Description
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<ActivityComment>>

ListMatchingAsync(ICollection<Uri>, ICollection<Uri>, Int64, Int32)

Declaration
public virtual Task<PagedActivityResult> ListMatchingAsync(ICollection<Uri> matchAll, ICollection<Uri> matchAny, long startIndex, int maxCount)
Parameters
Type Name Description
System.Collections.Generic.ICollection<System.Uri> matchAll
System.Collections.Generic.ICollection<System.Uri> matchAny
System.Int64 startIndex
System.Int32 maxCount
Returns
Type Description
System.Threading.Tasks.Task<PagedActivityResult>

LoadAsync(Int64)

Declaration
public virtual Task<Activity> LoadAsync(long id)
Parameters
Type Name Description
System.Int64 id
Returns
Type Description
System.Threading.Tasks.Task<Activity>

LoadCommentAsync(Int64)

Declaration
public virtual Task<ActivityComment> LoadCommentAsync(long commentId)
Parameters
Type Name Description
System.Int64 commentId
Returns
Type Description
System.Threading.Tasks.Task<ActivityComment>

RemoveAssociationAsync(Uri, Int64)

Declaration
public virtual Task<bool> RemoveAssociationAsync(Uri associatedItem, long changeLogEntryId)
Parameters
Type Name Description
System.Uri associatedItem
System.Int64 changeLogEntryId
Returns
Type Description
System.Threading.Tasks.Task<System.Boolean>

RemoveAssociationsAsync(Uri)

Declaration
public virtual Task<int> RemoveAssociationsAsync(Uri associatedItem)
Parameters
Type Name Description
System.Uri associatedItem
Returns
Type Description
System.Threading.Tasks.Task<System.Int32>

RemoveAssociationsAsync(Uri, Uri)

Declaration
public virtual Task<int> RemoveAssociationsAsync(Uri associatedItem, Uri relatedItem)
Parameters
Type Name Description
System.Uri associatedItem
System.Uri relatedItem
Returns
Type Description
System.Threading.Tasks.Task<System.Int32>

SaveAsync(Activity, IEnumerable<Uri>)

Declaration
public virtual Task<ActivityOperationResult> SaveAsync(Activity item, IEnumerable<Uri> associations)
Parameters
Type Name Description
Activity item
System.Collections.Generic.IEnumerable<System.Uri> associations
Returns
Type Description
System.Threading.Tasks.Task<ActivityOperationResult>

SaveCommentAsync(ActivityComment)

Declaration
public virtual Task<long> SaveCommentAsync(ActivityComment comment)
Parameters
Type Name Description
ActivityComment comment
Returns
Type Description
System.Threading.Tasks.Task<System.Int64>

TruncateArchiveAsync(Int64, DateTime)

Declaration
public virtual Task<int> TruncateArchiveAsync(long maxRows, DateTime createdBefore)
Parameters
Type Name Description
System.Int64 maxRows
System.DateTime createdBefore
Returns
Type Description
System.Threading.Tasks.Task<System.Int32>

TruncateAsync(Boolean, Int64, Nullable<Int64>, Nullable<DateTime>, Uri)

Declaration
public virtual Task<int> TruncateAsync(bool archive, long maxRows, long? beforeEntryID, DateTime? createdBefore, Uri preservedRelation)
Parameters
Type Name Description
System.Boolean archive
System.Int64 maxRows
System.Nullable<System.Int64> beforeEntryID
System.Nullable<System.DateTime> createdBefore
System.Uri preservedRelation
Returns
Type Description
System.Threading.Tasks.Task<System.Int32>

TruncateByRowsAndDate(Nullable<Int64>, Nullable<DateTime>)

Declaration
[Obsolete("Supports obsolete methods")]
public virtual void TruncateByRowsAndDate(long? rows, DateTime? olderThan)
Parameters
Type Name Description
System.Nullable<System.Int64> rows
System.Nullable<System.DateTime> olderThan

Extension Methods