├── .gitattributes
├── .gitignore
├── IDDD_Samples.sln
├── IDDD_Samples.sln.DotSettings
├── LICENSE.txt
├── README.txt
├── Settings.StyleCop
├── iddd_agilepm
├── AgilePM.csproj
├── Application
│ ├── ApplicationServiceLifeCycle.cs
│ ├── Notifications
│ │ └── NotificationApplicationService.cs
│ ├── Processes
│ │ └── ProcessApplicationService.cs
│ ├── Products
│ │ ├── BacklogItems
│ │ │ └── BacklogItemApplicationService.cs
│ │ ├── InitiateDiscussionCommand.cs
│ │ ├── NewProductCommand.cs
│ │ ├── ProductApplicationService.cs
│ │ ├── RequestProductDiscussionCommand.cs
│ │ ├── RetryProductDiscussionRequestCommand.cs
│ │ ├── StartDiscussionInitiationCommand.cs
│ │ └── TimeOutProductDiscussionRequestCommand.cs
│ ├── Sprints
│ │ ├── CommitBacklogItemToSprintCommand.cs
│ │ └── SprintApplicationService.cs
│ └── Teams
│ │ ├── ChangeTeamMemberEmailAddressCommand.cs
│ │ ├── ChangeTeamMemberNameCommand.cs
│ │ ├── DisableMemberCommand.cs
│ │ ├── DisableProductOwnerCommand.cs
│ │ ├── DisableTeamMemberCommand.cs
│ │ ├── EnableMemberCommand.cs
│ │ ├── EnableProductOwnerCommand.cs
│ │ ├── EnableTeamMemberCommand.cs
│ │ └── TeamApplicationService.cs
├── Domain.Model
│ ├── Discussions
│ │ ├── DiscussionAvailability.cs
│ │ └── DiscussionDescriptor.cs
│ ├── Products
│ │ ├── BacklogItems
│ │ │ ├── BacklogItem.cs
│ │ │ ├── BacklogItemCategoryChanged.cs
│ │ │ ├── BacklogItemCommitted.cs
│ │ │ ├── BacklogItemDiscussion.cs
│ │ │ ├── BacklogItemDiscussionInitiated.cs
│ │ │ ├── BacklogItemDiscussionRequested.cs
│ │ │ ├── BacklogItemId.cs
│ │ │ ├── BacklogItemMarkedAsRemoved.cs
│ │ │ ├── BacklogItemScheduled.cs
│ │ │ ├── BacklogItemStatus.cs
│ │ │ ├── BacklogItemStatusChanged.cs
│ │ │ ├── BacklogItemStoryPointsAssigned.cs
│ │ │ ├── BacklogItemStoryTold.cs
│ │ │ ├── BacklogItemSummarized.cs
│ │ │ ├── BacklogItemType.cs
│ │ │ ├── BacklogItemTypeChanged.cs
│ │ │ ├── BacklogItemUncommitted.cs
│ │ │ ├── BacklogItemUnscheduled.cs
│ │ │ ├── BusinessPriority.cs
│ │ │ ├── BusinessPriorityAssigned.cs
│ │ │ ├── BusinessPriorityRatings.cs
│ │ │ ├── BusinessPriorityTotals.cs
│ │ │ ├── EstimationLogEntry.cs
│ │ │ ├── IBacklogItemRepository.cs
│ │ │ ├── StoryPoints.cs
│ │ │ ├── Task.cs
│ │ │ ├── TaskDefined.cs
│ │ │ ├── TaskDescribed.cs
│ │ │ ├── TaskHoursRemainingEstimated.cs
│ │ │ ├── TaskId.cs
│ │ │ ├── TaskRemoved.cs
│ │ │ ├── TaskRenamed.cs
│ │ │ ├── TaskStatus.cs
│ │ │ ├── TaskStatusChanged.cs
│ │ │ └── TaskVolunteerAssigned.cs
│ │ ├── IProductRepository.cs
│ │ ├── Product.cs
│ │ ├── ProductBacklogItem.cs
│ │ ├── ProductBacklogItemPlanned.cs
│ │ ├── ProductCreated.cs
│ │ ├── ProductDiscussion.cs
│ │ ├── ProductDiscussionInitiated.cs
│ │ ├── ProductDiscussionRequestTimedOut.cs
│ │ ├── ProductDiscussionRequested.cs
│ │ ├── ProductId.cs
│ │ ├── ProductReleaseScheduled.cs
│ │ ├── ProductSprintScheduled.cs
│ │ ├── Releases
│ │ │ ├── IReleaseRepository.cs
│ │ │ ├── Release.cs
│ │ │ ├── ReleaseId.cs
│ │ │ └── ScheduledBacklogItem.cs
│ │ └── Sprints
│ │ │ ├── CommittedBacklogItem.cs
│ │ │ ├── ISprintRepository.cs
│ │ │ ├── Sprint.cs
│ │ │ └── SprintId.cs
│ ├── Teams
│ │ ├── IProductOwnerRepository.cs
│ │ ├── ITeamMemberRepository.cs
│ │ ├── ITeamRepository.cs
│ │ ├── Member.cs
│ │ ├── MemberChangeTracker.cs
│ │ ├── ProductOwner.cs
│ │ ├── ProductOwnerId.cs
│ │ ├── Team.cs
│ │ ├── TeamMember.cs
│ │ └── TeamMemberId.cs
│ └── Tenants
│ │ └── TenantId.cs
├── IDDD.AgilePM.nuspec
├── Properties
│ └── AssemblyInfo.cs
├── Settings.StyleCop
└── packages.config
├── iddd_collaboration
├── Application
│ ├── Calendars
│ │ ├── CalendarApplicationService.cs
│ │ ├── CalendarEntryApplicationService.cs
│ │ ├── CalendarEntryQueryService.cs
│ │ ├── CalendarQueryService.cs
│ │ └── Data
│ │ │ ├── CalendarData.cs
│ │ │ ├── CalendarEntryData.cs
│ │ │ ├── CalendarEntryInviteeData.cs
│ │ │ ├── CalendarSharerData.cs
│ │ │ └── ICalendarCommandResult.cs
│ └── Forums
│ │ ├── Data
│ │ ├── DiscussionData.cs
│ │ ├── DiscussionPostsData.cs
│ │ ├── ForumData.cs
│ │ ├── ForumDiscussionsData.cs
│ │ ├── IDiscussionCommandResult.cs
│ │ ├── IForumCommandResult.cs
│ │ └── PostData.cs
│ │ ├── DiscussionApplicationService.cs
│ │ ├── DiscussionQueryService.cs
│ │ ├── ForumApplicationService.cs
│ │ ├── ForumQueryService.cs
│ │ ├── PostApplicationService.cs
│ │ └── PostQueryService.cs
├── Collaboration.csproj
├── Domain.Model
│ ├── Calendars
│ │ ├── Alarm.cs
│ │ ├── AlarmUnitsType.cs
│ │ ├── Calendar.cs
│ │ ├── CalendarCreated.cs
│ │ ├── CalendarDescriptionChanged.cs
│ │ ├── CalendarEntry.cs
│ │ ├── CalendarEntryDescriptionChanged.cs
│ │ ├── CalendarEntryId.cs
│ │ ├── CalendarEntryParticipantInvited.cs
│ │ ├── CalendarEntryParticipantUninvited.cs
│ │ ├── CalendarEntryRelocated.cs
│ │ ├── CalendarEntryRescheduled.cs
│ │ ├── CalendarEntryScheduled.cs
│ │ ├── CalendarId.cs
│ │ ├── CalendarIdentityService.cs
│ │ ├── CalendarRenamed.cs
│ │ ├── CalendarShared.cs
│ │ ├── CalendarSharer.cs
│ │ ├── CalendarUnshared.cs
│ │ ├── DateRange.cs
│ │ ├── ICalendarEntryRepository.cs
│ │ ├── ICalendarRepository.cs
│ │ ├── RepeatType.cs
│ │ └── Repetition.cs
│ ├── Collaborators
│ │ ├── Author.cs
│ │ ├── Collaborator .cs
│ │ ├── Creator.cs
│ │ ├── ICollaboratorService.cs
│ │ ├── Moderator.cs
│ │ ├── Owner.cs
│ │ └── Participant.cs
│ ├── Forums
│ │ ├── Discussion.cs
│ │ ├── DiscussionClosed.cs
│ │ ├── DiscussionId.cs
│ │ ├── DiscussionReopened.cs
│ │ ├── DiscussionStarted.cs
│ │ ├── Forum.cs
│ │ ├── ForumClosed.cs
│ │ ├── ForumDescriptionChanged.cs
│ │ ├── ForumId.cs
│ │ ├── ForumIdentityService.cs
│ │ ├── ForumModeratorChanged.cs
│ │ ├── ForumReopened.cs
│ │ ├── ForumStarted.cs
│ │ ├── ForumSubjectChanged.cs
│ │ ├── IDiscussionRepository.cs
│ │ ├── IForumRepository.cs
│ │ ├── IPostRepository.cs
│ │ ├── Post.cs
│ │ ├── PostContentAltered.cs
│ │ ├── PostId.cs
│ │ └── PostedToDiscussion.cs
│ └── Tenants
│ │ └── Tenant.cs
├── IDDD.Collaboration.nuspec
├── Properties
│ └── AssemblyInfo.cs
├── Settings.StyleCop
└── packages.config
├── iddd_common
├── Common.csproj
├── Domain.Model
│ ├── AssertionConcern.cs
│ ├── DomainEventPublisher.cs
│ ├── Entity.cs
│ ├── EventSourcedRootEntity.cs
│ ├── HashCodeHelper.cs
│ ├── IDomainEvent.cs
│ ├── IDomainEventSubscriber.cs
│ ├── IIdentity.cs
│ ├── Identity.cs
│ ├── LongRunningProcess
│ │ ├── IProcess.cs
│ │ ├── ITimeConstrainedProcessTrackerRepository.cs
│ │ ├── ProcessId.cs
│ │ ├── ProcessTimedOut.cs
│ │ └── TimeConstrainedProcessTracker.cs
│ └── ValueObject.cs
├── Events
│ ├── EventSerializer.cs
│ ├── IEventStore.cs
│ └── StoredEvent.cs
├── IDDD.Common.nuspec
├── Notifications
│ ├── INotificationPublisher.cs
│ ├── Notification.cs
│ ├── NotificationLog.cs
│ ├── NotificationLogFactory.cs
│ ├── NotificationLogId.cs
│ └── NotificationLogInfo.cs
├── Port.Adapters
│ └── Persistence
│ │ ├── AbstractQueryService.cs
│ │ ├── JoinOn.cs
│ │ └── ResultSetObjectMapper.cs
├── Properties
│ └── AssemblyInfo.cs
├── Settings.StyleCop
├── packages.config
└── packages.config.orig
└── iddd_identityaccess
├── Application
├── AccessApplicationService.cs
├── Commands
│ ├── ActivateTenantCommand.cs
│ ├── AddGroupToGroupCommand.cs
│ ├── AddUserToGroupCommand.cs
│ ├── AssignUserToGroupCommand.cs
│ ├── AssignUserToRoleCommand.cs
│ ├── AuthenticateUserCommand.cs
│ ├── ChangeContactInfoCommand.cs
│ ├── ChangeEmailAddressCommand.cs
│ ├── ChangePostalAddressCommand.cs
│ ├── ChangePrimaryTelephoneCommand.cs
│ ├── ChangeSecondaryTelephoneCommand.cs
│ ├── ChangeUserPasswordCommand.cs
│ ├── ChangeUserPersonalNameCommand.cs
│ ├── DeactivateTenantCommand.cs
│ ├── DefineUserEnablementCommand.cs
│ ├── ProvisionGroupCommand.cs
│ ├── ProvisionRoleCommand.cs
│ ├── ProvisionTenantCommand.cs
│ ├── RegisterUserCommand.cs
│ ├── RemoveGroupFromGroupCommand.cs
│ └── RemoveUserFromGroupCommand.cs
├── IdentityAccessEventProcessor.cs
├── IdentityApplicationService.cs
└── NotificationApplicationService.cs
├── Domain.Model
├── Access
│ ├── AuthorizationService.cs
│ ├── GroupAssignedToRole.cs
│ ├── GroupUnassignedFromRole.cs
│ ├── IRoleRepository.cs
│ ├── Role.cs
│ ├── RoleProvisioned.cs
│ ├── UserAssginedToRole.cs
│ └── UserUnassignedFromRole.cs
├── DomainRegistry.cs
├── DomainServices.cd
├── EntitiesAndRepositories.cd
└── Identity
│ ├── AuthenticationService.cs
│ ├── ContactInformation.cs
│ ├── EmailAddress.cs
│ ├── Enablement.cs
│ ├── FullName.cs
│ ├── Group.cs
│ ├── GroupGroupAdded.cs
│ ├── GroupGroupRemoved.cs
│ ├── GroupMember.cs
│ ├── GroupMemberService.cs
│ ├── GroupMemberType.cs
│ ├── GroupProvisioned.cs
│ ├── GroupUserAdded.cs
│ ├── GroupUserRemoved.cs
│ ├── IEncryptionService.cs
│ ├── IGroupRepository.cs
│ ├── ITenantRepository.cs
│ ├── IUserRepository.cs
│ ├── InvitationDescriptor.cs
│ ├── PasswordService.cs
│ ├── Person.cs
│ ├── PersonContactInformationChanged.cs
│ ├── PersonNameChanged.cs
│ ├── PostalAddress.cs
│ ├── RegistrationInvitation.cs
│ ├── Telephone.cs
│ ├── Tenant.cs
│ ├── TenantActivated.cs
│ ├── TenantAdministratorRegistered.cs
│ ├── TenantDeactivated.cs
│ ├── TenantId.cs
│ ├── TenantProvisioned.cs
│ ├── TenantProvisioningService.cs
│ ├── User.cs
│ ├── UserDescriptor.cs
│ ├── UserEnablementChanged.cs
│ ├── UserPasswordChanged.cs
│ └── UserRegistered.cs
├── IDDD.IdentityAccess.nuspec
├── IdentityAccess.csproj
├── Infrastructure
└── Services
│ └── MD5EncryptionService.cs
├── Properties
└── AssemblyInfo.cs
├── Settings.StyleCop
└── packages.config
/LICENSE.txt:
--------------------------------------------------------------------------------
1 | // Copyright 2012,2013 Vaughn Vernon
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 |
--------------------------------------------------------------------------------
/README.txt:
--------------------------------------------------------------------------------
1 | These are the sample Bounded Contexts for C#.NET from the book "Implementing Domain-Driven Design" by Vaughn Vernon: http://vaughnvernon.co/?page_id=168
2 |
3 | Java Samples: https://github.com/VaughnVernon/IDDD_Samples
4 |
5 | NOTE: These are currently an early work in progress. It's
6 | been pushed here so contributors can create pull requests,
7 | etc.
8 |
9 | Please don't complain unless you are willing to help ;)
10 |
11 | Vaughn
--------------------------------------------------------------------------------
/iddd_agilepm/Application/ApplicationServiceLifeCycle.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace SaaSOvation.AgilePM.Application
7 | {
8 | ///
9 | /// TODO: implement
10 | ///
11 | public class ApplicationServiceLifeCycle
12 | {
13 | public static void Begin(bool isListening = true)
14 | {
15 |
16 | }
17 |
18 | public static void Fail(Exception ex = null)
19 | {
20 |
21 | }
22 |
23 | public static void Success()
24 | {
25 |
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/iddd_agilepm/Application/Notifications/NotificationApplicationService.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | using SaaSOvation.Common.Notifications;
7 |
8 | namespace SaaSOvation.AgilePM.Application.Notifications
9 | {
10 | public class NotificationApplicationService
11 | {
12 | public NotificationApplicationService(INotificationPublisher notificationPublisher)
13 | {
14 | this.notificationPublisher = notificationPublisher;
15 | }
16 |
17 | readonly INotificationPublisher notificationPublisher;
18 |
19 | public void PublishNotifications()
20 | {
21 | ApplicationServiceLifeCycle.Begin(false);
22 | try
23 | {
24 | this.notificationPublisher.PublishNotifications();
25 | ApplicationServiceLifeCycle.Success();
26 | }
27 | catch (Exception ex)
28 | {
29 | ApplicationServiceLifeCycle.Fail(ex);
30 | }
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/iddd_agilepm/Application/Processes/ProcessApplicationService.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | using SaaSOvation.Common.Domain.Model.LongRunningProcess;
7 |
8 | namespace SaaSOvation.AgilePM.Application.Processes
9 | {
10 | public class ProcessApplicationService
11 | {
12 | public ProcessApplicationService(ITimeConstrainedProcessTrackerRepository processTrackerRepository)
13 | {
14 | this.processTrackerRepository = processTrackerRepository;
15 | }
16 |
17 | readonly ITimeConstrainedProcessTrackerRepository processTrackerRepository;
18 |
19 | public void CheckForTimedOutProccesses()
20 | {
21 | ApplicationServiceLifeCycle.Begin();
22 | try
23 | {
24 | var trackers = this.processTrackerRepository.GetAllTimedOut();
25 |
26 | foreach (var tracker in trackers)
27 | {
28 | tracker.InformProcessTimedOut();
29 | this.processTrackerRepository.Save(tracker);
30 | }
31 |
32 | ApplicationServiceLifeCycle.Success();
33 | }
34 | catch (Exception ex)
35 | {
36 | ApplicationServiceLifeCycle.Fail(ex);
37 | }
38 | }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/iddd_agilepm/Application/Products/BacklogItems/BacklogItemApplicationService.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | using SaaSOvation.AgilePM.Domain.Model.Products.BacklogItems;
7 |
8 | namespace SaaSOvation.AgilePM.Application.Products.BacklogItems
9 | {
10 | public class BacklogItemApplicationService
11 | {
12 | public BacklogItemApplicationService(IBacklogItemRepository backlogItemRepository)
13 | {
14 | this.backlogItemRepository = backlogItemRepository;
15 | }
16 |
17 | readonly IBacklogItemRepository backlogItemRepository;
18 |
19 | // TODO: APIs for student assignment
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/iddd_agilepm/Application/Products/InitiateDiscussionCommand.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace SaaSOvation.AgilePM.Application.Products
7 | {
8 | public class InitiateDiscussionCommand
9 | {
10 | public InitiateDiscussionCommand()
11 | {
12 | }
13 |
14 | public InitiateDiscussionCommand(string tenantId, string discussionId, string productId)
15 | {
16 | this.TenantId = tenantId;
17 | this.DiscussionId = discussionId;
18 | this.ProductId = productId;
19 | }
20 |
21 | public string TenantId { get; set; }
22 |
23 | public string DiscussionId { get; set; }
24 |
25 | public string ProductId { get; set; }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/iddd_agilepm/Application/Products/NewProductCommand.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace SaaSOvation.AgilePM.Application.Products
7 | {
8 | public class NewProductCommand
9 | {
10 | public NewProductCommand()
11 | {
12 | }
13 |
14 | public NewProductCommand(string tenantId, string productOwnerId, string name, string description)
15 | {
16 | this.TenantId = tenantId;
17 | this.ProductOwnerId = productOwnerId;
18 | this.Name = name;
19 | this.Description = description;
20 | }
21 |
22 | public string TenantId { get; set; }
23 |
24 | public string ProductOwnerId { get; set; }
25 |
26 | public string Name { get; set; }
27 |
28 | public string Description { get; set; }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/iddd_agilepm/Application/Products/RequestProductDiscussionCommand.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace SaaSOvation.AgilePM.Application.Products
7 | {
8 | public class RequestProductDiscussionCommand
9 | {
10 | public RequestProductDiscussionCommand()
11 | {
12 | }
13 |
14 | public RequestProductDiscussionCommand(string tenantId, string productId)
15 | {
16 | this.TenantId = tenantId;
17 | this.ProductId = productId;
18 | }
19 |
20 | public string TenantId { get; set; }
21 |
22 | public string ProductId { get; set; }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/iddd_agilepm/Application/Products/RetryProductDiscussionRequestCommand.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace SaaSOvation.AgilePM.Application.Products
7 | {
8 | public class RetryProductDiscussionRequestCommand
9 | {
10 | public RetryProductDiscussionRequestCommand()
11 | {
12 | }
13 |
14 | public RetryProductDiscussionRequestCommand(string tenantId, string processId)
15 | {
16 | this.TenantId = tenantId;
17 | this.ProcessId = processId;
18 | }
19 |
20 | public string TenantId { get; set; }
21 |
22 | public string ProcessId { get; set; }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/iddd_agilepm/Application/Products/StartDiscussionInitiationCommand.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace SaaSOvation.AgilePM.Application.Products
7 | {
8 | public class StartDiscussionInitiationCommand
9 | {
10 | public StartDiscussionInitiationCommand()
11 | {
12 | }
13 |
14 | public StartDiscussionInitiationCommand(string tenantId, string productId)
15 | {
16 | this.TenantId = tenantId;
17 | this.ProductId = productId;
18 | }
19 |
20 | public string TenantId { get; set; }
21 |
22 | public string ProductId { get; set; }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/iddd_agilepm/Application/Products/TimeOutProductDiscussionRequestCommand.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace SaaSOvation.AgilePM.Application.Products
7 | {
8 | public class TimeOutProductDiscussionRequestCommand
9 | {
10 | public TimeOutProductDiscussionRequestCommand()
11 | {
12 | }
13 |
14 | public TimeOutProductDiscussionRequestCommand(string tenantId, string processId, DateTime timeOutDate)
15 | {
16 | this.TenantId = tenantId;
17 | this.ProcessId = processId;
18 | this.TimeOutDate = timeOutDate;
19 | }
20 |
21 | public string TenantId { get; set; }
22 |
23 | public string ProcessId { get; set; }
24 |
25 | public DateTime TimeOutDate { get; set; }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/iddd_agilepm/Application/Sprints/CommitBacklogItemToSprintCommand.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace SaaSOvation.AgilePM.Application.Sprints
7 | {
8 | public class CommitBacklogItemToSprintCommand
9 | {
10 | public CommitBacklogItemToSprintCommand()
11 | {
12 | }
13 |
14 | public CommitBacklogItemToSprintCommand(string tenantId, string backlogItemId, string sprintId)
15 | {
16 | this.TenantId = tenantId;
17 | this.BacklogItemId = backlogItemId;
18 | this.SprintId = sprintId;
19 | }
20 |
21 | public string TenantId { get; set; }
22 | public string BacklogItemId { get; set; }
23 | public string SprintId { get; set;}
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/iddd_agilepm/Application/Sprints/SprintApplicationService.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | using SaaSOvation.AgilePM.Domain.Model.Products.BacklogItems;
7 | using SaaSOvation.AgilePM.Domain.Model.Products.Sprints;
8 | using SaaSOvation.AgilePM.Domain.Model.Tenants;
9 |
10 | namespace SaaSOvation.AgilePM.Application.Sprints
11 | {
12 | public class SprintApplicationService
13 | {
14 | public SprintApplicationService(ISprintRepository sprintRepository, IBacklogItemRepository backlogItemRepository)
15 | {
16 | this.sprintRepository = sprintRepository;
17 | this.backlogItemRepository = backlogItemRepository;
18 | }
19 |
20 | readonly ISprintRepository sprintRepository;
21 | readonly IBacklogItemRepository backlogItemRepository;
22 |
23 | public void CommitBacklogItemToSprint(CommitBacklogItemToSprintCommand command)
24 | {
25 | var tenantId = new TenantId(command.TenantId);
26 | var sprint = this.sprintRepository.Get(tenantId, new SprintId(command.SprintId));
27 | var backlogItem = this.backlogItemRepository.Get(tenantId, new BacklogItemId(command.BacklogItemId));
28 |
29 | sprint.Commit(backlogItem);
30 |
31 | this.sprintRepository.Save(sprint);
32 | }
33 |
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/iddd_agilepm/Application/Teams/ChangeTeamMemberEmailAddressCommand.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace SaaSOvation.AgilePM.Application.Teams
7 | {
8 | public class ChangeTeamMemberEmailAddressCommand
9 | {
10 | public ChangeTeamMemberEmailAddressCommand()
11 | {
12 | }
13 |
14 | public ChangeTeamMemberEmailAddressCommand(string tenantId, string username, string emailAddress, DateTime occurredOn)
15 | {
16 | this.TenantId = tenantId;
17 | this.Username = username;
18 | this.EmailAddress = emailAddress;
19 | this.OccurredOn = occurredOn;
20 | }
21 |
22 | public string TenantId { get; set; }
23 | public string Username { get; set; }
24 | public string EmailAddress { get; set; }
25 | public DateTime OccurredOn { get; set; }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/iddd_agilepm/Application/Teams/ChangeTeamMemberNameCommand.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace SaaSOvation.AgilePM.Application.Teams
7 | {
8 | public class ChangeTeamMemberNameCommand
9 | {
10 | public ChangeTeamMemberNameCommand()
11 | {
12 | }
13 |
14 | public ChangeTeamMemberNameCommand(string tenantId, string username, string firstName, string lastName, DateTime occurredOn)
15 | {
16 | this.TenantId = tenantId;
17 | this.Username = username;
18 | this.FirstName = firstName;
19 | this.LastName = lastName;
20 | this.OccurredOn = occurredOn;
21 | }
22 |
23 | public string TenantId { get; set; }
24 | public string Username { get; set; }
25 | public string FirstName { get; set; }
26 | public string LastName { get; set; }
27 | public DateTime OccurredOn { get; set; }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/iddd_agilepm/Application/Teams/DisableMemberCommand.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace SaaSOvation.AgilePM.Application.Teams
7 | {
8 | public class DisableMemberCommand
9 | {
10 | public DisableMemberCommand()
11 | {
12 | }
13 |
14 | public DisableMemberCommand(string tenantId, string username, DateTime occurredOn)
15 | {
16 | this.TenantId = tenantId;
17 | this.Username = username;
18 | this.OccurredOn = occurredOn;
19 | }
20 |
21 | public string TenantId { get; set; }
22 | public string Username { get; set; }
23 | public DateTime OccurredOn { get; set; }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/iddd_agilepm/Application/Teams/DisableProductOwnerCommand.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace SaaSOvation.AgilePM.Application.Teams
7 | {
8 | public class DisableProductOwnerCommand : DisableMemberCommand
9 | {
10 | public DisableProductOwnerCommand()
11 | {
12 | }
13 |
14 | public DisableProductOwnerCommand(string tenantId, string username, DateTime occurredOn)
15 | : base(tenantId, username, occurredOn)
16 | {
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/iddd_agilepm/Application/Teams/DisableTeamMemberCommand.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace SaaSOvation.AgilePM.Application.Teams
7 | {
8 | public class DisableTeamMemberCommand : DisableMemberCommand
9 | {
10 | public DisableTeamMemberCommand()
11 | {
12 | }
13 |
14 | public DisableTeamMemberCommand(string tenantId, string username, DateTime occurredOn)
15 | : base(tenantId, username, occurredOn)
16 | {
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/iddd_agilepm/Application/Teams/EnableMemberCommand.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace SaaSOvation.AgilePM.Application.Teams
7 | {
8 | public class EnableMemberCommand
9 | {
10 | public EnableMemberCommand()
11 | {
12 | }
13 |
14 | public EnableMemberCommand(string tenantId, string username, string firstName, string lastName, string emailAddress, DateTime occurredOn)
15 | {
16 | this.TenantId = tenantId;
17 | this.Username = username;
18 | this.FirstName = firstName;
19 | this.LastName = lastName;
20 | this.EmailAddress = emailAddress;
21 | this.OccurredOn = occurredOn;
22 | }
23 |
24 | public string TenantId { get; set; }
25 | public string Username { get; set; }
26 | public string FirstName { get; set; }
27 | public string LastName { get; set; }
28 | public string EmailAddress { get; set; }
29 | public DateTime OccurredOn { get; set; }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/iddd_agilepm/Application/Teams/EnableProductOwnerCommand.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace SaaSOvation.AgilePM.Application.Teams
7 | {
8 | public class EnableProductOwnerCommand : EnableMemberCommand
9 | {
10 | public EnableProductOwnerCommand()
11 | {
12 | }
13 |
14 | public EnableProductOwnerCommand(string tenantId, string username, string firstName, string lastName, string emailAddress, DateTime occurredOn)
15 | : base(tenantId, username, firstName, lastName, emailAddress, occurredOn)
16 | {
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/iddd_agilepm/Application/Teams/EnableTeamMemberCommand.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace SaaSOvation.AgilePM.Application.Teams
7 | {
8 | public class EnableTeamMemberCommand : EnableMemberCommand
9 | {
10 | public EnableTeamMemberCommand()
11 | {
12 | }
13 |
14 | public EnableTeamMemberCommand(string tenantId, string username, string firstName, string lastName, string emailAddress, DateTime occurredOn)
15 | : base(tenantId, username, firstName, lastName, emailAddress, occurredOn)
16 | {
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/iddd_agilepm/Domain.Model/Discussions/DiscussionAvailability.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2012,2013 Vaughn Vernon
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace SaaSOvation.AgilePM.Domain.Model.Discussions
16 | {
17 | public enum DiscussionAvailability
18 | {
19 | AddOnNotEnabled,
20 | Failed,
21 | NotRequested,
22 | Requested,
23 | Ready
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/iddd_agilepm/Domain.Model/Discussions/DiscussionDescriptor.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2012,2013 Vaughn Vernon
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | namespace SaaSOvation.AgilePM.Domain.Model.Discussions
16 | {
17 | public class DiscussionDescriptor : SaaSOvation.Common.Domain.Model.ValueObject
18 | {
19 | public const string UNDEFINED_ID = "UNDEFINED";
20 |
21 | public DiscussionDescriptor(string id)
22 | {
23 | this.Id = id;
24 | }
25 |
26 | public DiscussionDescriptor(DiscussionDescriptor discussionDescriptor)
27 | : this(discussionDescriptor.Id)
28 | {
29 | }
30 |
31 | public string Id { get; private set; }
32 |
33 | public bool IsUndefined
34 | {
35 | get
36 | {
37 | return this.Id.Equals(UNDEFINED_ID);
38 | }
39 | }
40 |
41 | public override string ToString()
42 | {
43 | return "DiscussionDescriptor [id=" + Id + "]";
44 | }
45 |
46 | protected override System.Collections.Generic.IEnumerable