public static IEnumerator GetArrayWithQuerySyncIEnumerator(Query query, QueryKind queryKind) { FooArray fooArray = ApplicasaFooGetArrayWithQuerySync((query != null ? query.innerQuery : IntPtr.Zero), queryKind); finalFoo = GetFooArray(fooArray); yield return(new WaitForSeconds(0.1f)); }
public static IEnumerator GetFooArrayIEnumerator(FooArray fooArray) { yield return(new WaitForSeconds(0.2f)); Foo[] fooInner = new Foo[0]; finalFoo = fooInner; }
public static Foo[] GetFooArray(FooArray fooArray) { Foo[] foos = new Foo[fooArray.ArraySize]; for (int i = 0; i < fooArray.ArraySize; i++) { IntPtr newPtr = Marshal.ReadIntPtr(fooArray.Array, i * Marshal.SizeOf(typeof(IntPtr))); foos[i] = new Foo(newPtr); } return(foos); }
public void Single_Dimensional_Array_Is_Mapped() { var source = new FooArray { Ints = new int[] { 1, 2, 3, 4, 5 } }; var target = new BarArray(); TypeAdapter.Adapt(source, target); target.Ints.Length.ShouldBe(source.Ints.Length); target.Ints.ShouldBe(source.Ints); }
public void Array_To_List_Is_Mapped() { var source = new FooArray { Ints = new int[] { 1, 2, 3, 4, 5 } }; var target = new BarList(); TypeAdapter.Adapt(source, target); target.Ints.Count.ShouldBe(source.Ints.Length); target.Ints.ShouldBe(source.Ints); }
public void MapToTarget_With_Null_Value() { var source = new FooArray { Ints = null }; var target = new BarArray { Ints = new int[] { 1, 2, 3, 4, 5 } }; TypeAdapter.Adapt(source, target); target.Ints.ShouldBeNull(); }
static void Main(string[] args) { Faker _faker = new Faker(); Bar bar = _faker.Create <Bar>(); FooArray fooArray = _faker.Create <FooArray>(); decimal[] decArr = _faker.Create <decimal[]> (); FileStream fs = _faker.Create <FileStream>(); IConfig config = new FakerConfig(); config.Add <Question, int, Generator42>(Question => Question.Answer); var faker = new Faker(config); Question q = faker.Create <Question>(); Console.ReadKey(); }
public static Foo[] GetFooArray(FooArray fooArray) { Foo[] fooInner = new Foo[fooArray.ArraySize]; AndroidJavaObject[] bigArray = AndroidJNIHelper.ConvertFromJNIArray <AndroidJavaObject[]>(fooArray.Array); int count = 0; for (int i = 0; i < bigArray.Length; i++) { AndroidJavaObject tempJavaObject = bigArray[i]; AndroidJavaObject[] InnerArray = AndroidJNIHelper.ConvertFromJNIArray <AndroidJavaObject[]>(tempJavaObject.GetRawObject()); for (int j = 0; j < InnerArray.Length; j++) { AndroidJavaObject tempObj = InnerArray[j]; fooInner[count] = new Foo(tempObj.GetRawObject(), tempObj); count++; } } return(fooInner); }
public static IEnumerator GetFooArrayIEnumerator(FooArray fooArray) { Foo[] fooInner = new Foo[fooArray.ArraySize]; AndroidJavaObject[] bigArray = AndroidJNIHelper.ConvertFromJNIArray <AndroidJavaObject[]>(fooArray.Array); int count = 0; for (int i = 0; i < bigArray.Length; i++) { AndroidJavaObject tempJavaObject = bigArray[i]; AndroidJavaObject[] InnerArray = AndroidJNIHelper.ConvertFromJNIArray <AndroidJavaObject[]>(tempJavaObject.GetRawObject()); for (int j = 0; j < InnerArray.Length; j++) { AndroidJavaObject tempObj = InnerArray[j]; fooInner[count] = new Foo(tempObj.GetRawObject(), tempObj); count++; } yield return(new WaitForSeconds(0.2f)); } finalFoo = fooInner; }
public static Foo[] GetFooArray(FooArray fooArray) { Foo[] foos = new Foo[fooArray.ArraySize]; for (int i=0; i < fooArray.ArraySize; i++) { IntPtr newPtr = Marshal.ReadIntPtr (fooArray.Array, i * Marshal.SizeOf(typeof(IntPtr))); foos[i] = new Foo(newPtr); } return foos; }
public static Foo[] GetFooArray(FooArray fooArray) { Foo[] foos = new Foo[0]; return foos; }
public static IEnumerator GetFooArrayIEnumerator(FooArray fooArray) { finalFoo = GetFooArray(fooArray); yield return(new WaitForSeconds(0.1f)); }
public static Foo[] GetFooArray(FooArray fooArray) { Foo[] foos = new Foo[0]; return(foos); }
public static IEnumerator GetFooArrayIEnumerator(FooArray fooArray) { finalFoo = GetFooArray(fooArray); yield return new WaitForSeconds(0.1f); }
public static IEnumerator GetFooArrayIEnumerator(FooArray fooArray) { Foo[] fooInner = new Foo[fooArray.ArraySize]; AndroidJavaObject[] bigArray = AndroidJNIHelper.ConvertFromJNIArray<AndroidJavaObject[]>(fooArray.Array); int count = 0; for (int i = 0;i < bigArray.Length;i++) { AndroidJavaObject tempJavaObject = bigArray[i]; AndroidJavaObject[] InnerArray = AndroidJNIHelper.ConvertFromJNIArray<AndroidJavaObject[]>(tempJavaObject.GetRawObject()); for (int j = 0;j < InnerArray.Length;j++) { AndroidJavaObject tempObj = InnerArray[j]; fooInner[count] = new Foo(tempObj.GetRawObject(),tempObj); count++; } yield return new WaitForSeconds(0.2f); } finalFoo = fooInner; }
public static Foo[] GetFooArray(FooArray fooArray) { Foo[] fooInner = new Foo[fooArray.ArraySize]; AndroidJavaObject[] bigArray = AndroidJNIHelper.ConvertFromJNIArray<AndroidJavaObject[]>(fooArray.Array); int count = 0; for (int i = 0;i < bigArray.Length;i++) { AndroidJavaObject tempJavaObject = bigArray[i]; AndroidJavaObject[] InnerArray = AndroidJNIHelper.ConvertFromJNIArray<AndroidJavaObject[]>(tempJavaObject.GetRawObject()); for (int j = 0;j < InnerArray.Length;j++) { AndroidJavaObject tempObj = InnerArray[j]; fooInner[count] = new Foo(tempObj.GetRawObject(),tempObj); count++; } } return fooInner; }
public static IEnumerator GetFooArrayIEnumerator(FooArray fooArray) { yield return new WaitForSeconds(0.2f); Foo[] fooInner = new Foo[0]; finalFoo = fooInner; }