How to use LoadArrayElementExpression class of Telerik.JustMock.Core.Castle.DynamicProxy.Generators.Emitters.SimpleAST package

Best JustMockLite code snippet using Telerik.JustMock.Core.Castle.DynamicProxy.Generators.Emitters.SimpleAST.LoadArrayElementExpression

Run JustMockLite automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.


Source: LoadArrayElementExpression.cs Github

1// Copyright 2004-2011 Castle Project -
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
15namespace Telerik.JustMock.Core.Castle.DynamicProxy.Generators.Emitters.SimpleAST
17	using System;
18	using System.Reflection.Emit;
20	internal class LoadArrayElementExpression : Expression
21	{
22		private readonly Reference arrayReference;
23		private readonly ConstReference index;
24		private readonly Type returnType;
26		public LoadArrayElementExpression(int index, Reference arrayReference, Type returnType)
27			: this(new ConstReference(index), arrayReference, returnType)
28		{
29		}
31		public LoadArrayElementExpression(ConstReference index, Reference arrayReference, Type returnType)
32		{
33			this.index = index;
34			this.arrayReference = arrayReference;
35			this.returnType = returnType;
36		}
38		public override void Emit(IMemberEmitter member, ILGenerator gen)
39		{
40			ArgumentsUtil.EmitLoadOwnerAndReference(arrayReference, gen);
41			ArgumentsUtil.EmitLoadOwnerAndReference(index, gen);
42			gen.Emit(OpCodes.Ldelem, returnType);
43		}
44	}
Full Screen

Accelerate Your Automation Test Cycles With LambdaTest

Leverage LambdaTest’s cloud-based platform to execute your automation tests in parallel and trim down your test execution time significantly. Your first 100 automation testing minutes are on us.

Try LambdaTest

Most used methods in LoadArrayElementExpression

Run Selenium Automation Tests on LambdaTest Cloud Grid

Trigger Selenium automation tests on a cloud-based Grid of 3000+ real browsers and operating systems.

Test now for Free

We use cookies to give you the best experience. Cookies help to provide a more personalized experience and relevant advertising for you, and web analytics for us. Learn More in our Cookies policy, Privacy & Terms of service

Allow Cookie

I hope you find the best code examples for your project.

If you want to accelerate automated browser testing, try LambdaTest. Your first 100 automation testing minutes are FREE.

Sarah Elson (Product & Growth Lead)