/// <summary> /// Creates a new <see cref="RemovableDriveWatcher"/>. /// </summary> /// <returns> /// A new instance of the <see cref="RemovableDriveWatcher"/> class, /// if none has been created yet; otherwise, the singleton instance. /// </returns> public static RemovableDriveWatcher Create() { if (instance == null) { instance = new RemovableDriveWatcher(); instance.StartInsertWatcher(); instance.StartRemoveWatcher(); } return(instance); }
/// <summary> /// Creates a new <see cref="RemovableDriveWatcher"/>. /// </summary> /// <returns> /// A new instance of the <see cref="RemovableDriveWatcher"/> class, /// if none has been created yet; otherwise, the singleton instance. /// </returns> public static RemovableDriveWatcher Create() { if (instance == null) { instance = new RemovableDriveWatcher(); instance.StartInsertWatcher(); instance.StartRemoveWatcher(); } return instance; }