@microsoft.azure/autorest.incubator
Version:
AutoRest incubator project
46 lines • 3.5 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const expression_1 = require("../csharp/code-dom/expression");
const mscorlib_1 = require("../csharp/code-dom/mscorlib");
const namespace_1 = require("../csharp/code-dom/namespace");
const clientruntime_1 = require("../csharp/lowlevel-generator/clientruntime");
const intersect_1 = require("../common/intersect");
const class_1 = require("../csharp/code-dom/class");
const sma = new namespace_1.Namespace(`System.Management.Automation`);
exports.PSCmdlet = new mscorlib_1.LibraryType(sma, `PSCmdlet`);
exports.PSObject = new mscorlib_1.LibraryType(sma, `PSObject`);
exports.CmdletAttribute = new mscorlib_1.LibraryType(sma, `Cmdlet`);
exports.ParameterAttribute = new mscorlib_1.LibraryType(sma, `Parameter`);
exports.PSTypeConverter = new class_1.Class(sma, `PSTypeConverter`);
exports.ValidateNotNull = new mscorlib_1.LibraryType(sma, `ValidateNotNull`);
exports.Alias = new mscorlib_1.LibraryType(sma, `Alias`);
exports.AliasAttribte = new mscorlib_1.LibraryType(sma, `Alias`);
exports.TypeConverterAttribute = new mscorlib_1.LibraryType('System.ComponentModel', `TypeConverter`);
exports.ResourceGroupCompleter = new mscorlib_1.LibraryType(sma, `ResourceGroupCompleter`);
exports.OutputTypeAttribute = new mscorlib_1.LibraryType(sma, `OutputType`);
exports.ErrorRecord = new mscorlib_1.LibraryType(sma, `ErrorRecord`);
exports.SwitchParameter = new mscorlib_1.LibraryType(sma, 'SwitchParameter');
exports.AsyncCommandRuntime = new mscorlib_1.LibraryType(clientruntime_1.ClientRuntime, `PowerShell.AsyncCommandRuntime`);
exports.AsyncJob = new mscorlib_1.LibraryType(clientruntime_1.ClientRuntime, `PowerShell.AsyncJob`);
function ErrorCategory(category) {
return new expression_1.LiteralExpression(`${sma}.ErrorCategory.${category}`);
}
exports.ErrorCategory = ErrorCategory;
function verbEnum(category, verb) {
return new expression_1.LiteralExpression(`${category}.${verb}`);
}
exports.verbEnum = verbEnum;
exports.Events = intersect_1.intersect(clientruntime_1.ClientRuntime.Events, {
CmdletProcessRecordStart: new expression_1.LiteralExpression(`${clientruntime_1.ClientRuntime.Events.declaration}.CmdletProcessRecordStart`),
CmdletException: new expression_1.LiteralExpression(`${clientruntime_1.ClientRuntime.Events.declaration}.CmdletException`),
CmdletGetPipeline: new expression_1.LiteralExpression(`${clientruntime_1.ClientRuntime.Events.declaration}.CmdletGetPipeline`),
CmdletBeforeAPICall: new expression_1.LiteralExpression(`${clientruntime_1.ClientRuntime.Events.declaration}.CmdletBeforeAPICall`),
CmdletAfterAPICall: new expression_1.LiteralExpression(`${clientruntime_1.ClientRuntime.Events.declaration}.CmdletAfterAPICall`),
FollowingNextLink: new expression_1.LiteralExpression(`${clientruntime_1.ClientRuntime.Events.declaration}.FollowingNextLink`),
Verbose: new expression_1.LiteralExpression(`${clientruntime_1.ClientRuntime.Events.declaration}.Verbose`),
Debug: new expression_1.LiteralExpression(`${clientruntime_1.ClientRuntime.Events.declaration}.Debug`),
Information: new expression_1.LiteralExpression(`${clientruntime_1.ClientRuntime.Events.declaration}.Information`),
Error: new expression_1.LiteralExpression(`${clientruntime_1.ClientRuntime.Events.declaration}.Error`),
Warning: new expression_1.LiteralExpression(`${clientruntime_1.ClientRuntime.Events.declaration}.Warning`),
});
//# sourceMappingURL=powershell-declarations.js.map