Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
ArchivingTimeAttribute.cs
1using System;
2
4{
8 [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, AllowMultiple = false, Inherited = true)]
9 public class ArchivingTimeAttribute : Attribute
10 {
11 private readonly int days;
12 private readonly string propertyName;
13
19 : this(int.MaxValue)
20 {
21 }
22
29 {
30 this.days = Days;
31 this.propertyName = null;
32 }
33
40 {
41 this.days = int.MaxValue;
42 this.propertyName = PropertyName;
43 }
44
48 public int Days => this.days;
49
53 public string PropertyName => this.propertyName;
54 }
55}
This attribute defines that objects of this type can be archived, and the time objects can be archive...
ArchivingTimeAttribute()
This attribute defines objects of this type can be archived, and that there is no time limit for how ...
ArchivingTimeAttribute(int Days)
This attribute defines that objects of this type can be archived, and that there is a time limit for ...
ArchivingTimeAttribute(string PropertyName)
This attribute defines that objects of this type can be archived, and that there is a time limit for ...
int Days
Number of days to archive objects of this type. If equal to int.MaxValue, no limit is defined.
string PropertyName
A property on the object with this name defines the number of days to archive the object....