Class InstanceDataComment
Manage comments in instance datas.
Inheritance
Namespace: Simplic.Framework.Extension
Assembly: Simplic.Framework.Extension.dll
Syntax
public class InstanceDataComment : objectProperties
| Improve this Doc View SourceSingleton
Singleton access to InstanceDataComment
Declaration
public static InstanceDataComment Singleton { get; }Property Value
| Type | Description | 
|---|---|
| InstanceDataComment | 
Methods
| Improve this Doc View SourceAddGuidResolver(Guid, ICommentInstanceDataGuidResolver)
Add a guid resolver to the lsit of resovlers for a given stack
Declaration
public void AddGuidResolver(Guid stackGuid, ICommentInstanceDataGuidResolver resolver)Parameters
| Type | Name | Description | 
|---|---|---|
| Guid | stackGuid | Unique stack guid | 
| ICommentInstanceDataGuidResolver | resolver | Resolver instance | 
Create(InstanceDataCommentModel)
Crate new comment
Declaration
public InstanceDataCommentModel Create(InstanceDataCommentModel comment)Parameters
| Type | Name | Description | 
|---|---|---|
| InstanceDataCommentModel | comment | Instance of InstanceDataCommentModel | 
Returns
| Type | Description | 
|---|---|
| InstanceDataCommentModel | 
Delete(Guid)
Deletes a comment
Declaration
public void Delete(Guid guid)Parameters
| Type | Name | Description | 
|---|---|---|
| Guid | guid | 
Get(Guid, Guid)
Get a list of all comments
Declaration
public IList<InstanceData_Comment_Entry> Get(Guid stackGuid, Guid instanceDataGuid)Parameters
| Type | Name | Description | 
|---|---|---|
| Guid | stackGuid | Guid of the stack | 
| Guid | instanceDataGuid | Instance data guid | 
Returns
| Type | Description | 
|---|---|
| IList<InstanceData_Comment_Entry> | List of comments (InstanceData_Comment_Entry) | 
GetAdditionalInstanceDataGuids(Guid, Guid)
Get additional guids for a given instance-data guid
Declaration
public IList<Guid> GetAdditionalInstanceDataGuids(Guid stackGuid, Guid instanceDataGuid)Parameters
| Type | Name | Description | 
|---|---|---|
| Guid | stackGuid | Stack guid | 
| Guid | instanceDataGuid | Instance data guid | 
Returns
| Type | Description | 
|---|---|
| IList<Guid> | List of further instance data guids | 
GetCategories(Guid)
Get a list of categories that belongs to a stack
Declaration
public IList<InstanceDataCommentCategory> GetCategories(Guid stackGuid)Parameters
| Type | Name | Description | 
|---|---|---|
| Guid | stackGuid | Unique stack guid | 
Returns
| Type | Description | 
|---|---|
| IList<InstanceDataCommentCategory> | List of categories | 
GetCategory(Guid)
Get a single category
Declaration
public InstanceDataCommentCategory GetCategory(Guid id)Parameters
| Type | Name | Description | 
|---|---|---|
| Guid | id | Unique category id | 
Returns
| Type | Description | 
|---|---|
| InstanceDataCommentCategory | Instance of a category or null | 
GetVersions(Guid)
Get all versions from a single comment, sorted by create date time desc
Declaration
public IList<InstanceData_Comment_Entry> GetVersions(Guid commentId)Parameters
| Type | Name | Description | 
|---|---|---|
| Guid | commentId | Id of the comments | 
Returns
| Type | Description | 
|---|---|
| IList<InstanceData_Comment_Entry> | List of comments (InstanceData_Comment_Entry) | 
HasComments(Guid, Guid)
Proofts wether an instancedata has comments
Declaration
public bool HasComments(Guid stackGuid, Guid instanceDataGuid)Parameters
| Type | Name | Description | 
|---|---|---|
| Guid | stackGuid | Id of the stack | 
| Guid | instanceDataGuid | Id of the instance data | 
Returns
| Type | Description | 
|---|---|
| System.Boolean | True if an instance data has comments | 
IsCommentIdExisting(Guid)
Proofs wether an comment id exists. If an empty guid is passed, the method will return false
Declaration
public bool IsCommentIdExisting(Guid commentId)Parameters
| Type | Name | Description | 
|---|---|---|
| Guid | commentId | Id of the comment to proof | 
Returns
| Type | Description | 
|---|---|
| System.Boolean | True if an comment exists | 
RemoveCategory(Guid)
Remove category from database
Declaration
public void RemoveCategory(Guid id)Parameters
| Type | Name | Description | 
|---|---|---|
| Guid | id | Category id | 
RemoveSticky(Guid)
Unset comment as sticky
Declaration
public void RemoveSticky(Guid commentId)Parameters
| Type | Name | Description | 
|---|---|---|
| Guid | commentId | StickComment id | 
SetCategory(InstanceDataCommentCategory)
Create or update a category
Declaration
public void SetCategory(InstanceDataCommentCategory category)Parameters
| Type | Name | Description | 
|---|---|---|
| InstanceDataCommentCategory | category | Category model | 
SetSticky(Guid)
Set comment as sticky
Declaration
public void SetSticky(Guid commentId)Parameters
| Type | Name | Description | 
|---|---|---|
| Guid | commentId | StickComment id | 
Update(InstanceDataCommentModel)
Create a new version of a comment
Declaration
public InstanceDataCommentModel Update(InstanceDataCommentModel comment)Parameters
| Type | Name | Description | 
|---|---|---|
| InstanceDataCommentModel | comment | Instance of InstanceDataCommentModel | 
Returns
| Type | Description | 
|---|---|
| InstanceDataCommentModel |