示例#1
0
 static DataMap()
 {
     Accessor = new DataAccessor(typeof(T));
 }
示例#2
0
 /// <summary>
 /// Creates the exception with the given context and data type.
 /// </summary>
 /// <param name="context">The entity that triggered the exception.</param>
 /// <param name="accessor">The data type that was concurrently modified.</param>
 internal RemodifiedDataException(IEntity context, DataAccessor accessor)
     : base("Already modified data for type=" + accessor.DataType + " in " + context)
 {
 }
示例#3
0
 /// <summary>
 /// Creates the exception with the given context and data type.
 /// </summary>
 /// <param name="context">The entity that triggered the exception.</param>
 /// <param name="accessor">The data type that the entity lacks.</param>
 internal NoSuchDataException(IQueryableEntity context, DataAccessor accessor)
     : base(string.Format("No such data for type={0} in context={1}", accessor.DataType,
                          context))
 {
 }
示例#4
0
 internal PreviousRequiresVersionedDataException(IQueryableEntity context,
                                                 DataAccessor accessor)
     : base(string.Format("Retrieving previous data requires that the data extends " +
                          "Data.IVersioned, but type={0} in context={1} does not", accessor.DataType, context))
 {
 }
示例#5
0
 /// <summary>
 /// Creates the exception with the given context and data type.
 /// </summary>
 /// <param name="context">The entity that triggered the exception.</param>
 /// <param name="accessor">The data type that was already added.</param>
 internal AlreadyAddedDataException(IEntity context, DataAccessor accessor)
     : base("The entity already has a data instance for type=" + accessor.DataType + " in " +
            context)
 {
 }