Пример #1
0
        internal static LinkedInApiException ApiException(string name, Exception innerException, params object[] args)
        {
            const string prefix = "ApiException_";
            LinkedInApiException ex;
            if (args == null || args.Length == 0)
            {
                var message = Strings.ResourceManager.GetString(prefix + name);
                ex = new LinkedInApiException(message, innerException);
            }
            else
            {
                var message = string.Format(Strings.ResourceManager.GetString(prefix + name), args);
                ex = new LinkedInApiException(message, innerException);
            }

            ex.Data["Key"] = name;

            return ex;
        }
Пример #2
0
        internal static LinkedInApiException ApiException(string name, Exception innerException, params object[] args)
        {
            const string         prefix = "ApiException_";
            LinkedInApiException ex;

            if (args == null || args.Length == 0)
            {
                var message = Strings.ResourceManager.GetString(prefix + name);
                ex = new LinkedInApiException(message, innerException);
            }
            else
            {
                var message = string.Format(Strings.ResourceManager.GetString(prefix + name), args);
                ex = new LinkedInApiException(message, innerException);
            }

            ex.Data["Key"] = name;

            return(ex);
        }