Commit a01ada09 authored by Hirsch Singhal's avatar Hirsch Singhal Committed by Jason Williams
Browse files

v0.9.1 Release - Async Breaking Change and Dump Collection (#195)

* DeviceLab sample

* This is what I showed to Dave

* Committing so that I can change machines and not loose my work

* Added a bunch of finishing touches

* Latest polish

* Added a nifty CommandSequence class

* Implemented a nifty CommandSequence class and then used it for the DevicePortalCommand model

* Code cleanup + style cop. Checking in for demo

* Finished satisfyint StyleCop

* Committing before merging changes from upstream

* Integrated the new DeviceSignIn view. Fixed the timing issue in the reestablish connection retry loop. Made rename more robust. Stronger check for duplicates using the cannonical IP address

* Renamed DeviceLab to SampleDeviceCollection

* Added finishing touches to the code. Getting it ready for a pull request

* Breaking Change: Updating async methods to follow C# async naming conventions (#188)

And updating version number.

* Update calls into the wrapper to use the latest async naming convention

* Not tracking sync.cmd

* Ended up with a stray orig file. Deleting

* Change array return types to Lists for #189 (#191)

* App, process, and crash dump collection APIs (#193)

* Add usermode crash dump APIs

* Additional fixes to DumpCollection

* Add kernel, live, and app dump APIs.

* StyleCop pass
parent 44ba9798
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@
*.user
*.userosscache
*.sln.docstates
sync.cmd

# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
+6 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <startup> 
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
    </startup>
</configuration>
 No newline at end of file
+9 −0
Original line number Diff line number Diff line
<Application x:Class="SampleDeviceCollection.App"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:local="clr-namespace:SampleDeviceCollection"
             StartupUri="MainWindow.xaml">
    <Application.Resources>
        <ResourceDictionary Source="Themes\CustomStyles.xaml" />
    </Application.Resources>
</Application>
+16 −0
Original line number Diff line number Diff line
//----------------------------------------------------------------------------------------------
// <copyright file="App.xaml.cs" company="Microsoft Corporation">
//     Licensed under the MIT License. See LICENSE.TXT in the project root license information.
// </copyright>
//----------------------------------------------------------------------------------------------
using System.Windows;

namespace SampleDeviceCollection
{
    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
    public partial class App : Application
    {
    }
}
+105 −0
Original line number Diff line number Diff line
//----------------------------------------------------------------------------------------------
// <copyright file="BooleanConverter.cs" company="Microsoft Corporation">
//     Licensed under the MIT License. See LICENSE.TXT in the project root license information.
// </copyright>
//----------------------------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Windows;
using System.Windows.Data;

namespace SampleDeviceCollection
{
    //-------------------------------------------------------------------
    //  Boolean Converter
    //-------------------------------------------------------------------
    #region Boolean Converter
    /// <summary>
    ///     Template allows for easy creation of a value converter for bools
    /// </summary>
    /// <typeparam name="T">Type to convert back and forth to boolean</typeparam>
    /// <remarks>
    ///     See BooleanToVisibilityConverter and BooleanToBrushConverter (below) and usage in Generic.xaml
    /// </remarks>
    public class BooleanConverter<T> : IValueConverter
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="BooleanConverter{T}" /> class.
        /// </summary>
        /// <param name="trueValue">The value of type T that represents true</param>
        /// <param name="falseValue">The value of type T that represents false</param>
        public BooleanConverter(T trueValue, T falseValue)
        {
            this.True = trueValue;
            this.False = falseValue;
        }

        /// <summary>
        /// Gets or sets the value that represents true
        /// </summary>
        public T True { get; set; }

        /// <summary>
        /// Gets or sets the value that represetns false
        /// </summary>
        public T False { get; set; }

        /// <summary>
        /// Convert an object of type T to boolean
        /// </summary>
        /// <param name="value">Object of type T to convert</param>
        /// <param name="targetType">The parameter is not used.</param>
        /// <param name="parameter">The parameter is not used.</param>
        /// <param name="culture">The parameter is not used.</param>
        /// <returns>Object of boolean value</returns>
        public virtual object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            return value is bool && ((bool)value) ? this.True : this.False;
        }

        /// <summary>
        /// Convert a boolean value to an object of type T
        /// </summary>
        /// <param name="value">The boolean value to convert</param>
        /// <param name="targetType">The parameter is not used.</param>
        /// <param name="parameter">The parameter is not used.</param>
        /// <param name="culture">The parameter is not used.</param>
        /// <returns>Object of type T</returns>
        public virtual object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            return value is T && EqualityComparer<T>.Default.Equals((T)value, this.True);
        }
    }

    /// <summary>
    /// Converter between a boolean and visibility value
    /// </summary>
    [type: System.Diagnostics.CodeAnalysis.SuppressMessage("StyleCop.CSharp.MaintainabilityRules", "SA1402:FileMayOnlyContainASingleClass", Justification = "Small classes are all instances of the same generic and are better organized in a single file.")]
    public sealed class BooleanToVisibilityConverter : BooleanConverter<Visibility>
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="BooleanToVisibilityConverter" /> class.
        /// </summary>
        public BooleanToVisibilityConverter() :
            base(Visibility.Visible, Visibility.Hidden)
        {
        }
    }

    /// <summary>
    /// Converter between a boolean and either "http" or "https"
    /// </summary>
    [type: System.Diagnostics.CodeAnalysis.SuppressMessage("StyleCop.CSharp.MaintainabilityRules", "SA1402:FileMayOnlyContainASingleClass", Justification = "Small classes are all instances of the same generic and are better organized in a single file.")]
    public sealed class BooleanToHttpsConverter : BooleanConverter<string>
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="BooleanToHttpsConverter" /> class.
        /// </summary>
        public BooleanToHttpsConverter() :
            base("https", "http")
        {
        }
    }
    #endregion // Boolean Converter
}
Loading