Esempio n. 1
0
        /// <summary>
        /// このインスタンスを、それと同等なUtility.Models.Entites.DtDiskDrive型に変換する。
        /// </summary>
        /// <returns></returns>
        public Utility.Models.Entites.DtDiskDrive ToModel()
        {
            Utility.Models.Entites.DtDiskDrive model = ToModelCommonPart();
            model.DtDevice = this.DeviceS?.ToParentModel(this.GetType());

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

            return(model);
        }
Esempio n. 3
0
 /// <summary>
 /// このインスタンスを、それと同等なUtility.Models.Entites.DtDiskDrive型に変換する。
 /// 各変換メソッド共通部分
 /// </summary>
 /// <returns></returns>
 private Utility.Models.Entites.DtDiskDrive ToModelCommonPart()
 {
     Utility.Models.Entites.DtDiskDrive model = new Utility.Models.Entites.DtDiskDrive();
     model.Sid                = this.Sid;
     model.DeviceSid          = this.DeviceSid;
     model.SourceEquipmentUid = this.SourceEquipmentUid;
     model.Model              = this.Model;
     model.MediaType          = this.MediaType;
     model.InterfaceType      = this.InterfaceType;
     model.SerialNumber       = this.SerialNumber;
     model.SmartAttributeInfo = this.SmartAttributeInfo;
     model.CollectDatetime    = this.CollectDatetime;
     model.MessageId          = this.MessageId;
     model.CreateDatetime     = this.CreateDatetime;
     return(model);
 }
Esempio n. 4
0
 /// <summary>
 /// コンストラクタ
 /// </summary>
 /// <param name="model">Utility.Models.Entites.DtDiskDriveのインスタンス</param>
 public DtDiskDrive(Utility.Models.Entites.DtDiskDrive model)
 {
     this.Sid                = model.Sid;
     this.DeviceSid          = model.DeviceSid;
     this.SourceEquipmentUid = model.SourceEquipmentUid;
     this.Model              = model.Model;
     this.MediaType          = model.MediaType;
     this.InterfaceType      = model.InterfaceType;
     this.SerialNumber       = model.SerialNumber;
     this.SmartAttributeInfo = model.SmartAttributeInfo;
     this.CollectDatetime    = model.CollectDatetime;
     this.MessageId          = model.MessageId;
     this.CreateDatetime     = model.CreateDatetime;
     this.DeviceS            = model.DtDevice == null ?
                               null :
                               new DtDevice(model.DtDevice);
 }