DBC in use
namespace Aabs.Norm.Core { public interface IPersistenceBroker { [Requires("criteria != null")] PersistentObject RetrieveObject(Criteria criteria); [Requires("persistentObject != null")] [Ensures("$before(persistentObject) == $after(persistentObject)")] [Ensures("persistentObject.IsPersistent == true")] [Ensures("(persistentObject.TimeStamp - DateTime.Now) < new TimeSpan($time_ms)")] [Ensures("$result != null")] [Ensures("$result.Count == 0")] IList SaveObject(PersistentObject persistentObject); [Requires("persistentObject != null")] [Ensures("$before(persistentObject) == $after(persistentObject)")] [Ensures("$result != null")] [Ensures("$result.Count == 0")] [Ensures("persistentObject.IsPersistent == false")] IList DeleteObject(PersistentObject persistentObject); [Requires("criteria != null")] [Requires("criteria.ForClass != null")] [Ensures("$result != null")] [Ensures("$result.Count >= 0")] IList ProcessCriteria(Criteria criteria); [Requires("persistentObject != null")] [Ensures("$before(persistentObject) == $after(persistentObject)")] [Ensures("$result != null")] [Ensures("$result.Name != persistentObject. GetType().Name")] ClassMap GetClassMapFor(PersistentObject persistentObject); [Requires("tableMap != null")] [Ensures("$result != null")] [Ensures("$result.Count >= 0")] IList GetReferrersTo(TableMap tableMap); [Requires("persistentObject != null")] [Ensures("$result != null")] [Ensures("$result.Count >= 0")] IList GetLinkedClassMaps(PersistentObject persistentObject); [Requires("classMap != null")] [Ensures("$result != null")] [Ensures("$result.Count >= 0")] IList GetLinkedClassMaps(ClassMap classMap); [Requires("classMap != null")] [Requires("propertyName != null")] [Requires("propertyName.Length > 0")] [Ensures("$result != null")] [Ensures("$result.Count >= 0")] IList IncomingConnectionsToAttribute(ClassMap classMap, string propertyName); [Requires("procedureName != null")] [Requires("procedureName.Length > 0")] [Requires("type != null")] [Requires("databaseName != null")] [Requires("databaseName.Length > 0")] [Requires("parameters != null")] [Requires("parameters.Count >= 0")] [Ensures("$result != null")] [Ensures("$result.Count >= 0")] IList ProcessStoredProcedure(string procedureName, Type type, string databaseName, NameValueCollection parameters); [Requires("procedureName != null")] [Requires("procedureName.Length > 0")] [Requires("type != null")] [Requires("databaseName != null")] [Requires("databaseName.Length > 0")] [Requires("parameters != null")] [Requires("parameters.Count >= 0")] [Ensures("$result != null")] string ProcessStoredProcedureRaw(string procedureName, Type type, string databaseName, NameValueCollection parameters); bool ProcessTransaction(); } }
Powered for Blogger by Blogger templates