private InjectionError CreateError(InjectionErrorType errorType, Type bindingType = null, Type providerType = null, int callerLevel = 0) { string callerInfo = GetCallerInfo(1 + callerLevel); string bindingTypeAsString = (bindingType != null)?(bindingType.ToString()):(""); string providerTypeAsString = (providerType != null)?(providerType.ToString()):(""); object[] args = new object[] { callerInfo, bindingTypeAsString, providerTypeAsString }; string errorMessage = String.Format(_ErrorMessages[(int)errorType], args); InjectionError error = new InjectionError(errorType, errorMessage); _Errors.Add(error); return(error); }
// CONSTRUCTOR public InjectionException(InjectionErrorType error, string message) : base(message) { Error = error; }
// CONSTRUCTOR public InjectionError(InjectionErrorType error, string message) { this.error = error; this.message = message; }
// CONSTRUCTOR public InjectionError(InjectionErrorType error, string message) { Error = error; Message = message; }