Class InMemoryProtectionProvider
Namespace: Aurigma.DesignAtoms.Storage.Repositories.Protectors
Assembly: Aurigma.DesignAtoms.dll
Syntax
public class InMemoryProtectionProvider : IRepositoryFileProtectionProvider
Inheritance: System.Object -> InMemoryProtectionProvider
Implements
Inherited Members
System.Object.ToStringSystem.Object.Equals(System.Object)System.Object.Equals(System.Object,System.Object)System.Object.ReferenceEquals(System.Object,System.Object)System.Object.GetHashCodeSystem.Object.GetTypeSystem.Object.MemberwiseClone
Constructors
InMemoryProtectionProvider
public InMemoryProtectionProvider()
Methods
IsProtected
public bool IsProtected(string fileId)
Parameters
| Type | Name | Description |
|---|---|---|
System.String | fileId |
Returns
System.Boolean
IsProtectedAsync
public Task<bool> IsProtectedAsync(string fileId)
Parameters
| Type | Name | Description |
|---|---|---|
System.String | fileId |
Returns
System.Threading.Tasks.Task<System.Boolean>
TrySetProtection
public bool TrySetProtection(string fileId, bool isProtected)
Parameters
| Type | Name | Description |
|---|---|---|
System.String | fileId | |
System.Boolean | isProtected |
Returns
System.Boolean
TrySetProtectionAsync
public Task<bool> TrySetProtectionAsync(string fileId, bool isProtected)
Parameters
| Type | Name | Description |
|---|---|---|
System.String | fileId | |
System.Boolean | isProtected |
Returns
System.Threading.Tasks.Task<System.Boolean>
GetReferenceCount
public int GetReferenceCount(string fileId)
Parameters
| Type | Name | Description |
|---|---|---|
System.String | fileId |
Returns
System.Int32
ClearProtection
public void ClearProtection(string fileId)
Parameters
| Type | Name | Description |
|---|---|---|
System.String | fileId |
ClearAll
public void ClearAll()
GetProtectedFiles
public IEnumerable<string> GetProtectedFiles()
Returns
System.Collections.Generic.IEnumerable<System.String>