ESRI.ArcGIS.E2API Feedback via the User Forum
ResultInfo Class
See Also  Members   Example 
ESRI.ArcGIS.E2API Namespace : ResultInfo Class


A ResultInfo object provides information about the top-level Result and TaskContext of a particular Result.

Object Model




Syntax

Visual Basic (Declaration) 
Public Class ResultInfo 
Visual Basic (Usage)Copy Code
Dim instance As ResultInfo
C# 
public class ResultInfo 

Example

This example demonstrates how to use the ResultInfo class to access the ChosenResult.
C#Copy Code
public override void DoMenuItem(esriE2MenuType menuType, object menuArgs, int menuItemId) 

  // First, get the result information (not applicable to the Options menu). 
  ESRI.ArcGIS.E2API.ResultInfo MyResultInfo = menuArgs as ResultInfo; 
  // Choose the item action to run. 
  switch (menuItemId) 
  { 
    case (0): // Main context menu item. 
    {  
      // Attempts to cast to PlaceResult 
      ESRI.ArcGIS.E2API.PlaceResult MyPlaceResult = MyResultInfo.ChosenResult as PlaceResult; 
      if (MyPlaceResult != null) 
      { 
       System.Diagnostics.Debug.WriteIf(MyPlaceResult.Title); 
      } 
      break; 
    } 
  //Case statements to catch other menu types could go here 
  } 
}
Visual BasicCopy Code
Public Overrides Sub DoMenuItem(ByVal menuType As esriE2MenuType, ByVal menuArgs As Object, ByVal menuItemId As Integer)
  ' First, get the result information (not applicable to the Options menu).
  Dim MyResultInfo As ESRI.ArcGIS.E2API.ResultInfo = menuArgs as ResultInfo
    ' Choose the item action to run.
    Select Case menuItemId
      Case (0)
      ' Attempts to cast to PlaceResult
      Dim MyPlaceResult As ESRI.ArcGIS.E2API.PlaceResult = MyResultInfo.ChosenResult as PlaceResult
      If Not MyPlaceResult Is Nothing Then
        System.Diagnostics.Debug.WriteIf(MyPlaceResult.Title)
      End If
      Exit Sub
    'Case statements to catch other menu types could go here
    End Select
End Sub

Inheritance Hierarchy

System.Object
   ESRI.ArcGIS.E2API.ResultInfo

Platforms

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Version Information

This class was added to the E2API at version 1.0.0.348.

See Also