Mono.Security.StrongName.RVAtoPosition C# (CSharp) Method

RVAtoPosition() private method

private RVAtoPosition ( UInt32 r, int sections, byte headers ) : UInt32
r UInt32
sections int
headers byte
return UInt32
		private UInt32 RVAtoPosition (UInt32 r, int sections, byte[] headers) 
		{
			for (int i=0; i < sections; i++) {
				UInt32 p = BitConverterLE.ToUInt32 (headers, i * 40 + 20);
				UInt32 s = BitConverterLE.ToUInt32 (headers, i * 40 + 12);
				int l = (int) BitConverterLE.ToUInt32 (headers, i * 40 + 8);
				if ((s <= r) && (r < s + l)) {
					return p + r - s;
				}
			}
			return 0;
		}