/// <summary> /// Is used to get a instance of Ion corresponding to the given configuration /// </summary> /// <param name="config"></param> /// <returns></returns> public static Ion getInstance( IonConfig config ) { Ion storedClient; if( instances.TryGetValue( config, out storedClient ) ) { // Eventually update the config file saved in the stored client with the given one that might contain new or updated parameters storedClient.updateConfig( config ); return storedClient; } Ion amp = new Ion( config ); instances.Add( config, amp ); return amp; }
/// <summary> /// Is used to get a instance of Ion corresponding to the given configuration /// </summary> /// <param name="config"></param> /// <returns></returns> public static Ion getInstance(IonConfig config) { Ion storedClient; if (instances.TryGetValue(config, out storedClient)) { // Eventually update the config file saved in the stored client with the given one that might contain new or updated parameters storedClient.updateConfig(config); return(storedClient); } Ion amp = new Ion(config); instances.Add(config, amp); return(amp); }