Ejemplo n.º 1
0
 protected override ISampleString CreateInstance(string type)
 {
     if (type == "Point")
     {
         return(PointSampleString.CreateInstance());
     }
     else if (type == "Matrix")
     {
         return(MatrixSampleString.CreateInstance());
     }
     else if (type == "Vector")
     {
         return(VectorSampleString.CreateInstance());
     }
     else if (type == "Point3D")
     {
         return(Point3DSampleString.CreateInstance());
     }
     else if (type == "Vector3D")
     {
         return(Vector3DSampleString.CreateInstance());
     }
     else if (type == "Size3D")
     {
         return(Size3DSampleString.CreateInstance());
     }
     else if (type == "Point4D")
     {
         return(Point4DSampleString.CreateInstance());
     }
     else
     {
         return(null);
     }
 }
Ejemplo n.º 2
0
 public static ISampleString CreateInstance()
 {
     if (VectorSample == null)
     {
         //lock (CntrolObj)
         //{
         //if (VectorSample == null)
         //{
         VectorSample = new VectorSampleString();
         //}
         //}
     }
     return(VectorSample);
 }