private void WriteMarshalOutputParameter(CppCodeWriter writer, string valueName, MarshaledParameter parameter, IRuntimeMetadataAccess metadataAccess)
 {
     if (this.IsOutParameter(parameter))
     {
         this._marshaler.WriteMarshalOutputParameter(writer, valueName, parameter, this._parameters, metadataAccess);
     }
 }
 protected bool IsInParameter(MarshaledParameter parameter)
 {
     TypeReference parameterType = parameter.ParameterType;
     return ((!parameter.IsOut || parameter.IsIn) || (Extensions.IsValueType(parameterType) && !parameterType.IsByReference));
 }
 private string WriteMarshalInputParameter(CppCodeWriter writer, MarshaledParameter parameter, IRuntimeMetadataAccess metadataAccess)
 {
     if (this.IsInParameter(parameter))
     {
         return this._marshaler.WriteMarshalInputParameter(writer, parameter, this._parameters, metadataAccess);
     }
     return this._marshaler.WriteMarshalEmptyInputParameter(writer, parameter, this._parameters, metadataAccess);
 }
 private void WriteCleanupParameter(CppCodeWriter writer, string valueName, MarshaledParameter parameter, IRuntimeMetadataAccess metadataAccess)
 {
     if (this.ParameterRequiresCleanup(parameter))
     {
         if (this.IsInParameter(parameter))
         {
             this._marshaler.WriteMarshalCleanupParameter(writer, valueName, parameter, metadataAccess);
         }
         else
         {
             this._marshaler.WriteMarshalCleanupEmptyParameter(writer, valueName, parameter, metadataAccess);
         }
     }
 }
 private bool ParameterRequiresCleanup(MarshaledParameter parameter)
 {
     return (this.IsInParameter(parameter) || parameter.IsOut);
 }
 protected DefaultMarshalInfoWriter MarshalInfoWriterFor(MarshaledParameter parameter)
 {
     return this._marshaler.MarshalInfoWriterFor(parameter);
 }
 protected bool IsOutParameter(MarshaledParameter parameter)
 {
     TypeReference parameterType = parameter.ParameterType;
     if (parameter.IsOut && !Extensions.IsValueType(parameterType))
     {
         return true;
     }
     if (parameter.IsIn && !parameter.IsOut)
     {
         return false;
     }
     return (parameter.ParameterType.IsByReference || MarshalingUtils.IsStringBuilder(parameterType));
 }