예제 #1
0
        static CodeMemberMethod TrySetProperty(CodeStatement firstCondition)
        {
            var method = new CodeMemberMethod();
            method.ReturnType = CodeHelper.TypeRef(typeof(bool));
            method.Name = "TrySetProperty";
            method.AddParameter(typeof(PropertyInfo), "property");
            method.AddParameter(typeof(object), "destObj");
            method.AddParameter(typeof(AphidObject), "srcObj");
            method.Statements.Add(firstCondition);

            return method;
        }