internal OneofAccessor(PropertyInfo caseProperty, MethodInfo clearMethod, OneofDescriptor descriptor) { if (!OneofAccessor.smethod_0(caseProperty)) { throw OneofAccessor.smethod_1(Module.smethod_33 <string>(966859498u)); } this.descriptor = descriptor; this.caseDelegate = ReflectionUtil.CreateFuncIMessageT <int>(caseProperty.GetGetMethod()); this.descriptor = descriptor; this.clearDelegate = ReflectionUtil.CreateActionIMessage(clearMethod); }
public OneofAccessor(PropertyInfo caseProperty, MethodInfo clearMethod, OneofDescriptor descriptor) { if (!caseProperty.CanRead) { throw new ArgumentException("Cannot read from property"); } this.descriptor = descriptor; caseDelegate = ReflectionUtil.CreateFuncIMessageT <int>(caseProperty.GetGetMethod()); this.descriptor = descriptor; clearDelegate = ReflectionUtil.CreateActionIMessage(clearMethod); }