Esempio n. 1
0
        public static ParticipationDto ToDto(this IParticipation self)
        {
            ParticipationDto outputData = new ParticipationDto
            {
                CostPrice1Day = self.CostPrice1Day,
                CostPrice20Day = self.CostPrice20Day,
                MainForceInflows = self.MainForceInflows,
                SuperLargeInflows = self.SuperLargeInflows,
                Time = self.Time,
                Value = self.Value,
            };

            return outputData;
        }
 public IEnumerable<ParticipationDto> Get(string stockCode)
 {
     #if DEBUG
     /*test code for communication*************************************/
     var dto = new ParticipationDto()
     {
         CostPrice1Day = 20,
         CostPrice20Day = 30,
         Time = new System.DateTime(1999, 9, 9, 9, 9, 9)
     };
     var result = new List<ParticipationDto>();
     result.Add(dto);
     return result;
     /*test code for communication*************************************/
     #else
     var appService = new ParticipationAppService();
     return appService.Get(stockCode).ToDto();
     #endif
 }