1
Vote

PipelineBuilder Namespace issue when contract uses itself as a parameter

description

UPDATE: This happens only when your Contract Assemblies namespace looks like the following:
 
namespace Contracts { } //PipelineBuilder generates bad code, view have namespace that adapters can't see.
namespace MyCompany.Contracts2 { } //PipelineBuilder generates bad code, view have namespace that adapters can't see.
namespace MyCompany.Contracts.WeLoveContracts { } //PipelineBuilder generates bad code, view have namespace that adapters can't see.
namespace GentlemansAgreementsToBeViolatedAsap { } //PipelineBuilder generates bad code, view have namespace that adapters can't see.
namespace MyCompany.contracts { } //PipelineBuilder generates bad code, view have namespace that adapters can't see.
namespace MyCompany.Contractss { } //PipelineBuilder generates bad code, view have namespace that adapters can't see.
 
BUT THESE NAMESPACE DO WORK
 
namespace MyCompany.Contracts { } //PipelineBuilder generates code that compiles
namespace MyCompany.Contract { } //PipelineBuilder generates code that compiles
 
And the above work because the code generated Host views have a namespace right above Contracts, i.e. namespace = MyCompany
 
This following contract will generate errors in the AddInSideAdapter and HostSideAdapter.
 
public interface IForm : IContract
{
    void FormAction(string formName, IForm currentState, string action);
}
 
When a contract uses itself as a method parameter type, the code generated adapters fail to use the fully qualified namespace.
 
generating this:
 
public void FormAction(string formName, IForm currentState, string action)
 
instead of
 
public void FormAction(string formName, HostViews.IForm currentState, string action)

comments