public void Next() { Int32Type type = (Int32Type)NHibernateUtil.Int32; object current = (int)1; object next = type.Next(current, null); Assert.IsTrue(next is Int32, "Next should be Int32"); Assert.AreEqual((int)2, (int)next, "current should have been incremented to 2"); }
public async Task NextAsync() { Int32Type type = (Int32Type)NHibernateUtil.Int32; object current = (int)1; object next = await(type.NextAsync(current, null, CancellationToken.None)); Assert.IsTrue(next is Int32, "Next should be Int32"); Assert.AreEqual((int)2, (int)next, "current should have been incremented to 2"); }
public void Visit(Int32Type type) => CreateIntType(type);
public void Visit(Int32Type type) => GenerateArray(new Int32Array.Builder(), x => x);
/// <summary> /// Interrogates the expression instance populating the report column that is exposed to the Report API service. /// </summary> /// <param name="argument">The argument.</param> /// <param name="reportColumn">The report column.</param> /// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns> private static bool PopulateTypeFromArgument(ActivityArgument argument, out DatabaseType type, out EntityType resourceType) { resourceType = null; if (argument.Is <StringArgument>()) { type = new StringType(); } else if (argument.Is <IntegerArgument>()) { type = new Int32Type(); } else if (argument.Is <CurrencyArgument>()) { type = new CurrencyType(); } else if (argument.Is <DecimalArgument>()) { type = new DecimalType(); } else if (argument.Is <DateArgument>()) { type = new DateType(); } else if (argument.Is <TimeArgument>()) { type = new TimeType(); } else if (argument.Is <DateTimeArgument>()) { type = new DateTimeType(); } else if (argument.Is <GuidArgument>()) { type = new GuidType(); } else if (argument.Is <BoolArgument>()) { type = new BoolType(); } else if (argument.Is <TypedArgument>()) { TypedArgument rla = argument.As <TypedArgument>(); resourceType = Entity.Get <EntityType>(rla.ConformsToType); if (resourceType == null) { type = null; return(false); } if (resourceType.IsOfType.FirstOrDefault(t => t.Alias == "core:enumType") != null) { // A choice field type = new ChoiceRelationshipType(); } else { // Is a related resource type = new InlineRelationshipType(); } } else { type = null; return(false); } return(true); }
public void Visit(Int32Type type) => GenerateArray <int, Int32Array>((v, n, c, nc, o) => new Int32Array(v, n, c, nc, o));
public void Visit(Int32Type type) => GenerateTestData <int, Int32Array, Int32Array.Builder>(type, x => x);
public object Read(Int32Type int32Type) => reader.ReadInt32();
public void Visit(Int32Type type) => CreateNumberArray <int>(type);
public void Write(Int32Type int32Type, object value) => writer.Write(Convert.ToInt32(value));
public void Visit(Int32Type type) => _array = new Int32Array(_data);
public void Seed() { Int32Type type = (Int32Type)NHibernateUtil.Int32; Assert.IsTrue(type.Seed(null) is Int32, "seed should be Int32"); }
public async Task SeedAsync() { Int32Type type = (Int32Type)NHibernateUtil.Int32; Assert.IsTrue(await(type.SeedAsync(null, CancellationToken.None)) is Int32, "seed should be Int32"); }
public void Visit(Int32Type type) { ColumnDecoder = new Int32Decoder(); }