Class ActivityDB
Inheritance
System.Object
ActivityDB
Assembly: EPiServer.dll
Version: 12.0.3
Syntax
[ServiceConfiguration]
public class ActivityDB : Object
Constructors
ActivityDB(ServiceAccessor<IAsyncDatabaseExecutor>, IEnumerable<IActivityFactory>)
Declaration
public ActivityDB(ServiceAccessor<IAsyncDatabaseExecutor> databaseHandler, IEnumerable<IActivityFactory> entryFactories)
Parameters
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
AddNullableParameter<T>(String, Nullable<T>, DbCommand)
Declaration
protected virtual void AddNullableParameter<T>(string name, Nullable<T> value, DbCommand cmd)
where T : struct, ValueType
Parameters
Type |
Name |
Description |
System.String |
name |
|
System.Nullable<T> |
value |
|
System.Data.Common.DbCommand |
cmd |
|
Type Parameters
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
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>> |
|
GetLowestAssociatedId(Uri)
Declaration
public virtual Nullable<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
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
ListChangesAsync(ActivityQuery)
Declaration
public virtual Task<IEnumerable<Activity>> ListChangesAsync(ActivityQuery query)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<Activity>> |
|
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>> |
|
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
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> |
|
Declaration
public virtual Task<ActivityComment> LoadCommentAsync(long commentId)
Parameters
Type |
Name |
Description |
System.Int64 |
commentId |
|
Returns
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
Declaration
public virtual Task<long> SaveCommentAsync(ActivityComment comment)
Parameters
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, Nullable<long> beforeEntryID, Nullable<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> |
|
Extension Methods