Jump to content


P4.Net API - How do I set Program name?


  • Please log in to reply
2 replies to this topic

#1 jeff.hughes

jeff.hughes

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 28 February 2020 - 01:50 AM

The C++ API has:

ClientApi::SetProg( const StrPtr * )

I see in the docs for the .Net API there is a property on the P4Server object ProgamName. However, we are using the Repository object to drive everything. Is there a call on the repro object that I have not found? Or a way to access, convert to a P4Server object?

Thanks!

#2 p4bill

p4bill

    Advanced Member

  • Members
  • PipPipPip
  • 217 posts

Posted 28 February 2020 - 03:39 AM

Assuming you are using Repository.Connection.Connect(options) to connect, you can set the program name and version like this:
Options options = new Options();
options["ProgramName"] = "Test Program";
options["ProgramVersion"] = "1.0.0";
Repository.Connection.Connect(options);


#3 jeff.hughes

jeff.hughes

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 28 February 2020 - 06:19 PM

Sweet! Thats what I'm looking for. Thank you!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users