Esempio n. 1
0
 /// <summary>
 /// Initializes the singleton factory instance.
 /// </summary>
 /// <param name="newInstance">The singleton factory instance.</param>
 /// <exception cref="ArgumentNullException">Thrown if <paramref name="newInstance"/> is <c>null</c>.</exception>
 // public static void Initialize( T newInstance )
 public static void Initialize(TargetFactory newInstance)
 {
     if (newInstance == null)
     {
         throw new ArgumentNullException();
     }
     Instance = newInstance;
 }
Esempio n. 2
0
 /// <summary>
 /// Initializes the singleton factory instance with the specified <see cref="iApp"/> instance.
 /// </summary>
 /// <param name="newInstance">The singleton factory instance.</param>
 /// <param name="app">The <see cref="iApp"/> instance to initialize the factory with.</param>
 /// <exception cref="ArgumentNullException">Thrown if <paramref name="newInstance"/> is <c>null</c>.</exception>
 //public static void Initialize(T newInstance, iApp app)
 public static void Initialize(TargetFactory newInstance, iApp app)
 {
     Initialize(newInstance);
     TheApp = app;
 }