protected virtual object RunBlock() { if (this.mi != null) { this.RunContextBlock(); if (this.mi.MemberType == MemberTypes.Field || this.mi.MemberType == MemberTypes.Property) { if (this.owningBlock == null) { this.RunParamBlocks(); this.mi.SetValue(this.context, this.paramValues[0]); BloxBlock obj = this.contextBlock; if (obj != null) { obj.UpdateWith(this.context); } } else { this.returnValue = this.mi.GetValue(this.context); } } else { this.RunParamBlocks(); this.returnValue = this.mi.Invoke(this.context, this.paramValues); if (this.hasReferenceTypes) { Type[] array = this.ParamTypes(); for (int i = 0; i < this.paramValues.Length; i++) { try { if (array.Length > i) { if (array[i].IsByRef) { ((Variable_Block)this.paramBlocks[i]).v.SetValue(this.paramValues[i]); } continue; } } catch (Exception e) { this.LogError("Error while processing param[" + i + "] => [" + array[i] + "]", e); continue; } break; } } } } return(this.returnValue); }
protected virtual object RunBlock() { if (this.mi != null) { this.RunContextBlock(); if (this.mi.MemberType == MemberTypes.Field || this.mi.MemberType == MemberTypes.Property) { if (this.owningBlock == null) { this.RunParamBlocks(); this.mi.SetValue(this.context, this.paramValues[0]); BloxBlock obj = this.contextBlock; if (obj != null) { obj.UpdateWith(this.context); } } else { this.returnValue = this.mi.GetValue(this.context); } } else { this.RunParamBlocks(); this.returnValue = this.mi.Invoke(this.context, this.paramValues); if (this.hasReferenceTypes) { int num = 0; while (num < this.paramValues.Length && this.paramTypes.Length > num) { if (this.paramTypes[num].IsByRef) { ((Variable_Block)this.paramBlocks[num]).v.SetValue(this.paramValues[num]); } num++; } } } } return(this.returnValue); }