iisresetme / legislator Goto Github PK
View Code? Open in Web Editor NEWLegislator is a simple .NET interface authoring tool written in PowerShell
License: MIT License
Legislator is a simple .NET interface authoring tool written in PowerShell
License: MIT License
Since [AppDomain]
is no longer the entry point for emitting new assemblies at runtime, Legislator's interface
command fails on PowerShell Core and PowerShell 7:
PS ~> interface IThing {}
interface: Method invocation failed because [System.AppDomain] does not contain a method named 'DefineDynamicAssembly'.
The reflection APIs have been split into smaller packages in .NET Core, but since S.M.A already depend on System.Reflection.Emit
, and the API surface remains largely unchanged, porting to PowerShell >6 should be trivial
Failure to create interface types due to unresolved return type names currently result in the following unhelpful error message:
PS C:\> interface IPoint {
>> property int X
>> property ing Y # classic typo
>> }
property:
Line |
4 | property ing Y
| ~~~~~~~~~~~~~~
| Cannot find an overload for "new" and the argument count: "2".
This is obviously not helpful, expected error should indicate the actual problem:
InvalidOperation:
Line |
4 | property ing Y
| ~~~
| Unable to find type [ing].
Interfaces in .NET are extensible, Legislator should support inheriting other interfaces, like:
interface IBase {
method void BaseMethod @([int])
}
interface IAuxiliary {
method void AuxiliaryMethod @([string])
}
interface IFinal {
method void AdditionalMethod @()
} -Implements IBase,IAuxiliary
Lack of explicit error handling in interface
appears to allow for incomplete type emission:
interface IIncomplete {
property string Name
property nonExistingType Thing
}
Resulting in creation of IIncomplete
, but without nonExistingType
member:
PS ~> [IIncomplete].DeclaredMembers.Name
Name
The CLI interface specification allows for the declaration of events in interfaces.
Legislator currently only supports properties and methods.
Add support for declaring events as part of an interface as well.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.