<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>P4.Net</title> <meta content="text/html; charset=iso8859-1" http-equiv="Content-Type" /> <link rel="stylesheet" href="style.css" /> </head> <body> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td style="height: 19px"> <img alt="P4.Net" src="p4net.GIF" /> </td> <td style="height: 19px"> <table border="0" cellpadding="0" cellspacing="0" style="height: 45px"> <tr> <td style="height: 13px"></td> </tr> <tr> <td style="height: 30px"> <h2 style="text-align: center; vertical-align: middle;"> Perforce API for the .Net CLR</h2> </td> </tr> </table> </td> </tr> </table> <h3> Contents </h3> <ol> <li><a href="#intro">Introduction </a></li> <li><a href="#license">License </a></li> <li><a href="#support">Support </a></li> <li><a href="#doc">Documentation </a></li> <li><a href="#build">Building P4.Net </a></li> <li><a href="#downloads">Downloads </a></li> <li><a href="#sample">Sample Code </a></li> <li><a href="#credits">Credits </a></li> <li><a href="KnownIssues.html">Known Issues</a></li> <li><a href="shawn.html">shawn</a></li> </ol> <a name="intro"></a> <h3> Introduction </h3> <p> P4.Net is an API for the Microsoft .Net Common Language Runtime (CLR). It can be used from any managed language including C#, VB.Net, and J#.</p> <ul> <li>Support for Framework versions 1.1 and 2.0.</li><li>Results can be streamed as "pre-parsed", and are abstrated to "Recordsets" and "Records".</li><li>Direct manipulation of forms (p4 client, branch, user, etc.).</li><li>Connections are auto-managed (no need to set "ParseForms" or "Tagged" like other APIs).</li><li>P4PendingChangelist object makes submiting changes a snap. </li></ul> <a name="license"></a> <h3> Licence </h3> <p> P4.Net is protected under <a href="license.html"><TODO></a> license, which is a BSD-like license.<a name="support"></a><h3> Support </h3> P4.Net is supported by me personally, in my spare time. If you have any issues you can contact me at <span style="color: #0000cc; text-decoration: underline">p4shawn <at> gmail <dot> com</span>. I use P4.Net at work extensively, so I'm motivated to fix any bugs. But I can't guarantee I'll be able to help everyone in a timely fashion, or even at all.<h3> P4.Net vs. P4COM</h3> <p> P4COM can can absolutely be used from managed languages w/o issues. So why would you want to use P4.Net? P4COM requires you to register the dll when deploying, but since P4.Net is entirely managed code, there is no need to register any dlls. You can literally use xcopy deployment (or p4 sync :-). Also, P4COM is constrained by some of the inherent limitations in COM. P4.Net uses inheritence, indexers and collection interfaces that all give it a cleaner, more .Net-like interface than P4COM (IMHO).</p> <h3> Documentation </h3> <a name="build"></a> <h3> Building P4.Net </h3> <h4> 1. Download the Perforce API </h4> First, you will need to download the Perforce C++ API and unzip the contents into this folder:<br /> P4.Net\ext\p4api<br /> <br /> Features coded in P4.Net require at least version 2005.2. There should be no problems using this P4.Net against older servers.<br /> <br /> <p> </p> <h4> 2. Deploying P4.Net</h4> <p> This is the beauty of .Net. Simply copy P4API.dll and p4dn.dll into the same folder as your executable. If you need to use the strong-named assemblies, I recommend you install them into the GAC. If you are using strong-named assemblies in ASP.Net, you must install them in the GAC, or you will likely encounter file-locking issues.</p> <h3> Downloads </h3> <h4> Current Builds </h4> <p> <a name="sample"> </a> </p> <h3> Sample code </h3> <pre> P4Connection p4 = new P4Connection(); p4.Connect(); <a name="lib"></a> P4Form client = p4.Fetch_Form("client"); client["Root"] = @"c:\p4"; p4.Save_Form(f); p4.Disconnect(); <a name="porting"> </pre> <h3> Architecture</h3> <p> P4.Net is divided into two distinct components.</p> <p> <strong>p4dn: </strong>Written in C++, this component marshals all objects between the native Perforce C++ API and managed types. It generally follows the object model of the native Perforce API. It can be used directly from any managed language, but it can get complicated. I won't attempt to document it, but between the P4API implemention and the Perforce C++ API docutmentation, you can probably figure it out if P4API isn't meeting your needs. p4dn was originally ported from <span style="color: #cc3300"><who was it?></span></p> <p> <strong>P4API:</strong> Written in C#, this component consumes p4dn, and abstracts the complexity of the native API into an easier to use syntax. The object model is inspired from a combination P4Ruby, P4Python, P4COM, and ADO.<b> </b> </p> <a name="credits"></a><h3> Credits </h3> <p> </p> </body> </html>
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#3 | 5824 | Shawn Hladky | P4.Net: Last bits of documentation for 0.9 | ||
#2 | 5798 | Shawn Hladky |
P4.Net... still not ready for beta Added license to all files Added several doc files Misc bugs |
||
#1 | 5636 | Shawn Hladky |
1. Added test harness framework, and some initial tests 2. Fixed many bugs (oddly enough identified by the unit tests) 3. Fixes so will build 1.1 Framework (and build batch files actually work) 4. Pathetic attempt at documentation |