Esempio n. 1
0
 public void SetOwnershipAt(int index, ReadOwner id)
 {
     if (GetCount() <= index)
     {
         return;
     }
     accessControl[index] = id;
 }
Esempio n. 2
0
    public bool CanAccessAt(int index, ReadOwner id)
    {
        if (GetCount() <= index)
        {
            return(false);
        }
        switch (accessControl[index])
        {
        case ReadOwner.Distrust:
            return(true);

        case ReadOwner.Boss:
            return(id == ReadOwner.Boss);

        default:
            return(false);
        }
    }