PowerShell/src/Microsoft.PowerShell.Commands.Diagnostics/GetEventSnapin.cs

110 lines
2.8 KiB
C#
Raw Normal View History

// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using System;
using System.Collections.Generic;
using System.ComponentModel;
2019-04-30 07:25:11 +02:00
using System.Management.Automation;
using System.Text;
namespace Microsoft.PowerShell.Commands
{
/// <summary>
2017-01-16 22:31:14 +01:00
/// Create the PowerShell snap-in used to register the
/// Get-WinEvent cmdlet. Declaring the PSSnapIn class identifies
/// this .cs file as a PowerShell snap-in.
/// </summary>
[RunInstaller(true)]
public class GetEventPSSnapIn : PSSnapIn
{
/// <summary>
/// Create an instance of the GetEventPSSnapIn class.
/// </summary>
public GetEventPSSnapIn()
: base()
{
}
/// <summary>
/// Specify the name of the PowerShell snap-in.
/// </summary>
public override string Name
{
get
{
return "Microsoft.Powershell.GetEvent";
}
}
/// <summary>
/// Specify the vendor of the PowerShell snap-in.
/// </summary>
public override string Vendor
{
get
{
return "Microsoft";
}
}
/// <summary>
2017-01-16 22:31:14 +01:00
/// Get resource information for vendor. This is a string of format: resourceBaseName,resourceName.
/// </summary>
public override string VendorResource
{
get
{
return "GetEventResources,Vendor";
}
}
/// <summary>
/// Specifies the description of the PowerShell snap-in.
/// </summary>
public override string Description
{
get
{
return "This PS snap-in contains Get-WinEvent cmdlet used to read Windows event log data and configuration.";
}
}
/// <summary>
2017-01-16 22:31:14 +01:00
/// Get resource information for description. This is a string of format: resourceBaseName,resourceName.
/// </summary>
public override string DescriptionResource
{
get
{
return "GetEventResources,Description";
}
}
/// <summary>
/// Get type files to be used for this mshsnapin.
/// </summary>
public override string[] Types
{
get
{
return _types;
}
}
Code cleanup: Add space after closing brace where needed (#8530) * Update TestService * Update WebListener * Update Controllers * Update ExpTest * Update MyApp * Update Logic * Update Logic * Update MyApp * Update Microsoft.Management.Infrastructure.CimCmdlets * Update Microsoft.PowerShell.Commands.Diagnostics * Update Microsoft.PowerShell.ScheduledJob * Update Microsoft.WSMan.Management * Update Microsoft.WSMan.Runtime * Update ResGen * Update TypeCatalogGen * Update commands * Update Eventing * Update Reader * Update utility * Update ShowCommand * Update trace * Update WebCmdlet * Update Common * Update CoreCLR * Update common * Update format-object * Update format-wide * Update out-file * Update out-printer * Update out-string * Update OutGridView * Update LocalAccounts * Update Commands * Update security * Update CoreCLR * Update DscSupport * Update engine * Update help * Update logging * Update namespaces * Update security * Update utils * Update config * Update perfCounters * Update tracing * Update cmdletization * Update other * Update cim * Update xml * Update CoreCLR * Update common * Update DefaultFormatters * Update out-console * Update out-textInterface * Update DisplayDatabase * Update Utilities * Update COM * Update ComInterop * Update CommandCompletion * Update debugger * Update ExperimentalFeature * Update hostifaces * Update interpreter * Update lang * Update Modules * Update parser * Update runtime * Update client * Update commands * Update common * Update fanin * Update server * Update WireDataFormat * Update Binding * Update Operations * Update interface * Update cmdletization * Update cim * Update management * Update WindowsTaskbarJumpList * Update msh
2018-12-24 07:20:06 +01:00
private string[] _types = new string[] { "getevent.types.ps1xml" };
/// <summary>
/// Get format files to be used for this mshsnapin.
/// </summary>
public override string[] Formats
{
get
{
return _formats;
}
}
private string[] _formats = new string[] { "Event.format.ps1xml" };
}
}