Exemple #1
0
 private static DataEntity Parse(IDataRecord record, DataDomain domain)
 {
     return(new DataEntity()
     {
         Parent = domain.Parent,
         ObjectId = record["ObjectId"].ConvertTo <Int32>(),
         ObjectName = record["ObjectName"].ConvertTo <String>(),
         CodeName = record["CodeName"].ConvertTo <String>(),
         CodeDescription = record["CodeDescription"].ConvertTo <String>(),
         CodeDomain = domain,
         CanCreate = (record["CodeFlags"].ConvertTo <Int32>() & 1) == 1,
         CanModify = (record["CodeFlags"].ConvertTo <Int32>() & 2) == 2,
         CanRemove = (record["CodeFlags"].ConvertTo <Int32>() & 4) == 4,
     });
 }
Exemple #2
0
 /// <summary>
 ///     Gets all of the entities that pertain to specific domain.
 /// </summary>
 /// <param name="domain">
 ///     The domain in which the entities are defined.
 /// </param>
 /// <returns>
 ///     An enumerable collection of entities.
 /// </returns>
 public static IEnumerable <DataEntity> GetAll(DataDomain domain)
 {
     return(domain.Parent.Execute(DataEntity.Parse, domain, "GetEntity", domain.Name));
 }