Beispiel #1
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="Resource{T}" /> class.
 /// </summary>
 /// <param name="client">The client.</param>
 /// <param name="settings">The settings.</param>
 /// <param name="onError">The on error.</param>
 /// <param name="expression">The expression.</param>
 public Resource(INetClient client, ResourceSettings settings, Action <Exception> onError, Expression expression)
 {
     Client     = client;
     Settings   = settings;
     Provider   = new RestQueryProvider <T>(this);
     OnError    = onError;
     Expression = expression ?? Expression.Constant(this);
 }
Beispiel #2
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="Resource{T}" /> class.
 /// </summary>
 public Resource()
 {
     if (Settings == null)
     {
         Settings = new ResourceSettings();
     }
     Settings.Configure(this);
     Provider   = new RestQueryProvider <T>(this);
     Expression = Expression.Constant(this);
 }
Beispiel #3
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="Resource{T}" /> class.
 /// </summary>
 /// <param name="settings">The settings.</param>
 public Resource(ResourceSettings settings)
 {
     Settings   = settings;
     Provider   = new RestQueryProvider <T>(this);
     Expression = Expression.Constant(this);
 }