摘要:
Input filters correlate to target components. For a given target component, the input filter defines input validation information. The input filter might also define conversions or transformations to be applied to valid input prior to being provided to the target component. At build time, code is accessed that contains the input validation, conversion and transformation and that identifies the associated target component. The information is then used to construct an input filter. At run time, when an input processing component receives an input, the input processing component identifies the target component, accesses the associated input filter, and uses the information contained in the input filter to determine whether the input is valid, and whether and how to convert and transform the value.
摘要:
Build-time resolution and type-enforcing of corresponding references in different code that references the same value. In response to detecting a directive within the code itself that a first reference in first code is to be correlated with a second reference in second code, and in response to detection that the types of the references are the same, a code generation tool generates correlation code that is interpretable to a compiler as allowing a value of a type of the first reference of a compiled-form of the first code to be passed as the same value of the same type of the second reference of a compiled-form of the second code. The first code, the second code, and the generated correlation code may then be compiled. If compilation is successful, this means that the first and second references are already properly resolved as referring to the same value and type-enforced.
摘要:
Input filters correlate to target components. For a given target component, the input filter defines input validation information. The input filter might also define conversions or transformations to be applied to valid input prior to being provided to the target component. At build time, code is accessed that contains the input validation, conversion and transformation and that identifies the associated target component. The information is then used to construct an input filter. At run time, when an input processing component receives an input, the input processing component identifies the target component, accesses the associated input filter, and uses the information contained in the input filter to determine whether the input is valid, and whether and how to convert and transform the value.