用于销毁资源的 Powershell 动词
我一直在尝试坚持使用批准的列表命名我的 cmdlet 时的 Powershell 动词。我有一个创建资源的函数,因此它称为 New-ClearCaseView。我还想创建一个函数,一旦不再使用该资源就将其销毁。但是,我没有看到任何与 New 搭配的成对动词。我认为“删除”动词最接近,但那是为了从集合中删除资源,而不是实际销毁资源。
有什么建议吗?是否有更多最新的可接受的 Powershell 动词列表?
谢谢!
I've been trying to stick with the approved list of Powershell verbs when naming my cmdlets. I have a function which creates a resource, so it's called New-ClearCaseView. I'd also like to make a function which destroys this resource once it is no longer in use. However, I don't see any pair verb to go with New. The Remove verb is closest I think, but that's for removing a resource from a collection, not for actually destroying a resource.
Any suggestions? Is there any more up to date list of accepted Powershell verbs?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Remove 将是常用的动词(例如,
del
是Remove-Item
的别名)。取消发布可能是另一种可能性(但前提是您的新以类似于发布的方式使用)。同样取消注册(通常与注册配对)。
Remove would be the normal verb to use (eg.
del
is an alias forRemove-Item
).Unpublish might be another possibility (but only if your new is being used in a sense like publish). Equally Unregister (normally paired with register).
在你的情况下“删除”有什么问题吗?
Anything wrong with 'delete' in your situation?