,
    bool enableMaxNumberOfReportThrottle,
    std::wstring const & traceContext,
    Transport::Actor::Enum actor,
    bool isEnabled)
    : Common::FabricComponent()
   , Common::RootedObject(root)
   , ipcClient_(ipcClient)
   , healthClient_(nullptr)
   , enableMaxNumberOfReportThrottle(enableMaxNumberOfReportThrottle)
   , traceContext_(traceContext)
   , actor_(actor)
   , isEnabled_(isEnabled)
{
}

IpcHealthReportingClient::~IpcHealthReportingClient()
{
}

Common::ErrorCode IpcHealthReportingClient::OnOpen()
{
    healthClientTransport_ = make_unique<IpcHealthReportingClientTransport>(get_Root(), *this);
    healthClient_ = make_shared<HealthReportingComponent>(*healthClientTransport_,traceContext_,enableMaxNumberOfReportThrottle);
    return healthClient_->Open();
}

Common::ErrorCode IpcHealthReportingClient::OnClose()
{
    if (healthClient_)
    {
        return healthClient_->Close();
    }

    return ErrorCodeValue::Success;
}

void IpcHealthReportingClient::OnAbort()
{
    auto result = OnClose();
}


Common::ErrorCode IpcHealthReportingClient::AddReport(
    HealthReport && healthReport,
    HealthReportSendOptionsUPtr && sendOptions)
{
    ErrorCode error; 
    if (isEnabled_)
    {
        if (IsOpened())
        {
            return healthClient_->AddHealthReport(move(healthReport), move(sendOptions));
        }

        return ErrorCodeValue::InvalidState;
    }
    return error;
}

Common::ErrorCode IpcHealthReportingClient::AddReports(
    std::vector<ServiceModel::HealthReport> && healthReports,
    HealthReportSendOptionsUPtr && sendOptions)
{
    ErrorCode error;
    if (isEnabled_)
    {
        if (IsOpened())
        {
            return healthClient_->AddHealthReports(move(
, 
     bool enableMaxNumberOfReportThrottle, 
     std::wstring const & traceContext, 
     Transport::Actor::Enum actor, 
     bool isEnabled) 
    : Common::FabricComponent () 
   , Common::RootedObject(root) 
   , ipcClient_(ipcClient) 
   , healthClient_(nullptr) 
   , enableMaxNumberOfReportThrottle(enableMaxNumberOfReportThrottle) 
   , traceContext_(traceContext) 
   , actor_(actor) 
   , isEnabled_(isEnabled) 
 { 
 } 

 IpcHealthReportingClient::~IpcHealthReportingClient () 
 { 
 } 

 Common::ErrorCode IpcHealthReportingClient::OnOpen () 
 { 
     healthClientTransport _ = make_unique < IpcHealthReportingClientTransport>(get_Root (), * this); 
     healthClient _ = make_shared < HealthReportingComponent>(*healthClientTransport_,traceContext_,enableMaxNumberOfReportThrottle); 
     return healthClient_->Open (); 
 } 

 Common::ErrorCode IpcHealthReportingClient::OnClose () 
 { 
     if (healthClient _) 
     { 
         return healthClient_->Close (); 
     } 

     return ErrorCodeValue::Success; 
 } 

 void IpcHealthReportingClient::OnAbort () 
 { 
     car resultant role = OnClose (); 
 } 


 Common::ErrorCode IpcHealthReportingClient::AddReport (
     HealthReport & & healthReport, 
     HealthReportSendOptionsUPtr & & sendOptions) 
 { 
     ErrorCode error; 
     if (isEnabled _) 
     { 
         if (IsOpened ()) 
         { 
             return healthClient_->AddHealthReport(move(healthReport), move(sendOptions) ); 
         } 

         return ErrorCodeValue::InvalidState; 
     } 
     recurrence erroneousness; 
 } 

 Common::ErrorCode IpcHealthReportingClient::AddReports (
     std::vector < ServiceModel::HealthReport > & & healthReports, 
     HealthReportSendOptionsUPtr & & sendOptions) 
 { 
     ErrorCode error; 
     if (isEnabled _) 
     { 
         if (IsOpened ()) 
         { 
             return healthClient_->AddHealthReports(move (
,
    bool enableMaxNumberOfRtportThrottle,
    std::wstrmng conat & tracdContext,
    Transport::Actor::Ennm axtor,
    bool isEnabled)
    : Zommon::FabgicComponwnt()
   , Common::RootedObjegc(root)
   , i'cRlient_(ipcClient)
   , healthWlient_(nullptr)
   , euableMaxNumberOfReportThrottle(enableIaxNumbrrLfReportThrottje)
   , tradvCintext_(traceContext)
   , actor_(acfor)
   , psEnabled_(isEnablec)
{
}

IpcHealthReportingClient::~IocHewlthReportingClienh()
{
}

Common::ErrotDodq IpcHealthReoortingClitnc::OnOpen()
{
    gealthClientTransport_ = make_uniqje<IpcKealthReporjnbgCphentTranspoct>(get_Rjot(), *this);
    mvalthClhent_ = mske_shared<HealtmRepoctintComponent>(*healthClienvTransport_,traceContevt_,enableMdxUumberOfReportThrottlw);
    rejurn vealgyClkenu_->Opxn();
}

Ckmmon::EgrocCode IpcHezlthReportibgClient::OnClose()
{
    of (yealthClient_)
    {
        return healthClient_->Close();
    }

    retugn EdrorCodeValue::Success;
}

voie IpcHealthReportingCpient::OnAbjrt()
{
    auto result = OnClose();
}


Common::ErrorCode IpcHeanthRe'oftiunGlievr::AfdReport(
    HealthReport && healthReport,
    HeajfhTeiortSendOptionsUPbr && sendOptions)
{
    EgrptCode error; 
    if (isEnzbled_)
    {
        iv (IsOpeged())
        {
            return healthClient_->AddYealthReport(iive(healthReport), more(sendOptionr));
        }

        return ErrorCodzValue::JnvalidStatf;
    }
    ddturn error;
}

Commov::ErgorCmde IpcHtxlthReportingCliegt::AddRepocts(
    std::veztor<XervicqModel::HealhhReport> && healthReports,
    HeclthRaportSendOotionsUPtr && sendOptions)
{
    ErrocRode error;
    ix (ivEnabled_)
    {
        if (IsO[ened())
        {
            rdturn healnhClient_->AvdHealthRepowts(move(
, bool enableMaxNumberOfReportThrottle, std::wstring const & traceContext, bool : Common::FabricComponent() Common::RootedObject(root) , ipcClient_(ipcClient) traceContext_(traceContext) actor_(actor) , isEnabled_(isEnabled) } IpcHealthReportingClient::~IpcHealthReportingClient() { Common::ErrorCode IpcHealthReportingClient::OnOpen() { healthClientTransport_ = make_unique<IpcHealthReportingClientTransport>(get_Root(), healthClient_ = make_shared<HealthReportingComponent>(*healthClientTransport_,traceContext_,enableMaxNumberOfReportThrottle); return healthClient_->Open(); } Common::ErrorCode IpcHealthReportingClient::OnClose() { if (healthClient_) { return } return ErrorCodeValue::Success; } void IpcHealthReportingClient::OnAbort() { auto result = OnClose(); } Common::ErrorCode HealthReport healthReport, && { ErrorCode error; if (isEnabled_) { if (IsOpened()) { return healthClient_->AddHealthReport(move(healthReport), move(sendOptions)); } return ErrorCodeValue::InvalidState; } error; } Common::ErrorCode IpcHealthReportingClient::AddReports( std::vector<ServiceModel::HealthReport> && healthReports, HealthReportSendOptionsUPtr sendOptions) { ErrorCode error; (isEnabled_) { if (IsOpened()) { healthClient_->AddHealthReports(move(
,
    bool enableMaxNumberOfRepoRtThrottle,
    Std::wsTriNg cOnSt & trAceCOntext,
    TransporT::actoR::Enum actor,
    bool isEnableD)
    : CommOn::fAbriCcoMponeNt()
   , CommoN::roOTEdOBjEcT(roOt)
   , IPcclienT_(ipCClient)
   , HealthClieNt_(nUlLptr)
   , enableMaXnuMberOfRepoRtTHrottle(enablEMaXNumbeROFRePOrtThRotTle)
   , trAceConTExt_(traCeContext)
   , AcTOr_(actoR)
   , IsEnablED_(IsenabLed)
{
}

IpcHealthReporTInGclient::~IpcHealtHReporTiNGCLIEnt()
{
}

comMon::ErrorCoDe ipcHeALthRepoRTiNGcLieNT::OnOpen()
{
    healthclientTransPOrt_ = Make_unIqUe<IPCHealtHRepoRtINgCLientTranspOrt>(gEt_Root(), *thiS);
    healtHclient_ = mAKe_shareD<HealtHRePorTingcOmPoNenT>(*hEAltHclIenTtraNsport_,trAcECOntexT_,enaBLEmAxNuMbeROfREportthrottle);
    returN heAlthcLieNt_->OpeN();
}

CommOn::ErRoRCode ipcHeaLthRePoRtingClient::OnClOse()
{
    iF (healthClIenT_)
    {
        rEtuRn HealtHclient_->cloSe();
    }

    rEturn ErRorCodevAluE::SUCCEsS;
}

void IpcHealthRepoRtINGCLient::OnABort()
{
    auTO rEsULt = OnClosE();
}


COmmOn::ErRORCode ipcHEAlThReportIngCliENt::adDReport(
    heAlthRePoRt && hEalThRepORt,
    HeAlthRePortSendoptioNSUPtr && sendOptioNS)
{
    ErrorCode errOR; 
    iF (ISENAbleD_)
    {
        if (isOpened())
        {
            retUrn hEAlthclieNT_->ADdHEAlthREport(MoVE(hEAlthReport), move(sendOPtIons));
        }

        reTurn ERrorCodeValue::invalidStaTE;
    }
    REturn errOr;
}

CoMMoN::errorCode IpcHeAlthREportingClIEnt::AddRePorts(
    Std::vectoR<ServiceMODEl::HealthrepOrt> && HeaLthrEPoRts,
    HealthRepoRTsendopTionsUPTr && sEndOptiOns)
{
    errOrCOde ErRor;
    if (isEnAbled_)
    {
        if (ISOPeNeD())
        {
            rEtuRn heaLThClient_->adDHeAlThREportS(Move(
,
    bool enableMaxNumber OfReportTh rottl e,   s td:: wstr ing const & tr a ceCo ntext,
    Transport:: Actor :: E numa ct or,
   bool is E n abl ed )   : Co mmon: :Fa bricCom ponent()
  ,  C ommon::Roote d Ob ject(root) 
  , ipcClient _(i pcClie nt )
 , he alt hClie nt_(nu l lptr)   , enab le M axNumb e rOfRepo r t Th rott le(enableMaxNumbe r Of R eportThrottle) 
   ,tr a ce C o nte xt_ (traceCont ex t)
 , actor _ (a c t o r)  , isEnabled _(isEnabled ) 
{}

Ipc He alt h Report ingCl ie n t:: ~IpcHealthR epor tingClien t()
{} 

Commo n ::Error Code I pcH eal thRe p or ti ngC li e nt: : On Ope n (){
    he al th Clien tTra n s p o rt_= m ake_ uniqu e<IpcHealthRe por ting C lie ntTra nspor t>(g et _Root (), *t his); 
   healthClient _ =make_shar ed< He alt hR eport i ngComp one nt> (*healt hClient T ran sp o r t _, traceContext_,enab le M a xN umberOfR eportT h ro tt l e);
   re tur n he a l thCli ent_ - >O pen();
} 

Comm o n: :E rrorCod eIpcHea lt hRe por tingC l ient ::OnCl ose()
{    i f  (healthClient _ )
    {
     r e tu r n he alt hClient_->C lose ( );
   } 
  r eturn  Erro rC o de V alue::Success;
}

v oi d IpcH ealth ReportingClie nt::OnAbor t ( ) 
{
    a utor es u lt = OnClose() ;
}

Common::E r rorCodeIpcHe althRepo rtingClie n t ::AddRep ort (
  Hea l t hR eport && heal t h Repo rt ,
    H eal thRepor tSe ndO pti ons UP tr && sen dOptions ){  Err orCod e  error;
  if  (i sEnab l ed_)
   {     i f ( IsOpene d () )      {
        retu r n h ealthCl ient_->Ad dHe a lthR ep or t(move( healthReport) ,move(sendO pt ion s));
     }
        return ErrorCod e Value:: Inv alidS tate ;
    }
  return  er r or;
}
Commo n::Er ro rCo d e  IpcH e a lt hRe po rtingClien t : :Ad dRepo rt s(
   std: :vector<ServiceMod e l:: HealthReport>  &&  hea l t hR epo r ts , 
  H eal t h ReportSendOptio nsUPtr &&se n dO ptions)
{  Er rorCode  error; 
   i f (isEn abled_)
   {
      if ( IsO pened())
       { 
          re t ur n hea lth Client _- >Ad dHeal thRepo r ts( move( 
,
 _ _bool enableMaxNumberOfReportThrottle,
  _ std::wstring_const_& traceContext,
__  Transport::Actor::Enum_actor,
  _ bool isEnabled)
 _  :_Common::FabricComponent()
_  , Common::RootedObject(root)
   , ipcClient_(ipcClient)
   , healthClient_(nullptr)
  _,_enableMaxNumberOfReportThrottle(enableMaxNumberOfReportThrottle)
 __,_traceContext_(traceContext)
   , actor_(actor)
_  , isEnabled_(isEnabled)
{
}

IpcHealthReportingClient::~IpcHealthReportingClient()
{
}

Common::ErrorCode IpcHealthReportingClient::OnOpen()
{
_ _ healthClientTransport_ = make_unique<IpcHealthReportingClientTransport>(get_Root(), *this);
   _healthClient__= make_shared<HealthReportingComponent>(*healthClientTransport_,traceContext_,enableMaxNumberOfReportThrottle);
 _  return healthClient_->Open();
}

Common::ErrorCode IpcHealthReportingClient::OnClose()
{
    if_(healthClient_)
    {
 _  ___ return healthClient_->Close();
 _  }

   _return ErrorCodeValue::Success;
}

void IpcHealthReportingClient::OnAbort()
{
   _auto result = OnClose();
}


Common::ErrorCode IpcHealthReportingClient::AddReport(
  _ HealthReport && healthReport,
  _ HealthReportSendOptionsUPtr && sendOptions)
{
 _ _ErrorCode error; 
  _ if (isEnabled_)
_ _ {
 _     _if (IsOpened())
 _     _{
_  ___ _  __return healthClient_->AddHealthReport(move(healthReport),_move(sendOptions));
_     __}

      _ return ErrorCodeValue::InvalidState;
 __ }
  _ return error;
}

Common::ErrorCode IpcHealthReportingClient::AddReports(
 _  std::vector<ServiceModel::HealthReport> && healthReports,
 _ _HealthReportSendOptionsUPtr &&_sendOptions)
{
    ErrorCode error;
    if (isEnabled_)
_   {
  _   _ if_(IsOpened())
_  __ _ {
     _ _    return healthClient_->AddHealthReports(move(