AppServiceConnection AppServiceConnection AppServiceConnection AppServiceConnection AppServiceConnection Class

Definition

Represents a connection to the endpoint for an app service. App services enable app-to-app communication by allowing you to provide services from your Universal Windows app to other Universal Windows app.

public : sealed class AppServiceConnection : IAppServiceConnection, IAppServiceConnection2, IClosable
struct winrt::Windows::ApplicationModel::AppService::AppServiceConnection : IAppServiceConnection, IAppServiceConnection2, IClosable
public sealed class AppServiceConnection : IAppServiceConnection, IAppServiceConnection2, IDisposable
Public NotInheritable Class AppServiceConnection Implements IAppServiceConnection, IAppServiceConnection2, IDisposable
var appServiceConnection = new appServiceConnection();
Attributes

Windows 10 requirements

Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Constructors

AppServiceConnection() AppServiceConnection() AppServiceConnection() AppServiceConnection() AppServiceConnection()

Creates and initializes a new instance of the AppServiceConnection class.

Properties

AppServiceName AppServiceName AppServiceName AppServiceName AppServiceName

Gets or sets the name of the app service to which you want to connect.

PackageFamilyName PackageFamilyName PackageFamilyName PackageFamilyName PackageFamilyName

Gets or sets the package family name for the package that contains the endpoint for the app service.

User User User User User

Gets/sets the user context. This property returns null if the caller did not specify a user.

Methods

Close() Close() Close() Close() Close()

Closes the connection to the app service.

Dispose() Dispose() Dispose() Dispose() Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

OpenAsync() OpenAsync() OpenAsync() OpenAsync() OpenAsync()

Opens a connection to the endpoint for the app service.

OpenRemoteAsync(RemoteSystemConnectionRequest) OpenRemoteAsync(RemoteSystemConnectionRequest) OpenRemoteAsync(RemoteSystemConnectionRequest) OpenRemoteAsync(RemoteSystemConnectionRequest) OpenRemoteAsync(RemoteSystemConnectionRequest)

Opens a connection to the endpoint on another device for the app service.

SendMessageAsync(ValueSet) SendMessageAsync(ValueSet) SendMessageAsync(ValueSet) SendMessageAsync(ValueSet) SendMessageAsync(ValueSet)

Sends a message to the other endpoint of the app service connection.

Events

RequestReceived RequestReceived RequestReceived RequestReceived RequestReceived

Occurs when a message arrives from the other endpoint of the app service connection.

ServiceClosed ServiceClosed ServiceClosed ServiceClosed ServiceClosed

Occurs when the other endpoint closes the connection to the app service.

See also