Back to list
Views:   0
Replies:  0
Archived
,
Reply 1
Quickly put in here - you could optimize initializations as required (like Singleton etc.,)

Create and Entity Class that encapsulates all the parameters you may need for PartA,B as Properties

public class PartsDTO
{

string _Property1=string.empty; //for simplicity considered a string property
public string Property1
{
  get{return _Property1;}
set {_Property1=value;}
}

}


public class Builder
{

   public _PartsDTO=null;
   
   public PartsDTO PartsDTO
{
 get{return _PartsDTO;}
set{_PartsDTO=value;}


}

and within the construct method

public void Construct(Builder builder)

    {

      builder.BuildPartA(builder.PartsDTO.Property1);

      builder.BuildPartB();

    }



thanks,
Tarriq
Tarriq Ferrose Khan, Oct 01, 2012
Stay Inspired!
Join other developers and designers who have already signed up for our mailing list.
Terms     Privacy     Licensing       EULA       Sitemap      
© Data & Object Factory, LLC.
Made with    in Austin, Texas