コード例 #1
0
 /// <summary>
 /// このインスタンスを、それと同等なUtility.Models.Entites.DtInstallResult型に変換する。
 /// 各変換メソッド共通部分
 /// </summary>
 /// <returns></returns>
 private Utility.Models.Entites.DtInstallResult ToModelCommonPart()
 {
     Utility.Models.Entites.DtInstallResult model = new Utility.Models.Entites.DtInstallResult();
     model.Sid                    = this.Sid;
     model.DeviceSid              = this.DeviceSid;
     model.DeliveryResultSid      = this.DeliveryResultSid;
     model.InstallResultStatusSid = this.InstallResultStatusSid;
     model.SourceEquipmentUid     = this.SourceEquipmentUid;
     model.ReleaseVersion         = this.ReleaseVersion;
     model.BeforeVersion          = this.BeforeVersion;
     model.AfterVervion           = this.AfterVervion;
     model.IsSuccess              = this.IsSuccess;
     model.ErrorCode              = this.ErrorCode;
     model.ErrorDescription       = this.ErrorDescription;
     model.IsAuto                 = this.IsAuto;
     model.Method                 = this.Method;
     model.Process                = this.Process;
     model.UpdateStratDatetime    = this.UpdateStratDatetime;
     model.UpdateEndDatetime      = this.UpdateEndDatetime;
     model.ComputerName           = this.ComputerName;
     model.IpAddress              = this.IpAddress;
     model.ServerClientKind       = this.ServerClientKind;
     model.HasRepairReport        = this.HasRepairReport;
     model.EventDatetime          = this.EventDatetime;
     model.CollectDatetime        = this.CollectDatetime;
     model.MessageId              = this.MessageId;
     model.CreateDatetime         = this.CreateDatetime;
     return(model);
 }
コード例 #2
0
        /// <summary>
        /// このインスタンスを、それと同等なUtility.Models.Entites.DtInstallResult型に変換する。
        /// 親エンティティとして生成するため、子エンティティの情報はもたない
        /// </summary>
        /// <returns></returns>
        public Utility.Models.Entites.DtInstallResult ToParentModel(Type childType)
        {
            Utility.Models.Entites.DtInstallResult model = ToModelCommonPart();
            model.DtDeliveryResult      = this.DeliveryResultS?.ToParentModel(this.GetType());
            model.DtDevice              = this.DeviceS?.ToParentModel(this.GetType());
            model.MtInstallResultStatus = this.InstallResultStatusS?.ToParentModel(this.GetType());

            return(model);
        }
コード例 #3
0
        /// <summary>
        /// このインスタンスを、それと同等なUtility.Models.Entites.DtInstallResult型に変換する。
        /// 子エンティティとして生成するため、親エンティティの情報をもたない
        /// </summary>
        /// <returns></returns>
        public Utility.Models.Entites.DtInstallResult ToChildModel(Type parentType)
        {
            Utility.Models.Entites.DtInstallResult model = ToModelCommonPart();
            // 親子間の参照無限ループを避けるためにタイプチェック
            if (this.DeliveryResultS?.GetType() != parentType)
            {
                model.DtDeliveryResult = this.DeliveryResultS?.ToParentModel(this.GetType());
            }
            if (this.DeviceS?.GetType() != parentType)
            {
                model.DtDevice = this.DeviceS?.ToParentModel(this.GetType());
            }
            if (this.InstallResultStatusS?.GetType() != parentType)
            {
                model.MtInstallResultStatus = this.InstallResultStatusS?.ToParentModel(this.GetType());
            }

            return(model);
        }
コード例 #4
0
 /// <summary>
 /// コンストラクタ
 /// </summary>
 /// <param name="model">Utility.Models.Entites.DtInstallResultのインスタンス</param>
 public DtInstallResult(Utility.Models.Entites.DtInstallResult model)
 {
     this.Sid                    = model.Sid;
     this.DeviceSid              = model.DeviceSid;
     this.DeliveryResultSid      = model.DeliveryResultSid;
     this.InstallResultStatusSid = model.InstallResultStatusSid;
     this.SourceEquipmentUid     = model.SourceEquipmentUid;
     this.ReleaseVersion         = model.ReleaseVersion;
     this.BeforeVersion          = model.BeforeVersion;
     this.AfterVervion           = model.AfterVervion;
     this.IsSuccess              = model.IsSuccess;
     this.ErrorCode              = model.ErrorCode;
     this.ErrorDescription       = model.ErrorDescription;
     this.IsAuto                 = model.IsAuto;
     this.Method                 = model.Method;
     this.Process                = model.Process;
     this.UpdateStratDatetime    = model.UpdateStratDatetime;
     this.UpdateEndDatetime      = model.UpdateEndDatetime;
     this.ComputerName           = model.ComputerName;
     this.IpAddress              = model.IpAddress;
     this.ServerClientKind       = model.ServerClientKind;
     this.HasRepairReport        = model.HasRepairReport;
     this.EventDatetime          = model.EventDatetime;
     this.CollectDatetime        = model.CollectDatetime;
     this.MessageId              = model.MessageId;
     this.CreateDatetime         = model.CreateDatetime;
     this.DeliveryResultS        = model.DtDeliveryResult == null ?
                                   null :
                                   new DtDeliveryResult(model.DtDeliveryResult);
     this.DeviceS = model.DtDevice == null ?
                    null :
                    new DtDevice(model.DtDevice);
     this.InstallResultStatusS = model.MtInstallResultStatus == null ?
                                 null :
                                 new MtInstallResultStatus(model.MtInstallResultStatus);
 }