Microsoft.JScript.ParameterDeclaration.ParameterDeclaration C# (CSharp) Method

ParameterDeclaration() private method

private ParameterDeclaration ( Context context, String identifier, TypeExpression type, CustomAttributeList customAttributes ) : System
context Context
identifier String
type TypeExpression
customAttributes CustomAttributeList
return System
      internal ParameterDeclaration(Context context, String identifier, TypeExpression type, CustomAttributeList customAttributes)
        : base() {
        this.identifier = identifier;
        this.type = type == null ? new TypeExpression(new ConstantWrapper(Typeob.Object, context)) : type;
        this.context = context;
        ActivationObject current_scope = (ActivationObject)context.document.engine.Globals.ScopeStack.Peek();
        if (current_scope.name_table[this.identifier] != null)
          //Only happens if there is another parameter declarations with the same name
          context.HandleError(JSError.DuplicateName, this.identifier, current_scope is ClassScope || current_scope.fast || type != null);
        else{
          JSVariableField field = current_scope.AddNewField(this.identifier, null, 0);
          field.originalContext = context;
        }
        this.customAttributes = customAttributes;
      }

Same methods

ParameterDeclaration::ParameterDeclaration ( Type type, String identifier ) : System