Exemplo n.º 1
0
    // uncloak
    // cloak

    /*
     * // uncloak
     * public static void Main()
     * // cloak
     */
    public void Main()
    // uncloak
    {
        var options = new DeviceListOptions
        {
            MaxResults = 10     // Limit to ten devices
        };

        // List the first ten devices on your Pelion Device Management account.
        foreach (var device in new DeviceRepository().List(options))
        {
            Console.WriteLine($"Hello device {device.Name}");
        }
    }
    // uncloak
    // cloak

    /*
     * // uncloak
     * public static void Main()
     * // cloak
     */
    public void Main()
    // uncloak
    {
        // Create an instance of the Pelion Device Management SDK
        var sdk = new SDK();

        var options = new DeviceListOptions
        {
            MaxResults = 10     // Limit to ten devices
        };

        // List the first ten devices on your Pelion Device Management account
        foreach (var device in sdk.Foundation().DeviceRepository().List(options))
        {
            Console.WriteLine($"Hello device {device.Name}");
        }
    }
Exemplo n.º 3
0
    // uncloak
    // cloak

    /*
     * // uncloak
     * public static void Main()
     * // cloak
     */
    public void Main()
    // uncloak
    {
        // Create instances of the Pelion Device Management SDK for two accounts
        var account_one = new SDK(API_KEY_ONE);
        var account_two = new SDK(API_KEY_TWO);

        var options = new DeviceListOptions
        {
            MaxResults = 10     // Limit to ten devices
        };

        // List the first ten devices on the first account
        foreach (var device in account_one.Foundation().DeviceRepository().List(options))
        {
            Console.WriteLine("Account One device " + device.Name);
        }

        // List the first ten devices on the second account
        foreach (var device in account_two.Foundation().DeviceRepository().List(options))
        {
            Console.WriteLine("Account Two device " + device.Name);
        }
    }