Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Namespace reference not added for parameter that is array type? #44

Closed
alc6379 opened this issue Sep 2, 2015 · 5 comments
Closed

Namespace reference not added for parameter that is array type? #44

alc6379 opened this issue Sep 2, 2015 · 5 comments
Labels

Comments

@alc6379
Copy link

alc6379 commented Sep 2, 2015

I have a method with this signature:

protected int ExecuteNonQuery(String commandText, CommandType commandType, DbParameter[] parameters)

CommandType is in the System.Data namespace, and DbParameter is in the System.Data.Common namespace.

When I attempt to generate a stub, I get this stub:

<add name="ExecuteNonQueryStringCommandTypeDbParameterArray" alias="ExecuteNonQueryStringCommandTypeDbParameterArray"> <RuntimeMethodInfo xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:x="http://www.w3.org/2001/XMLSchema" z:Id="1" z:FactoryType="MemberInfoSerializationHolder" z:Type="System.Reflection.MemberInfoSerializationHolder" z:Assembly="0" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/" xmlns="http://schemas.datacontract.org/2004/07/System.Reflection"> <Name z:Id="2" z:Type="System.String" z:Assembly="0" xmlns="">ExecuteNonQuery</Name> <AssemblyName z:Id="3" z:Type="System.String" z:Assembly="0" xmlns="">Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</AssemblyName> <ClassName z:Id="4" z:Type="System.String" z:Assembly="0" xmlns="">Common.Repository.AbstractSqlRepository</ClassName> <Signature z:Id="5" z:Type="System.String" z:Assembly="0" xmlns="">Int32 ExecuteNonQuery(System.String, System.Data.CommandType, System.Data.Common.DbParameter[])</Signature> <Signature2 z:Id="6" z:Type="System.String" z:Assembly="0" xmlns="">System.Int32 ExecuteNonQuery(System.String, System.Data.CommandType, System.Data.Common.DbParameter[])</Signature2> <MemberType z:Id="7" z:Type="System.Int32" z:Assembly="0" xmlns="">8</MemberType> <GenericArguments i:nil="true" xmlns="" /> </RuntimeMethodInfo> </add>

The code file is generated for the stub, but I get this Type for the IndirectionFunc:

public IndirectionFunc<Common.Repository.AbstractSqlRepository, System.String, System.Data.CommandType, DbParameter[], System.Int32> Body

(Common.Repository.AbstractSqlRepository is my class.)

If you notice, all of the parameters have the full namespace listed, with the exception of the DbParameter[] type. I'm wondering if it has something to do with the fact that the command type is an array? The System.Data.Common using statement isn't there in the file, either.

@urasandesu urasandesu added the bug label Sep 3, 2015
@urasandesu
Copy link
Owner

Thank you for the bug report! 😆
As you pointed out, on any indirection stubs, all of the parameters should have full name. I'm going to fix this issue before the next release.

By the way, let me ask you just one more question. Which do you use the Prig version 1.1.0 or 2.0.0-alpha05?

@alc6379
Copy link
Author

alc6379 commented Sep 3, 2015

I was using 1.1.0, I didn't get to check 2.0.0-alpha05. I'm running Visual
Studio 2015, and Chocolatey didn't seem to install the VSIX into that
version, but NuGet worked fine.

On Thu, Sep 3, 2015, 8:05 AM Akira Sugiura notifications@github.com wrote:

Thank you for the bug report! [image: 😆]
As you pointed out, on any indirection stubs, all of the parameters should
have full name. I'm going to fix this issue before the next release.

By the way, let me ask you just one more question. Which do you use the
Prig version 1.1.0 or 2.0.0-alpha05?


Reply to this email directly or view it on GitHub
#44 (comment).

@urasandesu
Copy link
Owner

Currently, these both versions are not supported Visual Studio 2015(I can't understand why the version works fine...). So, I'm going to fix this issue after fixed issue #45.
By the way, in that case, I guess you no longer need 1.1.x because you can use 2.0.0-alphaXX. Is this right?

@urasandesu
Copy link
Owner

@alc6379 This issue was corrected in the following releases:

Note that the family of V1 will be obsolete soon. I recommend using the family V2 if you newly begin using Prig.

@alc6379
Copy link
Author

alc6379 commented Sep 18, 2015

Thanks for the feedback! I'll give it a shot soon. I wound up using Fakes
in the meantime, but I would like to switch back to Prig once 2015 is
supported, because my team mates don't want to have to upgrade their VS
instances.

On Thu, Sep 17, 2015, 9:03 PM Akira Sugiura notifications@github.com
wrote:

@alc6379 https://github.com/alc6379 This issue was corrected in the
following releases:

Note that the family of V1 will be obsolete soon. I recommend using the
family V2 if you newly begin using Prig.


Reply to this email directly or view it on GitHub
#44 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants