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

.cctor() can't replace with indirection stub. #12

Closed
urasandesu opened this issue Aug 11, 2014 · 0 comments
Closed

.cctor() can't replace with indirection stub. #12

urasandesu opened this issue Aug 11, 2014 · 0 comments
Labels

Comments

@urasandesu
Copy link
Owner

When I tried replacing .cctor() with Prig's indirection stub, I got some build errors as the follows:

error CS1519: Invalid token '{' in class, struct, or interface member declaration [c:\users\user\documents\visual studio 2013\Projects\StaticMockingSample\StaticMockingSampleTest\StaticMockingSample.v4.0.30319.v1.0.0.0.MSIL.Prig\StaticMockingSample.Prig.g.csproj]

Indirection stub setting I used is the following:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>
    <section name="prig" type="Urasandesu.Prig.Framework.PilotStubberConfiguration.PrigSection, Urasandesu.Prig.Framework" />
  </configSections>
  <prig>
    <stubs>
      <add name="StaticConstructor" alias="StaticConstructor">
        <RuntimeConstructorInfo 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="">.cctor</Name>
          <AssemblyName z:Id="3" z:Type="System.String" z:Assembly="0" xmlns="">StaticMockingSample</AssemblyName>
          <ClassName z:Id="4" z:Type="System.String" z:Assembly="0" xmlns="">StaticMockingSample.Foo</ClassName>
          <Signature z:Id="5" z:Type="System.String" z:Assembly="0" xmlns="">Void .cctor()</Signature>
          <Signature2 z:Id="6" z:Type="System.String" z:Assembly="0" xmlns="">.cctor()</Signature2>
          <MemberType z:Id="7" z:Type="System.Int32" z:Assembly="0" xmlns="">1</MemberType>
          <GenericArguments i:nil="true" xmlns="" />
        </RuntimeConstructorInfo>
      </add>
    </stubs>
  </prig>
</configuration>

It should be able to replace as same as like another member.

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

1 participant