Esempio n. 1
0
        /// <summary>
        /// Creates a new many-to-many relationship between a user and a resource.
        /// </summary>
        /// <param name="user">The involved user.</param>
        /// <param name="resource">The involved resource.</param>
        public UserResource(GirafUser user, Pictogram pictogram)
        {
            this.OtherKey     = user.Id;
            this.Other        = user;
            this.PictogramKey = pictogram.Id;
            this.Pictogram    = pictogram;

            pictogram.LastEdit = DateTime.Now;
            Other.Resources.Add(this);
            pictogram.Users.Add(this);
        }
Esempio n. 2
0
 public void AddGuardian(GirafUser guardian)
 {
     this.Guardians.Add(new GuardianRelation(guardian, this));
 }
Esempio n. 3
0
 public void AddCitizen(GirafUser citizen)
 {
     this.Citizens.Add(new GuardianRelation(this, citizen));
 }