protected override MethodDefinition GetStaticConstructor()
{
var staticConstructor = ProxyType.GetStaticConstructor();
if (staticConstructor == null)
{
staticConstructor = CecilExtensions.CreateStaticConstructor(ProxyType);
}
else
{
staticConstructor.Body.Instructions.RemoveAt(staticConstructor.Body.Instructions.Count - 1);
}
return staticConstructor;
}