CortanaActionableInsights.ShowInsightsForTextAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
ShowInsightsForTextAsync(String) |
Asynchronously retrieves and displays insights based on the specified text content. |
ShowInsightsForTextAsync(String, CortanaActionableInsightsOptions) |
Asynchronously retrieves and displays insights based on the specified text content and options. |
ShowInsightsForTextAsync(String)
Asynchronously retrieves and displays insights based on the specified text content.
public:
virtual IAsyncAction ^ ShowInsightsForTextAsync(Platform::String ^ text) = ShowInsightsForTextAsync;
/// [Windows.Foundation.Metadata.Overload("ShowInsightsForTextAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncAction ShowInsightsForTextAsync(winrt::hstring const& text);
/// [Windows.Foundation.Metadata.Overload("ShowInsightsForTextAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
/// [Windows.Foundation.Metadata.Deprecated("CortanaActionableInsights is deprecated and might not work on all platforms. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 655360, "Windows.Foundation.UniversalApiContract")]
IAsyncAction ShowInsightsForTextAsync(winrt::hstring const& text);
[Windows.Foundation.Metadata.Overload("ShowInsightsForTextAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncAction ShowInsightsForTextAsync(string text);
[Windows.Foundation.Metadata.Overload("ShowInsightsForTextAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
[Windows.Foundation.Metadata.Deprecated("CortanaActionableInsights is deprecated and might not work on all platforms. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 655360, "Windows.Foundation.UniversalApiContract")]
public IAsyncAction ShowInsightsForTextAsync(string text);
function showInsightsForTextAsync(text)
Public Function ShowInsightsForTextAsync (text As String) As IAsyncAction
Parameters
- text
-
String
Platform::String
winrt::hstring
The text that defines the scope of the insights returned.
Returns
Returns an IAsyncAction object that is used to control asynchronous execution. If the system does not support showing insights, the method has no effect. An app can check for this case using the IsAvailableAsync method.
- Attributes
Windows requirements
App capabilities |
cortanaSurface
|
Remarks
The CortanaActionableInsights class requires the following be added to the Package.appxmanifest:
- To <Package>
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
IgnorableNamespaces="rescap"
- Under <Capabilities>
<rescap:capability name="cortanaSurface"/>
See also
Applies to
ShowInsightsForTextAsync(String, CortanaActionableInsightsOptions)
Asynchronously retrieves and displays insights based on the specified text content and options.
public:
virtual IAsyncAction ^ ShowInsightsForTextAsync(Platform::String ^ text, CortanaActionableInsightsOptions ^ options) = ShowInsightsForTextAsync;
/// [Windows.Foundation.Metadata.Overload("ShowInsightsForTextWithOptionsAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncAction ShowInsightsForTextAsync(winrt::hstring const& text, CortanaActionableInsightsOptions const& options);
/// [Windows.Foundation.Metadata.Overload("ShowInsightsForTextWithOptionsAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
/// [Windows.Foundation.Metadata.Deprecated("CortanaActionableInsights is deprecated and might not work on all platforms. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 655360, "Windows.Foundation.UniversalApiContract")]
IAsyncAction ShowInsightsForTextAsync(winrt::hstring const& text, CortanaActionableInsightsOptions const& options);
[Windows.Foundation.Metadata.Overload("ShowInsightsForTextWithOptionsAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncAction ShowInsightsForTextAsync(string text, CortanaActionableInsightsOptions options);
[Windows.Foundation.Metadata.Overload("ShowInsightsForTextWithOptionsAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
[Windows.Foundation.Metadata.Deprecated("CortanaActionableInsights is deprecated and might not work on all platforms. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 655360, "Windows.Foundation.UniversalApiContract")]
public IAsyncAction ShowInsightsForTextAsync(string text, CortanaActionableInsightsOptions options);
function showInsightsForTextAsync(text, options)
Public Function ShowInsightsForTextAsync (text As String, options As CortanaActionableInsightsOptions) As IAsyncAction
Parameters
- text
-
String
Platform::String
winrt::hstring
The text that defines the scope of the insights returned.
- options
- CortanaActionableInsightsOptions
The options that constrain the scope of the insights returned.
Returns
Returns an IAsyncAction object used to control asynchronous execution. If the system does not support showing insights, the method has no effect. An app can check for this case using the IsAvailableAsync method.
- Attributes
Windows requirements
App capabilities |
cortanaSurface
|
Remarks
The CortanaActionableInsights class requires the following be added to the Package.appxmanifest:
- To <Package>
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
IgnorableNamespaces="rescap"
- Under <Capabilities>
<rescap:capability name="cortanaSurface"/>