Exemplo n.º 1
0
        public AnalyzerLoadFailureEventArgs(
            FailureErrorCode errorCode,
            string message,
            Exception?exceptionOpt = null,
            string?typeNameOpt     = null
            )
        {
            if (
                errorCode <= FailureErrorCode.None ||
                errorCode > FailureErrorCode.ReferencesFramework
                )
            {
                throw new ArgumentOutOfRangeException(nameof(errorCode));
            }

            if (message == null)
            {
                throw new ArgumentNullException(nameof(message));
            }

            ErrorCode = errorCode;
            Message   = message;
            TypeName  = typeNameOpt;
            Exception = exceptionOpt;
        }
    public ExtensionLoadFailureEventArgs(FailureErrorCode errorCode, string message, Exception?exceptionOpt = null, string?typeNameOpt = null)
    {
        if (errorCode <= FailureErrorCode.None || errorCode > FailureErrorCode.InternalExtensionEntryPointCastError)
        {
            throw new ArgumentOutOfRangeException(nameof(errorCode));
        }

        ErrorCode = errorCode;
        Message   = message ?? throw new ArgumentNullException(nameof(message));
        TypeName  = typeNameOpt;
        Exception = exceptionOpt;
    }
        public AnalyzerLoadFailureEventArgs(FailureErrorCode errorCode, string message, Exception exceptionOpt = null, string typeNameOpt = null)
        {
            if (errorCode <= FailureErrorCode.None || errorCode > FailureErrorCode.NoAnalyzers)
            {
                throw new ArgumentOutOfRangeException(nameof(errorCode));
            }

            if (message == null)
            {
                throw new ArgumentNullException(nameof(message));
            }

            ErrorCode = errorCode;
            Message = message;
            TypeName = typeNameOpt;
            Exception = exceptionOpt;
        }
 public AnalyzerLoadFailureEventArgs(FailureErrorCode errorCode, Exception ex, string typeName)
 {
     this.TypeName = typeName;
     this.ErrorCode = errorCode;
     this.Exception = ex;
 }
Exemplo n.º 5
0
 public AnalyzerLoadFailureEventArgs(FailureErrorCode errorCode, Exception ex, string typeName)
 {
     this.TypeName  = typeName;
     this.ErrorCode = errorCode;
     this.Exception = ex;
 }