PageRenderTime 28ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/Silverlight.4/Microsoft.WebAnalytics/WebAnalyticsServiceWizard/DTWizard.cs

#
C# | 48 lines | 24 code | 6 blank | 18 comment | 3 complexity | 72fac3480d47142f14ae5886eab3a91a MD5 | raw file
Possible License(s): CC-BY-SA-3.0
  1. // <copyright file="DTWizard.cs" company="Microsoft Corporation">
  2. // Copyright (c) 2009 Microsoft Corporation All Rights Reserved
  3. // </copyright>
  4. // <author>Michael S. Scherotter</author>
  5. // <email>mischero@microsoft.com</email>
  6. // <date>2010-01-20</date>
  7. // <summary>DTWizard class definition</summary>
  8. namespace WebAnalyticsServiceWizard
  9. {
  10. using System.Diagnostics.CodeAnalysis;
  11. using System.Runtime.InteropServices;
  12. using EnvDTE;
  13. /// <summary>
  14. /// Developer Environment Wizard
  15. /// </summary>
  16. [ComVisible(true)]
  17. public class DTWizard : IDTWizard
  18. {
  19. #region IDTWizard Members
  20. /// <summary>
  21. /// Modify the App.xaml to add the WebAnalyticsService to the ApplicationLifetimeObjects
  22. /// </summary>
  23. /// <param name="application">the Visual Studio Application</param>
  24. /// <param name="hwndOwner">the window</param>
  25. /// <param name="contextParams">the context parameters</param>
  26. /// <param name="customParams">the custom parameters</param>
  27. /// <param name="retval">the return value</param>
  28. [SuppressMessage("Microsoft.Naming", "CA1725:ParameterNamesShouldMatchBaseDeclaration", MessageId = "3#", Justification = "Conflicts with StyleCop"),
  29. SuppressMessage("Microsoft.Naming", "CA1725:ParameterNamesShouldMatchBaseDeclaration", MessageId = "2#", Justification = "Conflicts with StyleCop"),
  30. SuppressMessage("Microsoft.Naming", "CA1725:ParameterNamesShouldMatchBaseDeclaration", MessageId = "0#", Justification = "Conflicts with StyleCop")]
  31. public void Execute(object application, int hwndOwner, ref object[] contextParams, ref object[] customParams, ref wizardResult retval)
  32. {
  33. if (contextParams != null && contextParams.Length > 0)
  34. {
  35. var projectName = contextParams[1] as string;
  36. AppXamlUpdater.ModifyAppXaml(application, projectName);
  37. retval = wizardResult.wizardResultSuccess;
  38. }
  39. }
  40. #endregion
  41. }
  42. }