コード例 #1
0
 protected static T GetObject <T> (ObjectID id, bool includeDeleted) where T : DomainObject
 {
     throw new NotImplementedException();
 }
コード例 #2
0
 protected static T TryGetObject <T> (ObjectID id) where T : DomainObject
 {
     throw new NotImplementedException();
 }
コード例 #3
0
 /// <summary>
 /// Gets a <see cref="DomainObject"/> that already exists or attempts to load it from the data source.
 /// If an object cannot be found, it will be marked <see cref="StateType.Invalid"/> in the <paramref name="clientTransaction"/>, and the method will
 /// return a <see langword="null" /> reference in its place.
 /// </summary>
 /// <typeparam name="T">The type of <see cref="DomainObject"/> to return. Can be a base type of the actual object type.</typeparam>
 /// <param name="id">The ID of the <see cref="DomainObject"/> that should be loaded. Must not be <see langword="null"/>.</param>
 /// <param name="clientTransaction">The <see cref="ClientTransaction"/>. If <see langword="null" /> (or unspecified), the
 /// <see cref="ClientTransaction.Current"/> transaction is used.</param>
 /// <returns>
 /// The <see cref="DomainObject"/> with the specified <paramref name="id"/>, or <see langword="null" /> if it couldn't be found.
 /// </returns>
 /// <exception cref="System.ArgumentNullException"><paramref name="clientTransaction"/> or <paramref name="id"/> are <see langword="null"/>.</exception>
 /// <exception cref="Persistence.StorageProviderException">
 /// The Mapping does not contain a class definition for the given <paramref name="id"/>.<br/> -or- <br/>
 /// An error occurred while reading a <see cref="PropertyValue"/>.<br/> -or- <br/>
 /// An error occurred while accessing the data source.
 /// </exception>
 public static T TryGetObject <T> (this ObjectID id, ClientTransaction clientTransaction = null)
     where T : DomainObject, ISupportsGetObject
 {
     ArgumentUtility.CheckNotNull("id", id);
     return(GetHandleChecked <T> (id).TryGetObject(clientTransaction));
 }