예제 #1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public static PrintUntity Create([NotNull] IPrintModel model)
 {
     if (model == null) throw new ArgumentNullException("model");
     var command = new PrintUntity { Model = model, Option = new PrintOption() };
     command.Initiative();
     return command;
 }
예제 #2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="builder"></param>
 /// <returns></returns>
 public static PrintUntity Create(IPrintBuilder builder)
 {
     if (builder == null) throw new ArgumentNullException("builder");
     var command = new PrintUntity
     {
         Model = builder.Model as IPrintModel,
         Option = new PrintOption(),
         Builder = builder
     };
     command.Initiative();
     return command;
 }