コード例 #1
0
        private ParamDef UpdateRowId_NoLock(ParamDef pd)
        {
            var dt = method.DeclaringType;

            if (dt == null)
            {
                return(pd);
            }
            var module = dt.Module;

            if (module == null)
            {
                return(pd);
            }
            return(module.UpdateRowId(pd));
        }
コード例 #2
0
        internal void CreateParamDef(Parameter param)
        {
#if THREAD_SAFE
            theLock.EnterWriteLock(); try {
#endif
            var paramDef = FindParamDef_NoLock(param);
            if (paramDef != null)
            {
                return;
            }
            if (param.IsHiddenThisParameter)
            {
                hiddenThisParamDef = UpdateRowId_NoLock(new ParamDefUser(UTF8String.Empty, ushort.MaxValue, 0));
                return;
            }
            int seq = param.IsReturnTypeParameter ? 0 : param.MethodSigIndex + 1;
            paramDef = UpdateRowId_NoLock(new ParamDefUser(UTF8String.Empty, (ushort)seq, 0));
            method.ParamDefs.Add(paramDef);
#if THREAD_SAFE
        }

        finally { theLock.ExitWriteLock(); }
#endif
        }