Example #1
0
        public DataPackage Checkout(ObjectIdentity objIdentity)
        {
            ObjectIdentitySet objIdSet = new ObjectIdentitySet();

            objIdSet.Identities.Add(objIdentity);

            OperationOptions operationOptions = null;
            DataPackage      resultDp;

            resultDp = versionControlService.Checkout(objIdSet, operationOptions);
            Console.WriteLine("Checkout successful");

            List <VersionInfo> vInfo       = versionControlService.GetVersionInfo(objIdSet);
            VersionInfo        versionInfo = vInfo[0];

            Console.WriteLine("Printing version info for " + versionInfo.Identity);
            Console.WriteLine("IsCurrent is " + versionInfo.IsCurrent);
            Console.WriteLine("Version is " + versionInfo.Version);
            Console.WriteLine("Symbolic labels are: ");
            foreach (String label in versionInfo.SymbolicLabels)
            {
                Console.WriteLine(label);
            }

            versionControlService.CancelCheckout(objIdSet);
            Console.WriteLine("Checkout cancelled");
            return(resultDp);
        }