Credential.cs #1

  • //
  • guest/
  • perforce_software/
  • p4connect/
  • src/
  • P4Bridge/
  • p4api.net/
  • Credential.cs
  • View
  • Commits
  • Open Download .zip Download (824 B)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Perforce.P4
{
	/// <summary>
	/// Specifies user credentials for a specific connection. 
	/// </summary>
	public class Credential
	{
		public String Ticket { get; private set; }
		internal String UserName { get; private set; }
		public DateTime Expires { get; private set; }

		internal Credential(string user, string password)
		{
			UserName = user;
			Ticket = password;
			Expires = DateTime.MaxValue;
		}

		internal Credential(string user, string password, DateTime expires)
		{
			UserName = user;
			Ticket = password;
			Expires = expires;
		}

		public override string ToString()
		{
			return string.Format("User: {0}, Expires: {1} {2}", UserName, Expires.ToShortDateString(), Expires.ToShortTimeString());
		}
	}
}
# Change User Description Committed
#3 16210 Norman Morse Remove files from old locations
#2 12135 Norman Morse Integrate dev branch changes into main.

This code is the basiis of the 2.7 BETA release which provides Unity 5 compatibility
#1 10940 Norman Morse Inital Workshop release of P4Connect.
Released under BSD-2 license