Proprietà IVSSCheckout.Date
Ottiene la data e l'ora di estrazione del file.
Spazio dei nomi: Microsoft.VisualStudio.SourceSafe.Interop
Assembly: Microsoft.VisualStudio.SourceSafe.Interop (in microsoft.visualstudio.sourcesafe.interop.dll)
Sintassi
'Dichiarazione
ReadOnly Property Date As DateTime
'Utilizzo
Dim instance As IVSSCheckout
Dim value As DateTime
value = instance.Date
DateTime Date { get; }
property DateTime Date {
DateTime get ();
}
/** @property */
DateTime get_Date ()
function get Date () : DateTime
Valore proprietà
La data e l'ora di estrazione del file.
Note
[IDL]
HRESULT Date ([out,retval]DATE *pDate);
Esempio
Nell'esempio riportato di seguito viene illustrato come scorrere l'insieme IVSSCheckouts di un file e visualizzare la proprietà Date per ogni estrazione.
Per eseguire il test, il file $/A/a.txt deve essere estratto da due utenti. Le estrazioni multiple devono essere attivate dall'amministratore VSS. Per attivare le estrazioni multiple, scegliere Opzioni dal menu Strumenti, quindi fare clic sulla scheda Generale, selezionare la casella di controllo Consenti estrazioni multiple e infine scegliere OK.
using System;
using Microsoft.VisualStudio.SourceSafe.Interop;
public class IVSSTest
{
public static void Main()
{
// Create a VSSDatabase object.
IVSSDatabase vssDatabase = new VSSDatabase();
// Open a VSS database using network name
// for automatic user login.
vssDatabase.Open(@"C:\VSSTestDB\srcsafe.ini",
Environment.UserName, "");
IVSSItem vssFile = vssDatabase.get_VSSItem("$/A/a.txt", false);
foreach(IVSSCheckout vssCheckout in vssFile.Checkouts)
{
Console.WriteLine("Checked out to : {0}", vssCheckout.Username);
Console.WriteLine("Comment : {0}", vssCheckout.Comment);
Console.WriteLine("Date : {0}", vssCheckout.Date);
Console.WriteLine("LocalSpec : {0}", vssCheckout.LocalSpec);
Console.WriteLine("Machine : {0}", vssCheckout.Machine);
Console.WriteLine("Project : {0}", vssCheckout.Project);
Console.WriteLine("VersionNumber : {0}", vssCheckout.VersionNumber);
Console.WriteLine();
}
Console.WriteLine("Number of Checkouts: " + vssFile.Checkouts.Count);
Console.WriteLine("\n");
}
}
Output:
Checked out to : Guest
Comment : Check out to working folder
Date : 11/10/2003 10:52:40 AM
LocalSpec : C:\VSSTESTWF\A
Machine : Tester_01
Project : $/A
VersionNumber : 1
Checked out to : Admin
Comment : Check out to folder C:\1
Date : 11/10/2003 10:51:56 AM
LocalSpec : C:\1
Machine : Tester_02
Project : $/A
VersionNumber : 1
Number of checkouts: 2
Vedere anche
Riferimenti
Interfaccia IVSSCheckout
Membri IVSSCheckout
Spazio dei nomi Microsoft.VisualStudio.SourceSafe.Interop