This is my 11th activity to participate in the August Challenge

Chapter 85 Method keyword – WebMethod

Specify whether this method is web Method. This applies only to classes defined as Web Services or Web clients.

usage

To specify that this method is a Web method, use the following syntax:

Method name(formal_spec) As returnclass [ WebMethod ] 
{    //implementation }
Copy the code

Otherwise, omit this keyword or place the word Not before it.

Break down

This keyword specifies that this method is available as a Web method and can be invoked over the SOAP protocol.

Important: In most cases, Web methods should be instance methods, not class methods.

The default

If this keyword is omitted, the method cannot be used as a Web Method.

The generated class

When add the key to the method and compile class, the class compiler generates an extra class: Package. OriginalClass. MethodName. Package.OriginalClass is the class that contains the Web method, and MethodName is the name of the Web method.

For example, start with the class robjDemo.docliteralws. Then add a method called Add. When will the WebMethod keyword is added to the method and compiled, the compiler will generate class ROBJDemo. DocLiteralWS. Add.

Do not modify or use this generated class directly; For internal use only.

The relationship between the WSDL

For web services, this keyword also affects the generated WSDL, which now contains additional elements needed to represent the Web method.

Chapter 86 Parameter keyword – Abstract

Specifies whether it is an abstract parameter.

usage

To specify that the parameter is abstract, use the following syntax:

Parameter name As parameter_type [ Abstract ] = value ;
Copy the code

Otherwise, ignore the keyword or place Not before it.

Break down

Abstract parameters behave as if they were undefined. However, a user can define an abstract parameter for document purposes and force the signature of this parameter to be defined in a subclass.

The default

If this keyword is omitted, the parameter is not abstract.

Chapter 87 Parameter Keyword – Constraint

Specify the user interface constraint for this parameter in Studio.

usage

To specify a user interface constraint for this parameter, use the following syntax:

Parameter name As parameter_type [ Constraint = "constraint" ]  = value ;
Copy the code

Where constraint is the string used by Studio.

Break down

Studio Inspector provides input validation for parameters using constraint values. Its value is not used or enforced by the class compiler.

This keyword works with the Flags keyword. For example, if Flags is set to ENUM, Constraint should be a comma-separated list of possible parameter values.

Parameter MYPARM [ Constraint = "X,Y,Z", Flags = ENUM ] = "X";
Copy the code

Chapter 88 Parameter Keyword – Deprecated

Specifies that this parameter is deprecated. This keyword is ignored by the class compiler and simply provides a readable indicator that the argument is deprecated.

usage

To specify that this parameter is deprecated, use the following syntax:

Parameter name As parameter_type  [ Deprecated ] = value;
Copy the code

Otherwise, ignore the keyword or place Not before it.