Exemplo n.º 1
0
 public CalendarShared(Tenant tenant, CalendarId calendarId, string name, CalendarSharer sharedWith)
 {
     this.Tenant = tenant;
     this.CalendarId = calendarId;
     this.Name = name;
     this.SharedWith = sharedWith;
 }
Exemplo n.º 2
0
 public void ShareCalendarWith(CalendarSharer calendarSharer)
 {
     AssertionConcern.NotNull(calendarSharer, "The calendar sharer must be provided.");
     if(!this._sharedWith.Contains(calendarSharer)) {
         this.Apply(new CalendarShared(this._tenantId, this._calendarId, this._name, calendarSharer));
     }
 }
        public CalendarUnhared(TenantId tenantId, CalendarId calendarId, string name, CalendarSharer unsharedWith)
        {
            this.TenantId = tenantId;
            this.CalendarId = calendarId;
            this.Name = name;
            this.UnsharedWith = unsharedWith;

            this.EventVersion = 1;
            this.OccurredOn = DateTime.Now;
        }
Exemplo n.º 4
0
 public void UnshareCalendarWith(CalendarSharer calendarSharer)
 {
     AssertionConcern.AssertArgumentNotNull(calendarSharer, "The calendar sharer must be provided.");
     if (this.sharedWith.Contains(calendarSharer))
     {
         Apply(new CalendarUnshared(this.tenant, this.calendarId, this.name, calendarSharer));
     }
 }