public string _rErr(int type, string str) { string result = ""; ResErr errType = (ResErr)type; if (!Enum.IsDefined(typeof(ResErr), errType)) { Assert.Fail("enum Bootstrap.ResErr=" + type + " not defined"); } try { resxError(errType, str); } catch (Exception e) { const string prefix = "Msg.F: "; if (e.Message.IndexOf(prefix) != 0) { Assert.Fail(); } result = e.Message.Substring(prefix.Length); } return(result); }
protected void resxError(ResErr errType, string resName) { string myName = "Bootstrap__resError_"; var v = errType.ToString(); Msg.F(myName + v, resName); }