コード例 #1
0
        public virtual IOrganizationState ToOrganizationState()
        {
            var state = new OrganizationState(true);

            state.OrganizationId = this.OrganizationId;
            state.Name           = this.Name;
            state.Description    = this.Description;
            state.Type           = this.Type;
            if (this.IsSummary != null && this.IsSummary.HasValue)
            {
                state.IsSummary = this.IsSummary.Value;
            }
            if (this.Active != null && this.Active.HasValue)
            {
                state.Active = this.Active.Value;
            }
            if (this.Version != null && this.Version.HasValue)
            {
                state.Version = this.Version.Value;
            }
            state.CreatedBy = this.CreatedBy;
            if (this.CreatedAt != null && this.CreatedAt.HasValue)
            {
                state.CreatedAt = this.CreatedAt.Value;
            }
            state.UpdatedBy = this.UpdatedBy;
            if (this.UpdatedAt != null && this.UpdatedAt.HasValue)
            {
                state.UpdatedAt = this.UpdatedAt.Value;
            }

            return(state);
        }
コード例 #2
0
 public static CreateOrganization ToCreateOrganization(this OrganizationState state)
 {
     return(state.ToCreateOrganization <CreateOrganization>());
 }
コード例 #3
0
 public static DeleteOrganization ToDeleteOrganization(this OrganizationState state)
 {
     return(state.ToDeleteOrganization <DeleteOrganization>());
 }
コード例 #4
0
 public static MergePatchOrganization ToMergePatchOrganization(this OrganizationState state)
 {
     return(state.ToMergePatchOrganization <MergePatchOrganization>());
 }
コード例 #5
0
 public static IOrganizationCommand ToCreateOrMergePatchOrganization(this OrganizationState state)
 {
     return(state.ToCreateOrMergePatchOrganization <CreateOrganization, MergePatchOrganization>());
 }