-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated to new Visual Studio 2019 Preview
- Loading branch information
Showing
1,128 changed files
with
296,294 additions
and
2,756 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// This file is used by Code Analysis to maintain SuppressMessage | ||
// attributes that are applied to this project. | ||
// Project-level suppressions either have no target or are given | ||
// a specific target and scoped to a namespace, type, member, etc. | ||
// | ||
// To add a suppression to this file, right-click the message in the | ||
// Error List, point to "Suppress Message(s)", and click | ||
// "In Project Suppression File". | ||
// You do not need to add suppressions to this file manually. | ||
|
||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1014:MarkAssembliesWithClsCompliant")] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
// Copyright (c) 2007 Joel Bennett | ||
// This File is license under the Ms Reciprocal License | ||
|
||
// Copyright Grant- Subject to the terms of this license, each contributor grants you | ||
// a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, | ||
// prepare derivative works of its contribution, and distribute its contribution or any | ||
// derivative works that you create. | ||
|
||
// Conditions and Limitations | ||
|
||
// Reciprocal Grants- For any file you distribute that contains code from the software | ||
// (in source code or binary format), you must provide recipients the source code to that | ||
// file along with a copy of this license, which license will govern that file. You may | ||
// license other files that are entirely your own work and do not contain code from the | ||
// software under any terms you choose. | ||
|
||
// ***************************************************************************** | ||
// NOTE: For current and complete licensing information please see: | ||
// http://www.codeplex.com/WASP/Project/License.aspx | ||
// | ||
|
||
using System.Management.Automation; | ||
using System.Runtime.InteropServices; | ||
using System.Windows.Automation; | ||
|
||
namespace Huddled.Wasp | ||
{ | ||
//[Cmdlet(VerbsDiagnostic.Test, "Window")] | ||
[Cmdlet("Nothing", "Window", DefaultParameterSetName = "Default", SupportsShouldProcess = true)] | ||
public abstract class AutomationElementCmdletBase : Cmdlet | ||
{ | ||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")] | ||
[Parameter(Position = 100, Mandatory = true, | ||
ValueFromPipeline = true, ValueFromPipelineByPropertyName = true, | ||
HelpMessage = "A list of AutomationElements for this cmdlet to act on.")] | ||
[Alias("Element")] | ||
public AutomationElement[] Window { get; set; } | ||
|
||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Passthru")] | ||
[Parameter] | ||
public SwitchParameter Passthru { get; set; } | ||
|
||
public abstract void ProcessAutomationElement(AutomationElement element); | ||
|
||
protected override void ProcessRecord() | ||
{ | ||
foreach (AutomationElement w in Window) | ||
{ | ||
if (ShouldProcess(w.ToString())) | ||
{ | ||
ProcessAutomationElement(w); | ||
} | ||
|
||
if (Passthru.IsPresent && Passthru.ToBool()) | ||
{ | ||
WriteObject(w); | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.