AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Represents any useful event you wish to record in your application. The example below shows how to use CustomEvent

CustomEvent customEvent = new CustomEvent("level_complete");   
                
customEvent.AddAttribute("LevelName","Level1");
customEvent.AddAttribute("Successful","True");
customEvent.AddMetric("Score",12345);
customEvent.AddMetric("TimeInLevel",64);   
                
analyticsManager.RecordEvent(customEvent);
            

Inheritance Hierarchy

System.Object
  Amazon.MobileAnalytics.MobileAnalyticsManager.CustomEvent

Namespace: Amazon.MobileAnalytics.MobileAnalyticsManager
Assembly: AWSSDK.MobileAnalytics.dll
Version: 3.x.y.z

Syntax

C#
public class CustomEvent
         IEvent

The CustomEvent type exposes the following members

Constructors

NameDescription
Public Method CustomEvent(string)

Initializes a new instance of the Amazon.MobileAnalytics.MobileAnalyticsManager.CustomEvent class.

Properties

NameTypeDescription
Public Property AllAttributes System.Collections.Generic.IDictionary<System.String, System.String>

Gets copy of all attributes.

Public Property AllMetrics System.Collections.Generic.IDictionary<System.String, System.Double>

Gets copy of all metrics.

Methods

Note:

Asynchronous operations (methods ending with Async) in the table below are for .NET 4.5 or higher. For .NET 3.5 the SDK follows the standard naming convention of BeginMethodName and EndMethodName to indicate asynchronous operations - these method pairs are not shown in the table below.

NameDescription
Public Method AddAttribute(string, string)

Adds the attribute.

Public Method AddGlobalAttribute(string, string)

Adds the global attribute, which is valid for all events.

Public Method AddGlobalAttribute(string, string, string)

Adds the global attribute, which is valid to some specific event type.

Public Method AddGlobalMetric(string, double)

Adds the global metric, which is valid for all events.

Public Method AddGlobalMetric(string, string, double)

Adds the global metric, which is valid for some specific event type.

Public Method AddMetric(string, double)

Adds the metric.

Public Method GetAttribute(string)

Gets the attribute.

Public Method GetGlobalAttribute(string)

Gets the global attribute, which is valid for all events.

Public Method GetGlobalAttribute(string, string)

Gets the global attribute, which is valid for some specific event type.

Public Method GetGlobalMetric(string)

Gets the global metric, which is valid for all events.

Public Method GetGlobalMetric(string, string)

Gets the global metric, which is valid for some specific event type.

Public Method GetMetric(string)

Gets the metric.

Public Method HasAttribute(string)

Determines whether this instance has attribute the specified attributeName.

Public Method HasMetric(string)

Determines whether this instance has metric the specified metricName.

Public Method RemoveGlobalAttribute(string)

Removes the global attribute, which is valid for all events.

Public Method RemoveGlobalAttribute(string, string)

Removes the global attribute, which is valid to some specific event type.

Public Method RemoveGlobalMetric(string)

Removes the global metric, which is valid for all events.

Public Method RemoveGlobalMetric(string, string)

Removes the global metric, which is valid for some specific event type.

Version Information

.NET Framework:
Supported in: 4.5, 4.0, 3.5

Portable Class Library:
Supported in: Windows Store Apps
Supported in: Windows Phone 8.1
Supported in: Xamarin Android
Supported in: Xamarin iOS (Unified)
Supported in: Xamarin.Forms

Unity:
Supported Versions: 4.6 and above
Supported Platforms: Android, iOS, Standalone