Dev2.Core.Tests.ProperMoqs.MockBehaviourBase.this C# (CSharp) Method

this() public method

public this ( string name ) : object
name string
return object
        public object this[string name]
        {
            set {
                Type myType = GetType();
                if(_behaviourType == enTestObjectBehaviourChangeType.Property) {
                    PropertyInfo propertyInfo = myType.GetProperty(name);
                    propertyInfo.SetValue(this, value, null);
                }
                else {
                    MethodInfo methodInfo = myType.GetMethod(name);
                    var methodBody = methodInfo.GetMethodBody();
                    if(methodBody != null)
                    {
                        byte[] MethodBodyAsByteArray = methodBody.GetILAsByteArray();
                    }
                }
            }
        }
MockBehaviourBase