Proprietà IVSSCheckout.Comment
Ottiene una stringa contenente un commento relativo all'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 Comment As String
'Utilizzo
Dim instance As IVSSCheckout
Dim value As String
value = instance.Comment
string Comment { get; }
property String^ Comment {
String^ get ();
}
/** @property */
String get_Comment ()
function get Comment () : String
Valore proprietà
Una stringa contenente un commento relativo all'estrazione del file oppure una stringa vuota, se non è disponibile alcun commento.
Note
[IDL]
HRESULT Comment ([out,retval]BSTR *pComment);
Esempio
Nell'esempio riportato di seguito viene illustrato come scorrere l'insieme IVSSCheckouts di un file e visualizzare la proprietà Comment 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