private static HLParameter CreateParameter(IParameterDefinition pDefinition) { HLParameter parameter = new HLParameter(); //parameter.Definition = pDefinition; parameter.Name = pDefinition.Name.Value; parameter.Signature = HLDomain.GetParameterSignature(pDefinition); sParameters[parameter.Signature] = parameter; //if (pDefinition.ContainingSignature is IMethodDefinition) parameter.MethodContainer = GetOrCreateMethod(pDefinition.ContainingSignature as IMethodDefinition); //else throw new NotSupportedException(); ITypeReference type = pDefinition.Type; if (pDefinition.IsByReference) { type = MutableModelHelper.GetManagedPointerTypeReference(type, Host.InternFactory, type); } parameter.IsReference = pDefinition.IsByReference; parameter.Type = GetOrCreateType(type); return(parameter); }