// Copyright Epic Games, Inc. All Rights Reserved. using Microsoft.Extensions.Logging; using System; using System.Collections.Generic; using System.Text; namespace EpicGames.Perforce { /// /// An instance of PerforceConnection which is strongly typed as having a valid client name /// public class PerforceClientConnection : PerforceConnection { /// /// Accessor for the client name. /// public new string ClientName { get { return base.ClientName!; } } /// /// Constructor /// /// The Perforce connection /// The client name public PerforceClientConnection(PerforceConnection Perforce, string ClientName) : base(Perforce.ServerAndPort, Perforce.UserName, ClientName, Perforce.Logger) { } /// /// Constructor /// /// The server and port address /// Username to connect with /// The client name to use /// Logging device public PerforceClientConnection(string? ServerAndPort, string? UserName, string ClientName, ILogger Logger) : base(ServerAndPort, UserName, ClientName, Logger) { } /// /// Remove the client parameter for the connection /// /// Bare connection to the server public PerforceConnection WithoutClient() { return new PerforceConnection(this) { ClientName = null }; } } }