|
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#.
P4.Net is protected under <TODO> license, which is a BSD-like license.
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).
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.
P4Connection p4 = new P4Connection(); p4.Connect(); P4Form client = p4.Fetch_Form("client"); client["Root"] = @"c:\p4"; p4.Save_Form(f); p4.Disconnect();
P4.Net is divided into two distinct components.
p4dn: 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 <who was it?>
P4API: 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.