public void Add(ShellSettings settings) { if (string.op_Equality("Default", settings.get_Name())) { this._default = settings; } stackVariable6 = this.GetAllHostsAndPrefix(settings); V_0 = new Dictionary <string, ShellSettings>(); V_1 = stackVariable6; V_2 = 0; while (V_2 < (int)V_1.Length) { V_3 = V_1[V_2]; if (this._hasStarMapping) { stackVariable19 = true; } else { stackVariable19 = V_3.StartsWith('*'); } this._hasStarMapping = stackVariable19; dummyVar0 = V_0.TryAdd(V_3, settings); V_2 = V_2 + 1; } V_4 = this; V_5 = false; try { Monitor.Enter(V_4, ref V_5); this._shellsByHostAndPrefix = this._shellsByHostAndPrefix.SetItems(V_0); } finally { if (V_5) { Monitor.Exit(V_4); } } return; }