protected virtual ConstructorInitializer CreateConstructorInitializer() { Expression baseTypeArg = new IdentifierExpression(BackingParameterName); if (CurrentBackingType != null && CurrentBackingType.BaseType != null && CurrentBackingType.Type.ToString() != CurrentBackingType.BaseType.ToString()) { baseTypeArg = baseTypeArg.CastTo(CurrentBackingType.BaseType); } return(new ConstructorInitializer { Arguments = { baseTypeArg } }); }