SlideShare ist ein Scribd-Unternehmen logo
1 von 7
C# and Borland-StarTeam Connectivity
Here I will explain-
 What is Version ControlSystem.
 What is Borland StarTeam.
 How to connect to Borland StarTeam fromC# and Check Out Files to local
machine.
Version Control System:
 Version Control is a systemthat records changes to a file or set of files over
time so that you can recall specific versions later.
 A version controlsystemis mostly based around one concept, tracking
changes that happen within directories or files.
 Ithelps teams to coordinate more effectively and team members to work in
parallel.
 With version control systems you can do things like-
1. File Locking.
2. Branching and Merging.
3. Reverting back to older version of files.
For more information on version control please refer to this LINK.
Borland StarTeam
 StarTeam is a versioncontrol system used in softwaredevelopment,
especially when a projectinvolves multiple teams in different locations.
 StarTeam is created by StarbaseCorporation, which was acquired by
Borland in January 2003 which was acquired by Micro Focus after some
time.
 StarTeam supports allthese features- branching and three-way merging,
difference analysis, advanced user access and security management,
checkpoints, end user and administrator auditing, view and revision labels,
promotion states and customization features.
For more information Go To StarTeam Site.
Connect to Borland StarTeam from C# and Check Out Files to local
machine
Now I will explain how you can connect to Starteam from C# and checkout the
files.
Few points to note-
 StarTeam is a licensed product.you can register for a trial license here.
 After registration you will get a usernameand password which you can use
to download .Net SDK for StarTeam.
 SDK defers for the server version you are using. HereI am focusing on
StarTeam 2008 R2 which supports st-sdk-10.4.8.57-net-win.
 With SDK you will get sampleapplication which you can refer to work on
your application.
 Itwill create a help file by the name StarTeamSDK for .NET.chm
Now it is coding time ----------->I am writing a console application
//Create a console application
//Add reference to the dlls as shown below.
//These dlls you will get after installing SDK
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using StarTeam;
public class StarTeamHelper
{
//Declare Needed variables
//Indicates that all item types should be displayed.
public conststring ALL_TYPES = "*";
//Indicates that all views should be searched.
public conststring ALL_VIEWS ="*";
//Server TCP/IP address -- server fromwhich you wantto checkout files
private string m_strServer = "servername";
//Server port number
private int m_nPort= “PortNumber”;
//Logon user name --usernameto login to the server
private string m_strUser = "username";
//Logon password
private string m_strPassword ="password";
//Project name; null searches all projects
private string m_strProject= null;
//View name; null searches default view
private string m_strView = null;
//Folder path; null searches the root folder
private string m_strFolder = null;
//true if subfolders aresearched recursively
private bool m_bRecursive= true;
//List items last modified since this date
private DateTime m_cutoffDate = DateTime.Now;
//True to filter by m_cuttoffDate
private bool m_bUseDateFilter = false;
public static void Main(string[] args)
{
//Create the Server object.
Server stServer = new Server(m_strServer, m_nPort);
//LogOn to the server.
stServer.LogOn(m_strUser, m_strPassword);
// For each project on this server ...--itwill give list of projects to which we
have access
foreach (ProjectstProject in stServer.Projects)
{
// If no projectname was specified, search all projects.
if (m_strProject== null)
{
//use default view
View stView = stProject.DefaultView;
//To check out files we need to take help of CheckoutManager class
//create CheckoutManager object
CheckoutManager objCheckoutManager =
stView.CreateCheckoutManager();
//if file to be checked out with an exclusive lock
//(so no one else could checkout it while it is checked out).
objCheckoutManager.Options.LockType=Item.LockType.EXCLUSIVE;
/**********CHECKING OUTSINGLEFILE***************/
//By default, startsearching fromthe root folder.
Folder stFolder = stView.RootFolder;
//To check out single file useStarTeamFinder class's FindFile method
to find your file
//Syntax:File StarTeamFinder.FindFile(Folder source, string name, bool
matchCase);
File file = StarTeamFinder.FindFile(stFolder, "YourFileName", false);
//create the Target File
System.IO.FileInfo objFileInfo =new
System.IO.FileInfo("D:TargetFIle");
//Finally CHECK OUT the File
objCheckoutManager.CheckoutTo(file, objFileInfo);
/***********CHECKING OUT MULTIPLEFILES************/
/*Folder stFolder = stView.FindByName("FolderName",
true).RootFolder;
ItemCollection stItem= stFolder.GetItems("File");
//checks out file to default working folder. Wecan see this default
working folder using starteam client
objCheckoutManager.Checkout(stItem);*/
}
}
// Finally Disconnectfromserver.
stServer.Disconnect();
}
}

Weitere ähnliche Inhalte

Was ist angesagt?

Android Storage - StorageManager & OBB
Android Storage - StorageManager & OBBAndroid Storage - StorageManager & OBB
Android Storage - StorageManager & OBBWilliam Lee
 
Developers’ mDay 2019. - Nikola Krgović, Twin Star Systems – Big Data for Dev...
Developers’ mDay 2019. - Nikola Krgović, Twin Star Systems – Big Data for Dev...Developers’ mDay 2019. - Nikola Krgović, Twin Star Systems – Big Data for Dev...
Developers’ mDay 2019. - Nikola Krgović, Twin Star Systems – Big Data for Dev...mCloud
 
PostgreSQL Database Slides
PostgreSQL Database SlidesPostgreSQL Database Slides
PostgreSQL Database Slidesmetsarin
 
Data Migration in Database
Data Migration in DatabaseData Migration in Database
Data Migration in DatabaseJingun Jung
 
Introducing Docker to Mac Management – Nick McSpadden
Introducing Docker to Mac Management – Nick McSpaddenIntroducing Docker to Mac Management – Nick McSpadden
Introducing Docker to Mac Management – Nick McSpaddenmacbrained
 
Oracle Diagnostics : Latches and Enqueues
Oracle Diagnostics : Latches and EnqueuesOracle Diagnostics : Latches and Enqueues
Oracle Diagnostics : Latches and EnqueuesHemant K Chitale
 
Oracle : Monitoring and Diagnostics without OEM
Oracle : Monitoring and Diagnostics without OEMOracle : Monitoring and Diagnostics without OEM
Oracle : Monitoring and Diagnostics without OEMHemant K Chitale
 
Whitepaper To Study Filestream Option In Sql Server
Whitepaper To Study Filestream Option In Sql ServerWhitepaper To Study Filestream Option In Sql Server
Whitepaper To Study Filestream Option In Sql ServerShahzad
 
Logging presentation
Logging presentationLogging presentation
Logging presentationJatan Malde
 
IzPack at Devoxx 2010
IzPack at Devoxx 2010IzPack at Devoxx 2010
IzPack at Devoxx 2010julien.ponge
 
Cloning Oracle EBS R12: A Step by Step Procedure
Cloning Oracle EBS R12: A Step by Step ProcedureCloning Oracle EBS R12: A Step by Step Procedure
Cloning Oracle EBS R12: A Step by Step ProcedureOrazer Technologies
 
Creating a physical standby database 11g on windows
Creating a physical standby database 11g on windowsCreating a physical standby database 11g on windows
Creating a physical standby database 11g on windowsRoo Wall
 
Oracle 10g Performance: chapter 06 buffer cache
Oracle 10g Performance: chapter 06  buffer cacheOracle 10g Performance: chapter 06  buffer cache
Oracle 10g Performance: chapter 06 buffer cacheKyle Hailey
 

Was ist angesagt? (17)

Oracle Tracing
Oracle TracingOracle Tracing
Oracle Tracing
 
Build
BuildBuild
Build
 
One Click Ownage
One Click OwnageOne Click Ownage
One Click Ownage
 
Android Storage - StorageManager & OBB
Android Storage - StorageManager & OBBAndroid Storage - StorageManager & OBB
Android Storage - StorageManager & OBB
 
Developers’ mDay 2019. - Nikola Krgović, Twin Star Systems – Big Data for Dev...
Developers’ mDay 2019. - Nikola Krgović, Twin Star Systems – Big Data for Dev...Developers’ mDay 2019. - Nikola Krgović, Twin Star Systems – Big Data for Dev...
Developers’ mDay 2019. - Nikola Krgović, Twin Star Systems – Big Data for Dev...
 
PostgreSQL Database Slides
PostgreSQL Database SlidesPostgreSQL Database Slides
PostgreSQL Database Slides
 
Data Migration in Database
Data Migration in DatabaseData Migration in Database
Data Migration in Database
 
Introducing Docker to Mac Management – Nick McSpadden
Introducing Docker to Mac Management – Nick McSpaddenIntroducing Docker to Mac Management – Nick McSpadden
Introducing Docker to Mac Management – Nick McSpadden
 
Oracle Diagnostics : Latches and Enqueues
Oracle Diagnostics : Latches and EnqueuesOracle Diagnostics : Latches and Enqueues
Oracle Diagnostics : Latches and Enqueues
 
Oracle : Monitoring and Diagnostics without OEM
Oracle : Monitoring and Diagnostics without OEMOracle : Monitoring and Diagnostics without OEM
Oracle : Monitoring and Diagnostics without OEM
 
Whitepaper To Study Filestream Option In Sql Server
Whitepaper To Study Filestream Option In Sql ServerWhitepaper To Study Filestream Option In Sql Server
Whitepaper To Study Filestream Option In Sql Server
 
Logging presentation
Logging presentationLogging presentation
Logging presentation
 
IzPack at Devoxx 2010
IzPack at Devoxx 2010IzPack at Devoxx 2010
IzPack at Devoxx 2010
 
Cloning Oracle EBS R12: A Step by Step Procedure
Cloning Oracle EBS R12: A Step by Step ProcedureCloning Oracle EBS R12: A Step by Step Procedure
Cloning Oracle EBS R12: A Step by Step Procedure
 
Creating a physical standby database 11g on windows
Creating a physical standby database 11g on windowsCreating a physical standby database 11g on windows
Creating a physical standby database 11g on windows
 
Missing redo logs in oracle
Missing redo logs in oracleMissing redo logs in oracle
Missing redo logs in oracle
 
Oracle 10g Performance: chapter 06 buffer cache
Oracle 10g Performance: chapter 06  buffer cacheOracle 10g Performance: chapter 06  buffer cache
Oracle 10g Performance: chapter 06 buffer cache
 

Ähnlich wie C# and Borland StarTeam Connectivity

Struts2 tutorial
Struts2 tutorialStruts2 tutorial
Struts2 tutorializdihara
 
Development Setup of B-Translator
Development Setup of B-TranslatorDevelopment Setup of B-Translator
Development Setup of B-TranslatorDashamir Hoxha
 
Infrastructure as Code in your CD pipelines - London Microsoft DevOps 0423
Infrastructure as Code in your CD pipelines - London Microsoft DevOps 0423Infrastructure as Code in your CD pipelines - London Microsoft DevOps 0423
Infrastructure as Code in your CD pipelines - London Microsoft DevOps 0423Giulio Vian
 
Cloud init and cloud provisioning [openstack summit vancouver]
Cloud init and cloud provisioning [openstack summit vancouver]Cloud init and cloud provisioning [openstack summit vancouver]
Cloud init and cloud provisioning [openstack summit vancouver]Joshua Harlow
 
Monitoring MySQL with DTrace/SystemTap
Monitoring MySQL with DTrace/SystemTapMonitoring MySQL with DTrace/SystemTap
Monitoring MySQL with DTrace/SystemTapPadraig O'Sullivan
 
7\9 SSIS 2008R2_Training - Script Task
7\9 SSIS 2008R2_Training - Script Task7\9 SSIS 2008R2_Training - Script Task
7\9 SSIS 2008R2_Training - Script TaskPramod Singla
 
PVS-Studio: analyzing pull requests in Azure DevOps using self-hosted agents
PVS-Studio: analyzing pull requests in Azure DevOps using self-hosted agentsPVS-Studio: analyzing pull requests in Azure DevOps using self-hosted agents
PVS-Studio: analyzing pull requests in Azure DevOps using self-hosted agentsAndrey Karpov
 
Borland star team to tfs simple migration
Borland star team to tfs simple migrationBorland star team to tfs simple migration
Borland star team to tfs simple migrationShreesha Rao
 
Linux textbook notes - Graham Helton
Linux textbook notes - Graham HeltonLinux textbook notes - Graham Helton
Linux textbook notes - Graham HeltonGrahamHelton
 
10 resource kit remote administration tools
10 resource kit remote administration tools10 resource kit remote administration tools
10 resource kit remote administration toolsDuggesh Talawar
 
CoreOS, or How I Learned to Stop Worrying and Love Systemd
CoreOS, or How I Learned to Stop Worrying and Love SystemdCoreOS, or How I Learned to Stop Worrying and Love Systemd
CoreOS, or How I Learned to Stop Worrying and Love SystemdRichard Lister
 

Ähnlich wie C# and Borland StarTeam Connectivity (20)

Struts2 tutorial
Struts2 tutorialStruts2 tutorial
Struts2 tutorial
 
Struts2 tutorial
Struts2 tutorialStruts2 tutorial
Struts2 tutorial
 
Struts2 tutorial
Struts2 tutorialStruts2 tutorial
Struts2 tutorial
 
Readme
ReadmeReadme
Readme
 
Cloud Monitoring tool Grafana
Cloud Monitoring  tool Grafana Cloud Monitoring  tool Grafana
Cloud Monitoring tool Grafana
 
Development Setup of B-Translator
Development Setup of B-TranslatorDevelopment Setup of B-Translator
Development Setup of B-Translator
 
linux installation.pdf
linux installation.pdflinux installation.pdf
linux installation.pdf
 
Dost.jar and fo.jar
Dost.jar and fo.jarDost.jar and fo.jar
Dost.jar and fo.jar
 
Jakarta struts
Jakarta strutsJakarta struts
Jakarta struts
 
Infrastructure as Code in your CD pipelines - London Microsoft DevOps 0423
Infrastructure as Code in your CD pipelines - London Microsoft DevOps 0423Infrastructure as Code in your CD pipelines - London Microsoft DevOps 0423
Infrastructure as Code in your CD pipelines - London Microsoft DevOps 0423
 
Cloud init and cloud provisioning [openstack summit vancouver]
Cloud init and cloud provisioning [openstack summit vancouver]Cloud init and cloud provisioning [openstack summit vancouver]
Cloud init and cloud provisioning [openstack summit vancouver]
 
Monitoring MySQL with DTrace/SystemTap
Monitoring MySQL with DTrace/SystemTapMonitoring MySQL with DTrace/SystemTap
Monitoring MySQL with DTrace/SystemTap
 
Srgoc dotnet
Srgoc dotnetSrgoc dotnet
Srgoc dotnet
 
7\9 SSIS 2008R2_Training - Script Task
7\9 SSIS 2008R2_Training - Script Task7\9 SSIS 2008R2_Training - Script Task
7\9 SSIS 2008R2_Training - Script Task
 
PVS-Studio: analyzing pull requests in Azure DevOps using self-hosted agents
PVS-Studio: analyzing pull requests in Azure DevOps using self-hosted agentsPVS-Studio: analyzing pull requests in Azure DevOps using self-hosted agents
PVS-Studio: analyzing pull requests in Azure DevOps using self-hosted agents
 
Borland star team to tfs simple migration
Borland star team to tfs simple migrationBorland star team to tfs simple migration
Borland star team to tfs simple migration
 
Linux textbook notes - Graham Helton
Linux textbook notes - Graham HeltonLinux textbook notes - Graham Helton
Linux textbook notes - Graham Helton
 
10 resource kit remote administration tools
10 resource kit remote administration tools10 resource kit remote administration tools
10 resource kit remote administration tools
 
CoreOS, or How I Learned to Stop Worrying and Love Systemd
CoreOS, or How I Learned to Stop Worrying and Love SystemdCoreOS, or How I Learned to Stop Worrying and Love Systemd
CoreOS, or How I Learned to Stop Worrying and Love Systemd
 
HPC_MPI_CICD.pptx
HPC_MPI_CICD.pptxHPC_MPI_CICD.pptx
HPC_MPI_CICD.pptx
 

Kürzlich hochgeladen

Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 

Kürzlich hochgeladen (20)

Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 

C# and Borland StarTeam Connectivity

  • 1. C# and Borland-StarTeam Connectivity Here I will explain-  What is Version ControlSystem.  What is Borland StarTeam.  How to connect to Borland StarTeam fromC# and Check Out Files to local machine. Version Control System:  Version Control is a systemthat records changes to a file or set of files over time so that you can recall specific versions later.  A version controlsystemis mostly based around one concept, tracking changes that happen within directories or files.  Ithelps teams to coordinate more effectively and team members to work in parallel.  With version control systems you can do things like- 1. File Locking. 2. Branching and Merging. 3. Reverting back to older version of files. For more information on version control please refer to this LINK. Borland StarTeam  StarTeam is a versioncontrol system used in softwaredevelopment, especially when a projectinvolves multiple teams in different locations.  StarTeam is created by StarbaseCorporation, which was acquired by Borland in January 2003 which was acquired by Micro Focus after some time.  StarTeam supports allthese features- branching and three-way merging, difference analysis, advanced user access and security management, checkpoints, end user and administrator auditing, view and revision labels, promotion states and customization features.
  • 2. For more information Go To StarTeam Site. Connect to Borland StarTeam from C# and Check Out Files to local machine Now I will explain how you can connect to Starteam from C# and checkout the files. Few points to note-  StarTeam is a licensed product.you can register for a trial license here.  After registration you will get a usernameand password which you can use to download .Net SDK for StarTeam.  SDK defers for the server version you are using. HereI am focusing on StarTeam 2008 R2 which supports st-sdk-10.4.8.57-net-win.  With SDK you will get sampleapplication which you can refer to work on your application.  Itwill create a help file by the name StarTeamSDK for .NET.chm Now it is coding time ----------->I am writing a console application //Create a console application //Add reference to the dlls as shown below. //These dlls you will get after installing SDK using System;
  • 3. using System.Collections.Generic; using System.Linq; using System.Web; using StarTeam; public class StarTeamHelper { //Declare Needed variables //Indicates that all item types should be displayed. public conststring ALL_TYPES = "*"; //Indicates that all views should be searched. public conststring ALL_VIEWS ="*"; //Server TCP/IP address -- server fromwhich you wantto checkout files private string m_strServer = "servername"; //Server port number private int m_nPort= “PortNumber”; //Logon user name --usernameto login to the server private string m_strUser = "username"; //Logon password private string m_strPassword ="password";
  • 4. //Project name; null searches all projects private string m_strProject= null; //View name; null searches default view private string m_strView = null; //Folder path; null searches the root folder private string m_strFolder = null; //true if subfolders aresearched recursively private bool m_bRecursive= true; //List items last modified since this date private DateTime m_cutoffDate = DateTime.Now; //True to filter by m_cuttoffDate private bool m_bUseDateFilter = false; public static void Main(string[] args) { //Create the Server object. Server stServer = new Server(m_strServer, m_nPort); //LogOn to the server. stServer.LogOn(m_strUser, m_strPassword);
  • 5. // For each project on this server ...--itwill give list of projects to which we have access foreach (ProjectstProject in stServer.Projects) { // If no projectname was specified, search all projects. if (m_strProject== null) { //use default view View stView = stProject.DefaultView; //To check out files we need to take help of CheckoutManager class //create CheckoutManager object CheckoutManager objCheckoutManager = stView.CreateCheckoutManager(); //if file to be checked out with an exclusive lock //(so no one else could checkout it while it is checked out). objCheckoutManager.Options.LockType=Item.LockType.EXCLUSIVE; /**********CHECKING OUTSINGLEFILE***************/ //By default, startsearching fromthe root folder. Folder stFolder = stView.RootFolder;
  • 6. //To check out single file useStarTeamFinder class's FindFile method to find your file //Syntax:File StarTeamFinder.FindFile(Folder source, string name, bool matchCase); File file = StarTeamFinder.FindFile(stFolder, "YourFileName", false); //create the Target File System.IO.FileInfo objFileInfo =new System.IO.FileInfo("D:TargetFIle"); //Finally CHECK OUT the File objCheckoutManager.CheckoutTo(file, objFileInfo); /***********CHECKING OUT MULTIPLEFILES************/ /*Folder stFolder = stView.FindByName("FolderName", true).RootFolder; ItemCollection stItem= stFolder.GetItems("File"); //checks out file to default working folder. Wecan see this default working folder using starteam client objCheckoutManager.Checkout(stItem);*/ } } // Finally Disconnectfromserver. stServer.Disconnect();
  • 7. } }