Class Application<TPrimitiveContent>
Inheritance
object
Application<TPrimitiveContent>
Assembly: Aetheros.OneM2M.Api.dll
Syntax
public class Application<TPrimitiveContent> where TPrimitiveContent : PrimitiveContent, new()
Type Parameters
Name |
Description |
TPrimitiveContent |
|
Constructors
|
Edit this page
View Source
Application(Connection<TPrimitiveContent>, AE, string)
Declaration
public Application(Connection<TPrimitiveContent> con, AE ae, string urlPrefix)
Parameters
Properties
|
Edit this page
View Source
Ae
Declaration
Property Value
|
Edit this page
View Source
AeId
Declaration
public string AeId { get; }
Property Value
|
Edit this page
View Source
Connection
Declaration
public Connection<TPrimitiveContent> Connection { get; }
Property Value
|
Edit this page
View Source
CseId
Declaration
public string CseId { get; }
Property Value
Methods
|
Edit this page
View Source
AddContentInstanceAsync(string, object)
Declaration
public Task<ContentInstance> AddContentInstanceAsync(string key, object content)
Parameters
Type |
Name |
Description |
string |
key |
|
object |
content |
|
Returns
|
Edit this page
View Source
AddContentInstanceAsync(string, string?, object)
Declaration
public Task<ContentInstance> AddContentInstanceAsync(string key, string? resourceName, object content)
Parameters
Type |
Name |
Description |
string |
key |
|
string |
resourceName |
|
object |
content |
|
Returns
|
Edit this page
View Source
CreateResourceAsync(string, ResourceType, Func<TPrimitiveContent, TPrimitiveContent>, ResultContent?)
Declaration
public Task<ResponseContent<TPrimitiveContent>> CreateResourceAsync(string url, ResourceType resourceType, Func<TPrimitiveContent, TPrimitiveContent> setter, ResultContent? resultContent = null)
Parameters
Returns
|
Edit this page
View Source
DeleteAsync(IEnumerable<string>)
Declaration
public Task DeleteAsync(IEnumerable<string> urls)
Parameters
Returns
|
Edit this page
View Source
DeleteAsync(params string[])
Declaration
public Task DeleteAsync(params string[] urls)
Parameters
Type |
Name |
Description |
string[] |
urls |
|
Returns
|
Edit this page
View Source
EnsureContainerAsync(string, string?)
Declaration
public Task<Container?> EnsureContainerAsync(string name, string? aclUri = null)
Parameters
Returns
|
Edit this page
View Source
FilterContentInstances<TContent>(IObservable<NotificationNotificationEvent<TPrimitiveContent>>)
Declaration
public IObservable<TContent> FilterContentInstances<TContent>(IObservable<NotificationNotificationEvent<TPrimitiveContent>> observable) where TContent : class
Parameters
Returns
Type Parameters
Name |
Description |
TContent |
|
|
Edit this page
View Source
GenerateSigningCertificateAsync(Uri, AE, string)
Declaration
public static Task<X509Certificate2> GenerateSigningCertificateAsync(Uri caUri, AE ae, string certificateFilename)
Parameters
Type |
Name |
Description |
Uri |
caUri |
|
AE |
ae |
|
string |
certificateFilename |
|
Returns
|
Edit this page
View Source
GetChildResourcesAsync<T>(string, FilterCriteria?)
Declaration
public Task<T> GetChildResourcesAsync<T>(string key, FilterCriteria? filterCriteria = null) where T : class, new()
Parameters
Returns
Type Parameters
|
Edit this page
View Source
GetLatestContentInstanceAsync<T>(string)
Declaration
public Task<T?> GetLatestContentInstanceAsync<T>(string containerKey) where T : class
Parameters
Type |
Name |
Description |
string |
containerKey |
|
Returns
Type Parameters
|
Edit this page
View Source
GetPrimitiveAsync(string, FilterCriteria?, ResultContent?, DiscResType?)
Declaration
public Task<ResponseContent<TPrimitiveContent>> GetPrimitiveAsync(string key, FilterCriteria? filterCriteria = null, ResultContent? resultContent = null, DiscResType? discoveryResultType = null)
Parameters
Returns
|
Edit this page
View Source
GetResponseAsync(RequestPrimitive<TPrimitiveContent>)
Declaration
public Task<ResponseContent<TPrimitiveContent>> GetResponseAsync(RequestPrimitive<TPrimitiveContent> body)
Parameters
Returns
|
Edit this page
View Source
GetResponseAsync<T>(RequestPrimitive<TPrimitiveContent>)
Declaration
public Task<T> GetResponseAsync<T>(RequestPrimitive<TPrimitiveContent> body) where T : class, new()
Parameters
Returns
Type Parameters
|
Edit this page
View Source
ObserveContentInstanceAsync<TContent>(string, string, string?, bool, int)
Declaration
public Task<IObservable<TContent>> ObserveContentInstanceAsync<TContent>(string containerName, string subscriptionName, string? poaUrl = null, bool deleteAfterFinalClose = false, int batchSize = 1) where TContent : class
Parameters
Returns
Type Parameters
Name |
Description |
TContent |
|
|
Edit this page
View Source
ObserveNotificationAsync(string, string, EventNotificationCriteria?, string?, bool, int)
Creates a subscription to receive notifications from the server.
The subscription is created on the resource specified by resourceId.
The subscription is identified by the subscriptionName.
Declaration
public Task<IObservable<NotificationNotificationEvent<TPrimitiveContent>>> ObserveNotificationAsync(string resourceId, string subscriptionName, EventNotificationCriteria? criteria = null, string? poaUrl = null, bool deleteAfterFinalClose = false, int batchSize = 1)
Parameters
Type |
Name |
Description |
string |
resourceId |
the resource (eg. Container) to subscribe to
|
string |
subscriptionName |
the unique name of the subscription
|
EventNotificationCriteria |
criteria |
allows filtering of notifications
|
string |
poaUrl |
overrides the AE's default POA URL
|
bool |
deleteAfterFinalClose |
if this is true, the subscription will be deleted after the returned observable is disposed
|
int |
batchSize |
enables batching of notifications in a single request
|
Returns
Exceptions
|
Edit this page
View Source
RegisterAsync(IConnectionConfiguration, ApplicationConfiguration, Uri?)
Declaration
public static Task<Application<TPrimitiveContent>> RegisterAsync(Connection.IConnectionConfiguration m2mConfig, ApplicationConfiguration appConfig, Uri? caUri = null)
Parameters
Returns
|
Edit this page
View Source
ToAbsolute(string)
Declaration
public string ToAbsolute(string key)
Parameters
Type |
Name |
Description |
string |
key |
|
Returns
|
Edit this page
View Source
TryGetPrimitiveAsync(string)
Declaration
public Task<ResponseContent<TPrimitiveContent>> TryGetPrimitiveAsync(string url)
Parameters
Type |
Name |
Description |
string |
url |
|
Returns
|
Edit this page
View Source
UpdateResourceAsync(string, Func<TPrimitiveContent, TPrimitiveContent>)
Declaration
public Task<ResponseContent<TPrimitiveContent>> UpdateResourceAsync(string url, Func<TPrimitiveContent, TPrimitiveContent> setter)
Parameters
Type |
Name |
Description |
string |
url |
|
Func<TPrimitiveContent, TPrimitiveContent> |
setter |
|
Returns