public GuidPropertyMapping(GuidColumn column, IMemberAccessor member, int fileIndex, int workIndex) { this.column = column; this.member = member; this.FileIndex = fileIndex; this.WorkIndex = workIndex; }
public void TestGuidColumn() { var g = Guid.NewGuid(); var o = new GuidColumn { TheGuid = g }; o.Save(); var o1 = GuidColumn.FindById(o.Id); Assert.IsNotNull(o1); Assert.AreEqual(g, o1.TheGuid); var g1 = Guid.NewGuid(); o1.TheGuid = g1; o1.Save(); Assert.IsFalse(g == g1); var o2 = GuidColumn.FindById(o.Id); Assert.IsTrue(g1 == o2.TheGuid); }
public GuidPropertyMapping(GuidColumn column, IMemberAccessor member, int physicalIndex, int logicalIndex) { this.column = column; Member = member; PhysicalIndex = physicalIndex; LogicalIndex = logicalIndex; }
/// <summary> /// Returns dictionary. Throws an exception if the key column does not contains unique values. /// /// </summary> /// <param name="pResult"/><param name="pKeyColumn"/><param name="valueColumn"/> /// <returns/> public static IDictionary <Guid, string> ToDictionary(IResult pResult, GuidColumn pKeyColumn, StringColumn valueColumn) { Dictionary <Guid, string> dictionary = new Dictionary <Guid, string>(); int pIndex = 0; while (pIndex < pResult.Count) { Guid key = (Guid)pResult.GetRow(pKeyColumn.Table, pIndex).GetValue(pKeyColumn); string str = (string)pResult.GetRow(valueColumn.Table, pIndex).GetValue(valueColumn); dictionary.Add(key, str); checked { ++pIndex; } } return((IDictionary <Guid, string>)dictionary); }
/// <summary> /// Returns list of distinct Guids /// /// </summary> /// <param name="pResult"/><param name="column"/> /// <returns/> public static IList <Guid> ToList(IResult pResult, GuidColumn column) { List <Guid> list = new List <Guid>(); int pIndex = 0; while (pIndex < pResult.Count) { Guid guid = (Guid)pResult.GetRow(column.Table, pIndex).GetValue(column); if (!list.Contains(guid)) { list.Add(guid); } checked { ++pIndex; } } return((IList <Guid>)list); }
public GuidPropertyMapping(GuidColumn column, PropertyInfo property) { this.column = column; this.property = property; }
public IUpdateSet Set(GuidColumn column, Guid value) { this.mSetValueList.Add(new SetValue(column, value)); return(this); }
public static FMSScheduleDetailIdAsString CreateFrom(GuidColumn t) { return(GuidColumnAsString.CreateFrom <FMSScheduleDetailIdAsString>(t)); }
public GuidPropertyMapping(GuidColumn column, PropertyInfo property) { this.column = column; this.property = property; }