_dispVCProjectEngineEvents.SccEvent Method
This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.
Signifies that a source code control event has occurred.
Namespace: Microsoft.VisualStudio.VCProjectEngine
Assembly: Microsoft.VisualStudio.VCProjectEngine (in Microsoft.VisualStudio.VCProjectEngine.dll)
Syntax
'Dichiarazione
Sub SccEvent ( _
Item As Object, _
eventID As enumSccEvent _
)
void SccEvent(
Object Item,
enumSccEvent eventID
)
void SccEvent(
[InAttribute] Object^ Item,
[InAttribute] enumSccEvent eventID
)
abstract SccEvent :
Item:Object *
eventID:enumSccEvent -> unit
function SccEvent(
Item : Object,
eventID : enumSccEvent
)
Parameters
- Item
Type: System.Object
Required. The item.
- eventID
Type: Microsoft.VisualStudio.VCProjectEngine.enumSccEvent
Required. The event. An enumSccEvent value.
Remarks
The SccEvent method can be used to catch, allow a change, or disallow a change to project file settings. It can also be used when integrating your own source code system into Visual Studio.
Examples
[Visual Basic]
' add reference to Microsoft.VisualStudio.VCProjectEngine
Imports EnvDTE
Imports Microsoft.VisualStudio.VCProjectEngine
Public Module Module1
Sub SccEvent(ByVal item As Object, ByVal eventid As enumSccEvent)
Dim vcitem As VCProjectItem
vcitem = item
MsgBox(vcitem.Name)
End Sub
Sub Main()
Dim projEngine As VCProjectEngine
Dim evt As VCProjectEngineEvents
Dim prj As VCProject
Dim configuration As VCConfiguration
prj = DTE.Solution.Projects.Item(1).Object
projEngine = prj.VCProjectEngine
evt = projEngine.Events
AddHandler evt.SccEvent, AddressOf SccEvent
configuration = prj.Configurations.Item("Debug")
configuration.IntermediateDirectory = "DebugNew"
End Sub
End Module
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.