daily pastebin goal
9%
SHARE
TWEET

Untitled

a guest Jan 18th, 2019 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class Builder<T>
  2. {
  3.     public Builder()
  4.     {
  5.         Controller = new BuilderStep<Controller>(this);
  6.     }
  7.  
  8.     public BuilderStep<ListingSearchController> Controller { get; }
  9.  
  10.     public T Build()
  11.     {
  12.         return default(T);
  13.     }
  14.  
  15.     public class BuilderStep<TValueType>
  16.     {
  17.         public BuilderStep(Builder<T> builder)
  18.         {
  19.             Builder = builder ?? throw new ArgumentNullException(nameof(builder));
  20.         }
  21.  
  22.         public Builder<T> Set(TValueType value)
  23.         {
  24.             Value = value;
  25.             return Builder;
  26.         }
  27.  
  28.         protected TValueType Value { get; set; }                
  29.  
  30.         protected Builder<T> Builder { get; }
  31.     }
  32. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top