ObjectReferenceService.AcquireObjectReference 方法

定义

获取对象的实际引用。

重载

AcquireObjectReference(Object)

通过其实际引用获取对象的引用。

AcquireObjectReference(Int32, Int32, Int32, Int32)

通过该对象的 SourceLocation 获取引用,此方法将自动注册要侦听 SourceLocationUpdatedEvent 的对象,如果可能。

AcquireObjectReference(Object)

通过其实际引用获取对象的引用。

public:
 Guid AcquireObjectReference(System::Object ^ obj);
public Guid AcquireObjectReference (object obj);
member this.AcquireObjectReference : obj -> Guid
Public Function AcquireObjectReference (obj As Object) As Guid

参数

obj
Object

我们需要为其获取引用的对象。

返回

对象的引用。

适用于

AcquireObjectReference(Int32, Int32, Int32, Int32)

通过该对象的 SourceLocation 获取引用,此方法将自动注册要侦听 SourceLocationUpdatedEvent 的对象,如果可能。

public:
 Guid AcquireObjectReference(int startLine, int startColumn, int endLine, int endColumn);
public Guid AcquireObjectReference (int startLine, int startColumn, int endLine, int endColumn);
member this.AcquireObjectReference : int * int * int * int -> Guid
Public Function AcquireObjectReference (startLine As Integer, startColumn As Integer, endLine As Integer, endColumn As Integer) As Guid

参数

startLine
Int32

对象的起始行。

startColumn
Int32

对象的起始列。

endLine
Int32

对象的结束行。

endColumn
Int32

对象的结束列。

返回

对象的 SourceLocation 引用。

适用于