internal bool TryGetRestrictedErrorObject(out object restrictedErrorObject) { restrictedErrorObject = null; if (Data != null && Data.Contains("__RestrictedErrorObject")) { __RestrictedErrorObject restrictedObject = Data["__RestrictedErrorObject"] as __RestrictedErrorObject; if (restrictedObject != null) { restrictedErrorObject = restrictedObject.RealErrorObject; return(true); } } return(false); }
internal bool TryGetRestrictedLanguageErrorObject(out object restrictedErrorObject) { restrictedErrorObject = null; if (Data != null && Data.Contains("__HasRestrictedLanguageErrorObject")) { if (Data.Contains("__RestrictedErrorObject")) { __RestrictedErrorObject restrictedObject = Data["__RestrictedErrorObject"] as __RestrictedErrorObject; if (restrictedObject != null) restrictedErrorObject = restrictedObject.RealErrorObject; } return (bool)Data["__HasRestrictedLanguageErrorObject"]; } return false; }
/// <summary> /// 尝试获取限制语言错误对象 /// </summary> /// <param name="restrictedErrorObject">限制语言错误对象</param> /// <returns></returns> internal bool TryGetRestrictedLanguageErrorObject(out object restrictedErrorObject) { restrictedErrorObject = null; if (Data != null && Data.Contains("__HasRestrictedLanguageErrorObject")) //判断异常数据信息是否为空,并且判断是否含有__HasRestrictedLanguageErrorObject { if (Data.Contains("__RestrictedErrorObject")) //如果异常数据信息包含__RestrictedErrorObject,进行赋值 { __RestrictedErrorObject restrictedObject = Data["__RestrictedErrorObject"] as __RestrictedErrorObject; if (restrictedObject != null) { restrictedErrorObject = restrictedObject.RealErrorObject; } } return((bool)Data["__HasRestrictedLanguageErrorObject"]); } return(false); }