public MarkerRsponse RemoveMarker(MarkerRequestRemove request)
        {
            List <DocumentSharingDTO> shared   = default;
            List <string>             mylist   = new List <string>();
            MarkerRsponse             response = default;

            try
            {
                response = _dal.RemoveMarker(request);
                shared   = _documentSharingService.GetShareForDoc(new DocumentSharingRequestGetForDoc()
                {
                    DocID = request.DocID
                }).DocumentSharingDTO;
                if (shared != null)
                {
                    shared.ForEach(s => mylist.Add(s.UserId));

                    mylist.Remove(request.UserID);
                    _messanger.SendMarkerToAll(mylist, response);
                }
            }
            catch (Exception e)
            {
                //log
                response = new MarkerRsponseDontRemove();
                throw;
            }
            return(response);
        }
        public void RemoveMarker()
        {
            var req = new MarkerRequestRemove();

            req.MarkerId = new Guid("58EE74C3-0DFA-4BA9-A8F6-FAC6943DAF61")
            {
            };


            var res = _MarkerDal.RemoveMarker(req);

            Assert.IsInstanceOf(typeof(MarkerResponseRemoveOk), res);
        }
Ejemplo n.º 3
0
        public MarkerRsponse RemoveMarker(MarkerRequestRemove request)
        {
            MarkerRsponse response = default;

            try
            {
                response = _dal.RemoveMarker(request);
            }
            catch (Exception e)
            {
                //log
                response = new MarkerRsponseDontRemove();
                throw;
            }
            return(response);
        }