/// <summary> /// Gets the value of a field. /// </summary> /// <param name="name">The name of the field.</param> /// <returns>The value of the field</returns> public object GetField(string name) { return(ProfilerInterceptor.GuardInternal(() => { var field = ResolveField(name); CheckMemberInfo("field", name, field); return SecuredReflectionMethods.GetField(field, this.instance); })); }
private object CallInvoke(MethodBase method, object[] args) { try { return(ProfilerInterceptor.GuardExternal(() => SecuredReflectionMethods.Invoke(method, this.instance, args))); } catch (TargetInvocationException targetInvocationException) { if (this.RethrowOriginalOnCallMethod && targetInvocationException.InnerException != null) { throw targetInvocationException.InnerException; } else { throw; } } }
private object CallInvoke(MethodBase method, object[] args) { return(ProfilerInterceptor.GuardExternal(() => SecuredReflectionMethods.Invoke(method, this.instance, args))); }