Exemplo n.º 1
0
 /// <summary>
 /// 深度复制
 /// </summary>
 /// <returns></returns>
 private CameraPanelItem(Camera camera, CameraGroup cameraGroup, PlayContentType?playContent)
 {
     if (camera != null)
     {
         this.Camera = camera.Clone() as Camera;
     }
     if (cameraGroup != null)
     {
         this.CameraGroup = cameraGroup.Clone() as CameraGroup;
     }
     this.PlayType = playContent;
 }
Exemplo n.º 2
0
 /// <summary>
 /// 深度复制
 /// </summary>
 /// <returns></returns>
 private CameraPanelItem(Camera camera, CameraGroup cameraGroup, PlayContentType?playContent, List <string> rtspStrs, List <string> rtmpStrs)
 {
     if (camera != null)
     {
         this.Camera = camera.Clone() as Camera;
     }
     if (cameraGroup != null)
     {
         this.CameraGroup = cameraGroup.Clone() as CameraGroup;
     }
     this.PlayType = playContent;
     if (rtspStrs != null)
     {
         this.RtspStrs = JsonConvert.DeserializeObject <List <string> >(JsonConvert.SerializeObject(rtspStrs));
     }
     if (rtmpStrs != null)
     {
         this.RtmpStrs = JsonConvert.DeserializeObject <List <string> >(JsonConvert.SerializeObject(rtmpStrs));
     }
 }